Examples of GetRecord


Examples of ORG.oclc.oai.harvester2.verb.GetRecord

     * @param metadataPrefix the OAI metadataPrefix of the desired metadata
     * @return list of JDOM elements corresponding to the metadata entries in the located record.
     */
    private List<Element> getMDrecord(String oaiSource, String itemOaiId, String metadataPrefix) throws IOException, ParserConfigurationException, SAXException, TransformerException, HarvestingException
    {
    GetRecord getRecord = new GetRecord(oaiSource,itemOaiId,metadataPrefix);
    Set<String> errorSet = new HashSet<String>();       
    // If the metadata is not available for this item, can the whole thing
    if (getRecord != null && getRecord.getErrors() != null && getRecord.getErrors().getLength() > 0) {
      for (int i=0; i<getRecord.getErrors().getLength(); i++) {
        String errorCode = getRecord.getErrors().item(i).getAttributes().getNamedItem("code").getTextContent();
        errorSet.add(errorCode);
      }
      throw new HarvestingException("OAI server returned the following errors during getDescMD execution: " + errorSet.toString());
    }

    Document record = db.build(getRecord.getDocument());
    Element root = record.getRootElement();

    return root.getChild("GetRecord",OAI_NS).getChild("record", OAI_NS).getChild("metadata",OAI_NS).getChildren();
    }
View Full Code Here

Examples of org.fao.geonet.kernel.oaipmh.services.GetRecord

  public OaiPmhDispatcher(SettingManager sm, SchemaManager scm)
  {
    ResumptionTokenCache cache = new ResumptionTokenCache(sm);
   
    register(new GetRecord());
    register(new Identify());
    register(new ListIdentifiers(cache, sm, scm));
    register(new ListMetadataFormats());
    register(new ListRecords(cache, sm, scm));
    register(new ListSets());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.