Examples of CapabilityOptions


Examples of com.esri.gpt.server.csw.provider.components.CapabilityOptions

  public void handleGet(OperationContext context, HttpServletRequest request)
    throws Exception {
   
    // initialize
    LOGGER.finer("Handling csw:GetCapabilities request URL...");
    CapabilityOptions cOptions = context.getRequestOptions().getCapabilityOptions();
    ServiceProperties svcProps = context.getServiceProperties();
    ParseHelper pHelper = new ParseHelper();
    ValidationHelper vHelper = new ValidationHelper();
    String locator;
    String[] parsed;
    ISupportedValues supported;
   
    // service and version and language code are parsed by the parent RequestHandler,
    // the language code is initialized within the associated IProviderFactory
               
    // output format
    locator = "acceptFormats";
    parsed = pHelper.getParameterValues(request,locator,",");
    supported = svcProps.getSupportedValues(CswConstants.Parameter_OutputFormat);
    String outputFormat = Val.chkStr(vHelper.negotiateValue(supported,locator,parsed,false));
    if (outputFormat.length() > 0) {
      context.getOperationResponse().setOutputFormat(outputFormat);
    } else {
      locator = "outputFormat";
      parsed = pHelper.getParameterValues(request,locator);
      supported = svcProps.getSupportedValues(CswConstants.Parameter_OutputFormat);
      outputFormat = vHelper.validateValue(supported,locator,parsed,false);
      context.getOperationResponse().setOutputFormat(outputFormat);
    }
   
    // sections (an empty sections parameter should return all non-optional sections)
    locator = "sections";
    parsed = pHelper.getParameterValues(request,locator,",");
    if ((parsed != null) && (parsed.length == 0)) {
      cOptions.setSections(new StringSet());
      cOptions.getSections().add("Filter_Capabilities");
    } else {
      supported = new SupportedValues(
          "ServiceIdentification,ServiceProvider,OperationsMetadata,Filter_Capabilities",",");
      cOptions.setSections(vHelper.validateValues(supported,locator,parsed,false));
    }
   
    // execute
    this.execute(context);
  }
View Full Code Here

Examples of com.esri.gpt.server.csw.provider.components.CapabilityOptions

  public void handleXML(OperationContext context, Node root, XPath xpath)
    throws Exception {
   
    // initialize
    LOGGER.finer("Handling csw:GetCapabilities request XML...");
    CapabilityOptions cOptions = context.getRequestOptions().getCapabilityOptions();
    ServiceProperties svcProps = context.getServiceProperties();
    ParseHelper pHelper = new ParseHelper();
    ValidationHelper vHelper = new ValidationHelper();
    String locator;
    String[] parsed;
    ISupportedValues supported;

    // service and version are parsed by the parent RequestHandler
       
    // output format
    locator = "ows:AcceptFormats/ows:OutputFormat";
    parsed = pHelper.getParameterValues(root,xpath,locator);
    supported = svcProps.getSupportedValues(CswConstants.Parameter_OutputFormat);
    String outputFormat = Val.chkStr(vHelper.negotiateValue(supported,locator,parsed,false));
    if (outputFormat.length() > 0) {
      context.getOperationResponse().setOutputFormat(outputFormat);
    } else {
      locator = "@outputFormat";
      parsed = pHelper.getParameterValues(root,xpath,locator);
      supported = svcProps.getSupportedValues(CswConstants.Parameter_OutputFormat);
      outputFormat = vHelper.validateValue(supported,locator,parsed,false);
      context.getOperationResponse().setOutputFormat(outputFormat);
    }
   
    // sections (an empty sections parameter should return all non-optional sections)
    locator = "ows:Sections/ows:Section";
    parsed = pHelper.getParameterValues(root,xpath,locator);
    supported = new SupportedValues(
        "ServiceIdentification,ServiceProvider,OperationsMetadata,Filter_Capabilities",",");
    if (parsed == null) {
      parsed = pHelper.getParameterValues(root,xpath,"ows:Sections");
      if (parsed != null) {
        cOptions.setSections(new StringSet());
        cOptions.getSections().add("Filter_Capabilities");
      } else {
        cOptions.setSections(vHelper.validateValues(supported,locator,parsed,false));
      }
    } else {
      cOptions.setSections(vHelper.validateValues(supported,locator,parsed,false));
    }
   
    // execute
    this.execute(context);
  }
View Full Code Here

Examples of com.esri.gpt.server.csw.provider.components.CapabilityOptions

      // INSPIRE requirement, specify the language for exceptions in this manner
      // doesn't seem to be a good approach
      if ((this.opContext != null) && (propertyClause instanceof PropertyClause.PropertyIsEqualTo)) {
        if (discoverable.getMeaning().getName().equals("apiso.Language")) {
          if ((sLiteral != null) && (sLiteral.length() > 0)) {
            CapabilityOptions cOptions = this.opContext.getRequestOptions().getCapabilityOptions();
            if (cOptions.getLanguageCode() == null) {
              cOptions.setLanguageCode(sLiteral);
            }
          }
        }
      }
     
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.