Examples of SupportedComplexDataInputType


Examples of net.opengis.wps10.SupportedComplexDataInputType

                //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

Examples of net.opengis.wps10.SupportedComplexDataInputType

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetComplexData(SupportedComplexDataInputType newComplexData, NotificationChain msgs) {
        SupportedComplexDataInputType oldComplexData = complexData;
        complexData = newComplexData;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.INPUT_DESCRIPTION_TYPE__COMPLEX_DATA, oldComplexData, newComplexData);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

Examples of net.opengis.wps10.SupportedComplexDataInputType

        int inputtype = 0;

        // first try to figure out if the input is a literal or complex based
        // on the data in the idt
        LiteralInputType literalData = idt.getLiteralData();
        SupportedComplexDataInputType complexData = idt.getComplexData();
        if (literalData != null)
        {
            inputtype = INPUTTYPE_LITERAL;
        }
        else if (complexData != null)
        {
            inputtype = INPUTTYPE_COMPLEXDATA;
        }
        else
        {
            // is the value a literal? Do a very basic test here for common
            // literal types. TODO: figure out a more thorough test here
            if ((obj instanceof String) || (obj instanceof Double) || (obj instanceof Float) ||
                    (obj instanceof Integer))
            {
                inputtype = INPUTTYPE_LITERAL;
            }
            else
            {
                // assume complex data
                inputtype = INPUTTYPE_COMPLEXDATA;
            }
        }

        // now create the input based on its type
        String schema = null;
        if (inputtype == INPUTTYPE_COMPLEXDATA)
        {
            ComplexDataCombinationsType supported = complexData.getSupported();
            ComplexDataDescriptionType cddt = (ComplexDataDescriptionType) supported.getFormat().get(0);
            schema = cddt.getSchema();
        }

        return createInputDataType(obj, inputtype, schema);
View Full Code Here

Examples of net.opengis.wps10.SupportedComplexDataInputType

        {
            InputDescriptionType idt = (InputDescriptionType) iterator.next();
            // determine if the input is a literal or complex data, and from that
            // find out what type the object should be
            LiteralInputType literalData = idt.getLiteralData();
            SupportedComplexDataInputType complexData = idt.getComplexData();
            Class type = Object.class;
            if (literalData != null)
            {
                String reference = literalData.getDataType().getReference();
                type = getLiteralTypeFromReference(reference);
            }
            else if (complexData != null)
            {
                // TODO: get all supported types and determine how to handle that, not just the
                // default.
                ComplexDataDescriptionType format = complexData.getDefault().getFormat();
                String encoding = format.getEncoding();
                String mimetype = format.getMimeType();
                String schema = format.getSchema();
                if (encoding == null)
                {
View Full Code Here

Examples of net.opengis.wps10.SupportedComplexDataInputType

                //TODO: output the default value and see if we can output a valid range as well
            } else if(ppios.get( 0 ) instanceof BoundingBoxPPIO) {
                input.setBoundingBoxData(buildSupportedCRSType());
            } 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

Examples of net.opengis.wps10.SupportedComplexDataInputType

                }
            } else if(ppios.get( 0 ) instanceof BoundingBoxPPIO) {
                input.setBoundingBoxData(buildSupportedCRSType());
            } 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 = null;

                    if (ppio instanceof RawDataPPIO) {
                        String[] mimeTypes = AbstractRawData.getMimeTypes(p);
                        for (String mimeType : mimeTypes) {
                            ComplexDataDescriptionType ddt = wpsf
                                    .createComplexDataDescriptionType();
                            ddt.setMimeType(mimeType);
                            // heuristic to figure out if a format is text based, or not, we
                            // might want to expose this as a separate annotation/property down the
                            // road
                            if (!mimeType.contains("json") && !mimeType.contains("text")
                                    && !mimeType.contains("xml") && !mimeType.contains("gml")) {
                                ddt.setEncoding("base64");
                            }
                            complex.getSupported().getFormat().add(ddt);
                            if (format == null) {
                                format = ddt;
                            }
                        }
                    } else {
                        format = wpsf.createComplexDataDescriptionType();
                        format.setMimeType(cppio.getMimeType());
                        if (cppio instanceof BinaryPPIO) {
                            format.setEncoding("base64");
                        }
                        // 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
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.