Package com.esri.gpt.server.csw.provider.components

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


   */
  public String readXml(HttpServletRequest request,
                        RequestContext context,
                        String id)
    throws Exception {
    OperationContext opContext = new OperationContext();
    opContext.setRequestContext(context);
    OriginalXmlProvider xmlProvider = new OriginalXmlProvider();
    return xmlProvider.provideOriginalXml(opContext,id);
  }
View Full Code Here


          mimeType = "text/xml";
        }
      }
    } catch (Exception e) {
      OperationContext opContext = null;
      if (handler != null) {
        opContext = handler.getOperationContext();
      }
      cswResponse = handleException(opContext,e);
    }
View Full Code Here

                               HttpServletResponse response,
                               RequestContext context,
                               String id)
    throws Exception {
    RequestHandler handler = this.makeRequestHandler(request,response,context);
    OperationContext opContext = handler.getOperationContext();
    IProviderFactory factory = opContext.getProviderFactory();
    IOriginalXmlProvider oxp = factory.makeOriginalXmlProvider(opContext);
    if (oxp == null) {
      String msg = "The getxml parameter is not supported.";
      String locator = "getxml";
      throw new OwsException(OwsException.OWSCODE_InvalidParameterValue,locator,msg);
View Full Code Here

        // read the full metadata XML (acl was already processed by above CSW request)
        String fullMetadataXml = "";      
        try {
         
          RequestHandler handler = ProviderFactory.newHandler(this.getRequestContext());
          OperationContext ctx = handler.getOperationContext();
          IOriginalXmlProvider oxp = ctx.getProviderFactory().makeOriginalXmlProvider(ctx);
          fullMetadataXml = oxp.provideOriginalXml(ctx,uuid);
         
        } catch (Exception e) {
          throw new SearchException("Error accessing full metadata xml for: "+uuid);
        }
View Full Code Here

   
    // handle remaining assertions   
    CfgAssertion[] assertions = action.item.assertions;
    if (succeeded && (assertions != null) && (assertions.length > 0)) {
      CfgAssertionHelper helper = new CfgAssertionHelper();
      OperationContext ctx = handler.getOperationContext();
      String resultXml = ctx.getOperationResponse().getResponseXml();
      if (this.xpath == null) {
        CswNamespaces ns = new CswNamespaces();
        this.xpath = XPathFactory.newInstance().newXPath();
        this.xpath.setNamespaceContext(ns.makeNamespaceContext());
      }
 
      HashMap<String,String> actuals = new HashMap<String,String>();
      actuals.put("serviceProperties.serviceName",
          ctx.getServiceProperties().getServiceName());
      actuals.put("serviceProperties.serviceVersion",
          ctx.getServiceProperties().getServiceVersion());
      actuals.put("operationResponse.outputFormat",
          ctx.getOperationResponse().getOutputFormat());
      actuals.put("transactionOptions.deletionIDs.size",
          ""+ctx.getRequestOptions().getTransactionOptions().getDeletionIDs().size());
     
      helper.processAssertions(action,actuals,resultXml,this.xpath);
    }
   
  }
View Full Code Here

TOP

Related Classes of com.esri.gpt.server.csw.provider.components.OperationContext

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.