Package net.opengis.wps10

Examples of net.opengis.wps10.ProcessDescriptionsType


            InputType input = (InputType) i.next();
            response.getDataInputs().getInput().add( EMFUtils.clone( input, f, true ) );
        }
       
        //output definitions
        OutputDefinitionsType outputs = f.createOutputDefinitionsType();
        response.setOutputDefinitions( outputs );
       
        Map<String,Parameter<?>> outs = pf.getResultInfo(processName, null);
        Map<String,ProcessParameterIO> ppios = new HashMap();
       
        for ( String key : result.keySet() ) {
            Parameter p = pf.getResultInfo(processName, null).get( key );
            if ( p == null ) {
                throw new WPSException( "No such output: " + key );
            }
           
            //find the ppio
            ProcessParameterIO ppio = ProcessParameterIO.find( p, context );
            if ( ppio == null ) {
                throw new WPSException( "Unable to encode output: " + p.key );
            }
            ppios.put( p.key, ppio );
           
            DocumentOutputDefinitionType output = f.createDocumentOutputDefinitionType();
            outputs.getOutput().add( output );
           
            output.setIdentifier( Ows11Util.code( p.key ) );
            if ( ppio instanceof ComplexPPIO ) {
                output.setMimeType( ((ComplexPPIO) ppio).getMimeType() );
            }
View Full Code Here


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetOutputDefinitions(OutputDefinitionsType newOutputDefinitions, NotificationChain msgs) {
        OutputDefinitionsType oldOutputDefinitions = outputDefinitions;
        outputDefinitions = newOutputDefinitions;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.EXECUTE_RESPONSE_TYPE__OUTPUT_DEFINITIONS, oldOutputDefinitions, newOutputDefinitions);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

    }
   
    void processOutputs( ProcessOutputsType outputs, ProcessFactory pf, Name name) {
        Map<String,Parameter<?>> outs = pf.getResultInfo(name, null);
        for ( Parameter p : outs.values() ) {
            OutputDescriptionType output = wpsf.createOutputDescriptionType();
            outputs.getOutput().add( output );
           
            output.setIdentifier( Ows11Util.code( p.key ) );
            output.setTitle( Ows11Util.languageString( p.title ) );
           
            List<ProcessParameterIO> ppios = ProcessParameterIO.findAll( p, context);
            if ( ppios.isEmpty() ) {
                throw new WPSException( "Could not find process parameter for type " + p.key + "," + p.type );
            }
           
            //handle the literal case
            if ( ppios.size() == 1 && ppios.get( 0 ) instanceof LiteralPPIO ) {
                LiteralPPIO lppio = (LiteralPPIO) ppios.get( 0 );
               
                LiteralOutputType literal = wpsf.createLiteralOutputType();
                output.setLiteralOutput(literal);
               
                //map the java class to an xml type name
                if ( !String.class.equals( lppio.getType() ) ) {
                    Name typeName = xsp.name( lppio.getType() );
                    if ( typeName != null ) {
                        literal.setDataType( Ows11Util.type( typeName.getLocalPart() ) );       
                    }   
                }
            }
            else {
                //handle the complex data case
                SupportedComplexDataType complex = wpsf.createSupportedComplexDataType();
                output.setComplexOutput( complex );
               
                complex.setSupported( wpsf.createComplexDataCombinationsType() );
                for ( ProcessParameterIO ppio : ppios ) {
                    ComplexPPIO cppio = (ComplexPPIO) ppio;
View Full Code Here

            final Object o = result.get( key );
            ProcessParameterIO ppio = ppios.get( key );
           
            if ( ppio instanceof ReferencePPIO ) {
                //encode as a reference
                OutputReferenceType ref = f.createOutputReferenceType();
                output.setReference( ref );
               
                //TODO: mime type
                ref.setHref( ((ReferencePPIO) ppio).encode(o).toString() );
            }
            else {
                //encode as data
                DataType data = f.createDataType();
                output.setData( data );
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetReference(OutputReferenceType newReference, NotificationChain msgs) {
        OutputReferenceType oldReference = reference;
        reference = newReference;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.OUTPUT_DATA_TYPE__REFERENCE, oldReference, newReference);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

        ExecuteResponseType response = f.createExecuteResponseType();
        response.setLang("en");
        response.setServiceInstance(ResponseUtils.appendQueryString(ResponseUtils.buildURL(request.getBaseUrl(), "ows", null, URLType.SERVICE), ""));
      
        //process
        final ProcessBriefType process = f.createProcessBriefType();
        response.setProcess( process );
        process.setIdentifier(ct);
        process.setProcessVersion(pf.getVersion(processName));
        process.setTitle( Ows11Util.languageString( pf.getTitle(processName).toString() ) );
        process.setAbstract( Ows11Util.languageString( pf.getDescription(processName).toString() ) );
      
        //status
        response.setStatus( f.createStatusType() );
        response.getStatus().setCreationTime( Converters.convert( started, XMLGregorianCalendar.class ));
       
View Full Code Here

        ProcessOfferingsType po = wpsf.createProcessOfferingsType();
        caps.setProcessOfferings( po );
       
        for(ProcessFactory pf : Processors.getProcessFactories()) {
            for (Name name : pf.getNames()) {
                ProcessBriefType p = wpsf.createProcessBriefType();
                p.setProcessVersion(pf.getVersion(name));
                po.getProcess().add( p );
               
                p.setIdentifier(Ows11Util.code(name));
                p.setTitle(Ows11Util.languageString( pf.getTitle(name).toString()));
                p.setAbstract(Ows11Util.languageString( pf.getDescription(name).toString()));
            }
           
        }

        LanguagesType1 languages = wpsf.createLanguagesType1();
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetProcess(ProcessBriefType newProcess, NotificationChain msgs) {
        ProcessBriefType oldProcess = process;
        process = newProcess;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.EXECUTE_RESPONSE_TYPE__PROCESS, oldProcess, newProcess);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

        ProcessFactory pf = Processors.createProcessFactory(name);
        if ( pf == null ) {
            throw new WPSException( "No such process: " + id.getValue() );
        }
       
        ProcessDescriptionType pd = wpsf.createProcessDescriptionType();
        pds.getProcessDescription().add( pd );
       
        pd.setProcessVersion( "1.0.0" );
        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();
        pd.setProcessOutputs( outputs );
        processOutputs( outputs, pf, name );
     }
View Full Code Here

        xsp = new XSProfile();
    }

    public ProcessDescriptionsType run(DescribeProcessType request) {
       
        ProcessDescriptionsType pds = wpsf.createProcessDescriptionsType();
       
        for ( Iterator i = request.getIdentifier().iterator(); i.hasNext(); ) {
            CodeType id = (CodeType) i.next();
            processDescription( id, pds );
        }
View Full Code Here

TOP

Related Classes of net.opengis.wps10.ProcessDescriptionsType

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.