Examples of ExecuteType


Examples of net.opengis.wps10.ExecuteType

     * @param method
     * @return
     * @throws Exception
     */
    Object handleAsInternalWPS(ProcessParameterIO ppio, InputReferenceType ref) throws Exception {
        ExecuteType request = null;
        if (ref.getMethod() == MethodType.POST_LITERAL) {
          request = (ExecuteType) ref.getBody();
        } else {
            ExecuteKvpRequestReader reader = (ExecuteKvpRequestReader) context.getBean("executeKvpRequestReader");
            request = (ExecuteType) kvpParse(ref.getHref(), reader);
View Full Code Here

Examples of net.opengis.wps10.ExecuteType

    }

    private boolean isStandardDocumentResponse(Operation operation) {
        if(operation.getParameters()[0] instanceof ExecuteType) {
            ExecuteType execute = (ExecuteType) operation.getParameters()[0];
            return execute.getResponseForm() != null && execute.getResponseForm().getRawDataOutput() == null;
        }
        return true;
    }
View Full Code Here

Examples of net.opengis.wps10.ExecuteType

    @Override
    public String getAttachmentFileName(Object value, Operation operation) {
        if(isStandardDocumentResponse(operation)) {
            return "execute.xml";
        } else {
            ExecuteType execute = (ExecuteType) operation.getParameters()[0];
            ExecuteResponseType response = (ExecuteResponseType) value;
            if(response.getProcessOutputs() == null) {
                // just a status report or a failure report
                return "execute.xml";
            }
View Full Code Here

Examples of net.opengis.wps10.ExecuteType

        super(ExecuteType.class, Wps10Factory.eINSTANCE);
    }
   
    @Override
    public Object read(Object request, Map kvp, Map rawKvp) throws Exception {
        ExecuteType execute = (ExecuteType) super.read(request, kvp, rawKvp);
        Wps10Factory factory = Wps10Factory.eINSTANCE;
       
        // grab the process, we need it to parse the data inputs
        Name processName = Ows11Util.name(execute.getIdentifier());
        ProcessFactory pf = GeoServerProcessors.createProcessFactory(processName);
        if (pf == null) {
            throw new WPSException("No such process: " + processName);
        }

        // parse inputs
        List<InputType> inputs = parseDataInputs(pf.getParameterInfo(processName), (String) rawKvp.get("DataInputs"));
        DataInputsType1 input1 = factory.createDataInputsType1();
        input1.getInput().addAll(inputs);
        execute.setDataInputs(input1);
       
        if(rawKvp.containsKey("responseDocument")) {
            execute.setResponseForm(parseResponseDocument(pf.getResultInfo(processName, null), (String) rawKvp.get("responseDocument")));
        } else if(rawKvp.containsKey("rawDataOutput")) {
            execute.setResponseForm(parseRawDataOutput(pf.getResultInfo(processName, null), (String) rawKvp.get("rawDataOutput")));
        } else {
            ResponseFormType responseForm = factory.createResponseFormType();
            responseForm.setResponseDocument(factory.createResponseDocumentType());
            execute.setResponseForm(responseForm);
        }
       
        if("true".equals(kvp.get("storeExecuteResponse"))) {
            if(execute.getResponseForm().getResponseDocument() == null) {
                throw new WPSException("InvalidParameterValue", "Cannot store the response for raw data outputs, " +
                    "please use response document instead");
            }
            execute.getResponseForm().getResponseDocument().setStoreExecuteResponse(true);
        }
       
        if("true".equals(kvp.get("lineage"))) {
            if(execute.getResponseForm().getResponseDocument() == null) {
                throw new WPSException("InvalidParameterValue", "Cannot provide lineage in the response for raw data outputs, " +
                        "please use response document instead");
            }
            execute.getResponseForm().getResponseDocument().setLineage(true);
        }
       
        if("true".equals(kvp.get("status"))) {
            if(execute.getResponseForm().getResponseDocument() == null) {
                throw new WPSException("InvalidParameterValue", "Cannot add status with raw data outputs, " +
                        "please use response document with store option instead");
            }
            if(!execute.getResponseForm().getResponseDocument().isStoreExecuteResponse()) {
                throw new WPSException("InvalidParameterValue", "Cannot add status if the response " +
                    "is not stored, please add storeExecuteResponse=true your request");
            }
            execute.getResponseForm().getResponseDocument().setStatus(true);
        }
       
        return execute;
    }
View Full Code Here

Examples of net.opengis.wps10.ExecuteType

     * @param method
     * @return
     * @throws Exception
     */
    Object handleAsInternalWPS(ProcessParameterIO ppio, InputReferenceType ref) throws Exception {
        ExecuteType request = null;
        if (ref.getMethod() == MethodType.POST_LITERAL) {
            request = (ExecuteType) ref.getBody();
        } else {
            ExecuteKvpRequestReader reader = (ExecuteKvpRequestReader) context
                    .getBean("executeKvpRequestReader");
View Full Code Here

Examples of net.opengis.wps10.ExecuteType

    }
   
    @Override
    public String getMimeType(Object value, Operation operation)
            throws ServiceException {
        ExecuteType execute = (ExecuteType) operation.getParameters()[0];
        if (execute.getResponseForm().getRawDataOutput() == null) {
            // normal execute response encoding
            return standardResponse.getMimeType(value, operation);
        } else {
            // raw response, let's see what the output is
            ExecuteResponseType response = (ExecuteResponseType) value;
View Full Code Here

Examples of net.opengis.wps10.ExecuteType

    }

    @Override
    public void write(Object value, OutputStream output, Operation operation)
            throws IOException, ServiceException {
        ExecuteType execute = (ExecuteType) operation.getParameters()[0];
        if (execute.getResponseForm().getRawDataOutput() == null) {
            // normal execute response encoding
            standardResponse.write(value, output, operation);
        } else {
            // raw response, let's see what the output is
            ExecuteResponseType response = (ExecuteResponseType) value;
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.