Package net.opengis.wps10

Examples of net.opengis.wps10.ResponseDocumentType


        }

        // setup a fake call to fake process
        ExecuteProcessRequest exeRequest = wps.createExecuteProcessRequest();
        exeRequest.setIdentifier(processIdenLocal);
        ResponseDocumentType doc = wps.createResponseDocumentType(false, true, true, "result");
        DocumentOutputDefinitionType odt = (DocumentOutputDefinitionType) doc.getOutput().get(0);
        odt.setMimeType("application/arcgrid");
        odt.setAsReference(true);
        ResponseFormType responseForm = wps.createResponseForm(doc, null);
        exeRequest.setResponseForm(responseForm);
View Full Code Here


    ResponseFormType parseResponseDocument(Map<String, Parameter<?>> outputs, String responseDefinition) {
        Wps10Factory factory = Wps10Factory.eINSTANCE;
        List<IOParam> ioParams = parseIOParameters(responseDefinition);
       
        ResponseFormType response = factory.createResponseFormType();
        ResponseDocumentType doc = factory.createResponseDocumentType();
        response.setResponseDocument(doc);
       
        for (IOParam ioParam : ioParams) {
            doc.getOutput().add(parseOutputDefinitionType(outputs, factory, ioParam, true));
        }
       
        return response;
    }
View Full Code Here

     * @return
     */
    private String getOutputMimeType(String key) {
        // lookup for the OutputDefinitionType
        OutputDefinitionType odt = request.getResponseForm().getRawDataOutput();
        ResponseDocumentType responseDocument = request.getResponseForm().getResponseDocument();
        if (responseDocument != null && odt == null) {
            Iterator it = responseDocument.getOutput().iterator();
            while (it.hasNext()) {
                OutputDefinitionType curr = (OutputDefinitionType) it.next();
                if (curr.getIdentifier().getValue().equals(key)) {
                    odt = curr;
                    break;
View Full Code Here

    ResponseFormType parseResponseDocument(Map<String, Parameter<?>> outputs, String responseDefinition) {
        Wps10Factory factory = Wps10Factory.eINSTANCE;
        List<IOParam> ioParams = parseIOParameters(responseDefinition);
       
        ResponseFormType response = factory.createResponseFormType();
        ResponseDocumentType doc = factory.createResponseDocumentType();
        response.setResponseDocument(doc);
       
        for (IOParam ioParam : ioParams) {
            doc.getOutput().add(parseOutputDefinitionType(outputs, factory, ioParam, true));
        }
       
        return response;
    }
View Full Code Here

    private Map<String, String> getRequestedRawDataMimeTypes(Collection<String> rawResults, Name name,
            ProcessFactory pf) {
        Map<String, String> result = new HashMap<String, String>();
        ResponseFormType form = request.getResponseForm();
        OutputDefinitionType raw = form.getRawDataOutput();
        ResponseDocumentType document = form.getResponseDocument();
    if (form == null || (raw == null && document == null)) {
            // all outputs using their default mime
          for (String rawResult : rawResults) {
            String mime = AbstractRawData.getDefaultMime(name, pf, rawResult);
            result.put(rawResult, mime);
      }
        } else if (raw != null) {
            // just one output type
            String output = raw.getIdentifier().getValue();
            String mime;
            if (raw.getMimeType() != null) {
                mime = raw.getMimeType();
            } else {
                mime = AbstractRawData.getDefaultMime(name, pf, output);
            }
            result.put(output, mime);
        } else {
            // the response document form
          for (Iterator it = document.getOutput().iterator(); it.hasNext();) {
        OutputDefinitionType out = (OutputDefinitionType) it.next();
        String outputName = out.getIdentifier().getValue();
        if(rawResults.contains(outputName)) {
          // was the output mime specified?
          String mime = out.getMimeType();
View Full Code Here

     * @param object
     * @param output
     * @throws IllegalArgumentException
     */
    public ExecuteResponseType run(ExecuteType execute) {
        ResponseDocumentType responseDocument = null;
        OutputDefinitionType rawDataOutput = null;
        if (execute.getResponseForm() != null) {
            responseDocument = execute.getResponseForm().getResponseDocument();
            rawDataOutput = execute.getResponseForm().getRawDataOutput();
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetStatus(StatusType newStatus, NotificationChain msgs) {
        StatusType oldStatus = status;
        status = newStatus;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.EXECUTE_RESPONSE_TYPE__STATUS, oldStatus, newStatus);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetBoundingBoxOutput(SupportedCRSsType newBoundingBoxOutput, NotificationChain msgs) {
        SupportedCRSsType oldBoundingBoxOutput = boundingBoxOutput;
        boundingBoxOutput = newBoundingBoxOutput;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.OUTPUT_DESCRIPTION_TYPE__BOUNDING_BOX_OUTPUT, oldBoundingBoxOutput, newBoundingBoxOutput);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetBoundingBoxData(SupportedCRSsType newBoundingBoxData, NotificationChain msgs) {
        SupportedCRSsType oldBoundingBoxData = boundingBoxData;
        boundingBoxData = newBoundingBoxData;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.INPUT_DESCRIPTION_TYPE__BOUNDING_BOX_DATA, oldBoundingBoxData, newBoundingBoxData);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

                //TODO: output the default value
            }
            else {
                //handle the complex data case
                SupportedComplexDataInputType complex = wpsf.createSupportedComplexDataInputType();
                input.setComplexData( complex );
               
                complex.setSupported( wpsf.createComplexDataCombinationsType() );
                for ( ProcessParameterIO ppio : ppios ) {
                    ComplexPPIO cppio = (ComplexPPIO) ppio;

                    ComplexDataDescriptionType format = wpsf.createComplexDataDescriptionType();
                    format.setMimeType( cppio.getMimeType() );
                   
                    //add to supported
                    complex.getSupported().getFormat().add( format );
                   
                    //handle the default   
                    if ( complex.getDefault() == null ) {
                        ComplexDataDescriptionType def = wpsf.createComplexDataDescriptionType();
                        def.setMimeType( format.getMimeType() );
                       
                        complex.setDefault( wpsf.createComplexDataCombinationType() );
                        complex.getDefault().setFormat( def );
                    }
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of net.opengis.wps10.ResponseDocumentType

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.