Package org.fao.oaipmh.requests

Examples of org.fao.oaipmh.requests.ListMetadataFormatsRequest


  //---
  //---------------------------------------------------------------------------

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

    GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);
    SchemaManager   sm = gc.getBean(SchemaManager.class);

    String uuid = req.getIdentifier();
    if (uuid != null)
    {
            String schema = context.getBean(MetadataRepository.class).findOneByUuid(uuid).getDataInfo().getSchemaId();
      res.addFormat(getSchemaInfo(context, sm, schema));
    }
View Full Code Here


  //--------------------------------------------------------------------------

  private Element getMdFormats(String url, ServiceContext context) throws Exception
  {
    ListMetadataFormatsRequest req = new ListMetadataFormatsRequest(context.getBean(GeonetHttpRequestFactory.class));
    req.setSchemaPath(oaiSchema);

        XmlRequest t = req.getTransport();
    t.setUrl(new URL(url));
    Lib.net.setupProxy(context, t);
    ListMetadataFormatsResponse res = req.execute();

    //--- build response

    Element root = new Element("formats");
View Full Code Here

TOP

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

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.