Package org.fao.oaipmh.requests

Examples of org.fao.oaipmh.requests.GetRecordRequest


  {
    try
    {
            if(log.isDebugEnabled()) log.debug("  - Getting remote metadata with id : "+ ri.id);

      GetRecordRequest req = new GetRecordRequest(transport);
      req.setSchemaPath(new File(context.getAppPath() + Geonet.SchemaPath.OAI_PMH));
      req.setIdentifier(ri.id);
      req.setMetadataPrefix(ri.prefix);

      GetRecordResponse res = req.execute();

      Element md = res.getRecord().getMetadata();

            if(log.isDebugEnabled()) log.debug("    - Record got:\n"+ Xml.getString(md));
View Full Code Here


    //--- Service
    //---
    //---------------------------------------------------------------------------

    public AbstractResponse execute(AbstractRequest request, ServiceContext context) throws Exception {
        GetRecordRequest req = (GetRecordRequest) request;
        GetRecordResponse res = new GetRecordResponse();

        String uuid = req.getIdentifier();
        String prefix = req.getMetadataPrefix();

        res.setRecord(buildRecord(context, uuid, prefix));

        return res;
    }
View Full Code Here

TOP

Related Classes of org.fao.oaipmh.requests.GetRecordRequest

Copyright © 2018 www.massapicom. 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.