Package net.opengis.wps10

Examples of net.opengis.wps10.ComplexDataType


    }
   
    @Override
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
      ComplexDataType cd = (ComplexDataType) super.parse(instance, node, value);
     
      // handle non xml content as well
      if(cd.getData().size() == 0) {
        cd.getData().add(instance.getText().toString());
      }
     
      return cd;
    }
View Full Code Here


                    literal.setValue(((LiteralPPIO) ppio).encode(o));
                } else if (ppio instanceof BoundingBoxPPIO) {
                    BoundingBoxType bbox = ((BoundingBoxPPIO) ppio).encode(o);
                    data.setBoundingBoxData(bbox);
                } else if (ppio instanceof ComplexPPIO) {
                    ComplexDataType complex = f.createComplexDataType();
                    data.setComplexData(complex);

                    ComplexPPIO cppio = (ComplexPPIO) ppio;
                    complex.setMimeType(cppio.getMimeType());

                    if (cppio instanceof RawDataPPIO) {
                        RawData rawData = (RawData) o;
                        complex.setMimeType(rawData.getMimeType());
                        complex.setEncoding("base64");
                        complex.getData().add(new RawDataEncoderDelegate(rawData));
                    } else if (cppio instanceof XMLPPIO) {
                        // encode directly
                        complex.getData().add(new XMLEncoderDelegate((XMLPPIO) cppio, o));
                    } else if (cppio instanceof CDataPPIO) {
                        complex.getData().add(new CDataEncoderDelegate((CDataPPIO) cppio, o));
                    } else if (cppio instanceof BinaryPPIO) {
                        complex.setEncoding("base64");
                        complex.getData().add(new BinaryEncoderDelegate((BinaryPPIO) cppio, o));
                    } else {
                        throw new WPSException("Don't know how to encode an output whose PPIO is "
                                + cppio);
                    }
                }
View Full Code Here

                // just a status report or a failure report
                return "text/xml";
            }
            OutputDataType result = (OutputDataType) response.getProcessOutputs().getOutput().get(0);
            LiteralDataType literal = result.getData().getLiteralData();
            ComplexDataType complex = result.getData().getComplexData();
            if(literal != null) {
                // literals are encoded as plain strings
                return "text/plain";
            } else if(complex != null) {
                // Execute should have properly setup the mime type
                return complex.getMimeType();
            } else {
                // bbox
                return "text/xml";
            }
        }
View Full Code Here

                return "execute.xml";
            }
            OutputDataType result = (OutputDataType) response.getProcessOutputs().getOutput().get(0);
            String fname = result.getIdentifier().getValue();
            LiteralDataType literal = result.getData().getLiteralData();
            ComplexDataType complex = result.getData().getComplexData();
            String fext;
            // this is not the most robust way to get mime type...
            if (literal != null) {
                fext = "txt";
            } else if(complex != null) {
View Full Code Here

        return ref;
    }

    private ComplexDataType parseComplex(InputType it, Wps10Factory factory,
            IOParam param) {
        ComplexDataType complex = factory.createComplexDataType();
        complex.getData().add(param.value);
        complex.setEncoding(param.attributes.get("encoding"));
        complex.setMimeType(param.attributes.get("mimetype"));
        complex.setSchema(param.attributes.get("schema"));

        return complex;
    }
View Full Code Here

        super( factory );
    }

    @Override
    public List getProperties(Object object) throws Exception {
        ComplexDataType complex = (ComplexDataType) object;
        if ( !complex.getData().isEmpty() && complex.getData().get( 0 ) instanceof XMLEncoderDelegate ) {
            XMLEncoderDelegate delegate = (XMLEncoderDelegate) complex.getData().get( 0 );
            List properties = new ArrayList();
            properties.add( new Object[]{
                delegate.getProcessParameterIO().getElement(), delegate } );
           
            return properties;
View Full Code Here

    }
   
    @Override
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
      ComplexDataType cd = (ComplexDataType) super.parse(instance, node, value);
     
      // handle non xml content as well
      if(cd.getData().size() == 0) {
        cd.getData().add(instance.getText().toString());
      }
     
      return cd;
    }
View Full Code Here

                if (data.getLiteralData() != null) {
                    LiteralDataType literal = data.getLiteralData();
                    value = ((LiteralPPIO) ppio).decode(literal.getValue());
                } else if (data.getComplexData() != null) {
                    ComplexDataType complex = data.getComplexData();
                    if (ppio instanceof RawDataPPIO) {
                        Object inputData = complex.getData().get(0);
                        String encoding = complex.getEncoding();
                        byte[] decoded = null;
                        if (encoding != null) {
                            if ("base64".equals(encoding)) {
                                String input = inputData.toString();
                                decoded = Base64.decode(input);
                            } else {
                                throw new WPSException("Unsupported encoding " + encoding);
                            }
                        }
                       
                        if(decoded != null) {
                            return new ByteArrayRawData(decoded, complex.getMimeType());
                        } else {
                            return new StringRawData(inputData.toString(), complex.getMimeType());
                        }
                       
                    } else {
                        Object inputData = complex.getData().get(0);
                        String encoding = complex.getEncoding();
                        byte[] decoded = null;
                        if (encoding != null) {
                            if ("base64".equals(encoding)) {
                                String input = inputData.toString();
                                decoded = Base64.decode(input);
View Full Code Here

        pd.setIdentifier( Ows11Util.code( id.getValue() ) );
        pd.setTitle( Ows11Util.languageString(pf.getTitle(name)) );
        pd.setAbstract( Ows11Util.languageString(pf.getDescription(name)) );
       
        //data inputs
        DataInputsType inputs = wpsf.createDataInputsType();
        pd.setDataInputs(inputs);
        dataInputs( inputs, pf, name );
       
        //process outputs
        ProcessOutputsType outputs = wpsf.createProcessOutputsType();
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetDataInputs(DataInputsType newDataInputs, NotificationChain msgs) {
        DataInputsType oldDataInputs = dataInputs;
        dataInputs = newDataInputs;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.PROCESS_DESCRIPTION_TYPE__DATA_INPUTS, oldDataInputs, newDataInputs);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

TOP

Related Classes of net.opengis.wps10.ComplexDataType

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.