Package net.opengis.wps10

Examples of net.opengis.wps10.InputType


     */
    Map<String, Object> parseProcessInputs(ExecuteType request, Name processName, ProcessFactory pf) {
        Map<String, Object> inputs = new HashMap<String, Object>();
        final Map<String, Parameter<?>> parameters = pf.getParameterInfo(processName);
        for (Iterator i = request.getDataInputs().getInput().iterator(); i.hasNext();) {
            InputType input = (InputType) i.next();
            String inputId = input.getIdentifier().getValue();

            // locate the parameter for this request
            Parameter p = parameters.get(inputId);
            if (p == null) {
                throw new WPSException("No such parameter: " + inputId);
            }

            // find the ppio
            String mime = null;
            if (input.getData() != null && input.getData().getComplexData() != null) {
                mime = input.getData().getComplexData().getMimeType();
            } else if (input.getReference() != null) {
                mime = input.getReference().getMimeType();
            }
            ProcessParameterIO ppio = ProcessParameterIO.find(p, context, mime);
            if (ppio == null) {
                throw new WPSException("Unable to decode input: " + inputId);
            }

            // read the data
            Object decoded = null;
            try {
                if (input.getReference() != null) {
                    // this is a reference
                    InputReferenceType ref = input.getReference();

                    // grab the location and method
                    String href = ref.getHref();

                    if (href.startsWith("http://geoserver/wfs")) {
                        decoded = handleAsInternalWFS(ppio, ref);
                    } else if (href.startsWith("http://geoserver/wcs")) {
                        decoded = handleAsInternalWCS(ppio, ref);
                    } else if (href.startsWith("http://geoserver/wps")) {
                        decoded = handleAsInternalWPS(ppio, ref);
                    } else {
                        decoded = executeRemoteRequest(ref, (ComplexPPIO) ppio, inputId);
                    }

                } else {
                    // actual data, figure out which type
                    DataType data = input.getData();

                    if (data.getLiteralData() != null) {
                        LiteralDataType literal = data.getLiteralData();
                        decoded = ((LiteralPPIO) ppio).decode(literal.getValue());
                    } else if (data.getComplexData() != null) {
View Full Code Here


        if (helper.isLineageRequested()) {
            // inputs
            if (request.getDataInputs() != null && request.getDataInputs().getInput().size() > 0) {
                response.setDataInputs(f.createDataInputsType1());
                for (Iterator i = request.getDataInputs().getInput().iterator(); i.hasNext();) {
                    InputType input = (InputType) i.next();
                    response.getDataInputs().getInput().add(EMFUtils.clone(input, f, true));
                }
            }

            // output definitions, if any was requested explicitly
View Full Code Here

       
        List<InputType> result = new ArrayList<InputType>();
        for (IOParam ioParam : params) {
            // common
            Wps10Factory factory = Wps10Factory.eINSTANCE;
            InputType it = factory.createInputType();
            it.setIdentifier(Ows11Util.code(ioParam.id));
            it.setData(factory.createDataType());
           
            Parameter<?> gtParam = inputParams.get(ioParam.id);
            if(gtParam == null) {
                throw new WPSException("Unknown data input named '" + ioParam.id + "'");
            }
            ProcessParameterIO ppio = ProcessParameterIO.findAll(gtParam, applicationContext).get(0);
           
            if(ppio instanceof LiteralPPIO) {
                it.getData().setLiteralData(parseLiteral(it, factory, ioParam));
            } else if(ppio instanceof BoundingBoxPPIO) {
                it.getData().setBoundingBoxData(parseBoundingBox(it, factory, ioParam));
            } else if(ioParam.isReference()) {
                it.setReference(parseReferenceType(it, factory, ioParam));
            } else {
                it.getData().setComplexData(parseComplex(it, factory, ioParam));
            }
           
            result.add(it);
        }
       
View Full Code Here

            }
        }

        // turn them into a map of input providers
        for (Iterator i = request.getDataInputs().getInput().iterator(); i.hasNext();) {
            InputType input = (InputType) i.next();
            String inputId = input.getIdentifier().getValue();

            // locate the parameter for this request
            Parameter p = parameters.get(inputId);
            if (p == null) {
                throw new WPSException("No such parameter: " + inputId);
            }

            // find the ppio
            String mime = null;
            if (input.getData() != null && input.getData().getComplexData() != null) {
                mime = input.getData().getComplexData().getMimeType();
            } else if (input.getReference() != null) {
                mime = input.getReference().getMimeType();
            }
            ProcessParameterIO ppio = ProcessParameterIO.find(p, manager.applicationContext, mime);
            if (ppio == null) {
                throw new WPSException("Unable to decode input: " + inputId);
            }
View Full Code Here

       
        DefaultType2 defaultLanguage = wpsf.createDefaultType2();
        languages.setDefault(defaultLanguage);
        defaultLanguage.setLanguage("en-US");
       
        LanguagesType supportedLanguages = wpsf.createLanguagesType();
        languages.setSupported( supportedLanguages );
        supportedLanguages.getLanguage().add( "en-US");
       
        return caps;
        // Version detection and alternative invocation if being implemented.
    }
View Full Code Here

       
        DefaultType2 def = factory.createDefaultType2();
        langs.setDefault( def );
        def.setLanguage( (String) node.getChildValue( "Default") );
       
        LanguagesType supported = (LanguagesType) node.getChildValue( "Supported" );
        langs.setSupported( supported );
       
        return langs;
    }
View Full Code Here

                p.setAbstract(Ows11Util.languageString( pf.getDescription(name).toString()));
            }
           
        }

        LanguagesType1 languages = wpsf.createLanguagesType1();
        caps.setLanguages( languages );
       
        DefaultType2 defaultLanguage = wpsf.createDefaultType2();
        languages.setDefault(defaultLanguage);
        defaultLanguage.setLanguage("en-US");
       
        LanguagesType supportedLanguages = wpsf.createLanguagesType();
        languages.setSupported( supportedLanguages );
        supportedLanguages.getLanguage().add( "en-US");
       
        return caps;
        // Version detection and alternative invocation if being implemented.
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetLanguages(LanguagesType1 newLanguages, NotificationChain msgs) {
        LanguagesType1 oldLanguages = languages;
        languages = newLanguages;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.WPS_CAPABILITIES_TYPE__LANGUAGES, oldLanguages, newLanguages);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

    public Class getType() {
        return LanguagesType1.class;
    }
   
    public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
        LanguagesType1 langs = factory.createLanguagesType1();
       
        DefaultType2 def = factory.createDefaultType2();
        langs.setDefault( def );
        def.setLanguage( (String) node.getChildValue( "Default") );
       
        LanguagesType supported = (LanguagesType) node.getChildValue( "Supported" );
        langs.setSupported( supported );
       
        return langs;
    }
View Full Code Here

   
    @Override
    public Element encode(Object object, Document document, Element value)
            throws Exception {
       
        LanguagesType1 langs = (LanguagesType1) object;
       
        //add the default manually
        Element def = document.createElementNS( WPS.NAMESPACE, "Default");
        value.appendChild( def );
       
        Element lang = document.createElementNS( OWS.NAMESPACE, OWS.Language.getLocalPart() );
        def.appendChild( lang );
       
        lang.appendChild( document.createTextNode( langs.getDefault().getLanguage() ) );
       
        return value;
    }
View Full Code Here

TOP

Related Classes of net.opengis.wps10.InputType

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.