Package net.opengis.wps10

Examples of net.opengis.wps10.LiteralInputType


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetLiteralData(LiteralDataType newLiteralData, NotificationChain msgs) {
        LiteralDataType oldLiteralData = literalData;
        literalData = newLiteralData;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.DATA_TYPE__LITERAL_DATA, oldLiteralData, newLiteralData);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here


          
            //handle the literal case
            if ( ppios.size() == 1 && ppios.get( 0 ) instanceof LiteralPPIO ) {
                LiteralPPIO lppio = (LiteralPPIO) ppios.get( 0 );
               
                LiteralInputType literal = wpsf.createLiteralInputType();
                input.setLiteralData( 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() ) );       
                    }   
                }
                literal.setAnyValue( owsf.createAnyValueType() );

                //TODO: output the default value
            }
            else {
                //handle the complex data case
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetLiteralData(LiteralInputType newLiteralData, NotificationChain msgs) {
        LiteralInputType oldLiteralData = literalData;
        literalData = newLiteralData;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.INPUT_DESCRIPTION_TYPE__LITERAL_DATA, oldLiteralData, newLiteralData);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

    {
        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;
        }
View Full Code Here

        while (iterator.hasNext())
        {
            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
View Full Code Here

          
            //handle the literal case
            if (ppios.get( 0 ) instanceof LiteralPPIO ) {
                LiteralPPIO lppio = (LiteralPPIO) ppios.get( 0 );
               
                LiteralInputType literal = wpsf.createLiteralInputType();
                input.setLiteralData( literal );
               
                // map the java class to an xml type name
                if ( !String.class.equals(lppio.getType()) ) {
                  Class type = lppio.getType();
                  if(PRIMITIVE_TO_WRAPPER.containsKey(type)) {
                    type = PRIMITIVE_TO_WRAPPER.get(type);
                  }
                    Name typeName = xsp.name(type);
                    if ( typeName != null ) {
                        literal.setDataType(Ows11Util.type("xs:" + typeName.getLocalPart()));       
                    }   
                }
                if(lppio.getType().isEnum()) {
                  Object[] enumValues = lppio.getType().getEnumConstants();
                  AllowedValuesType allowed = owsf.createAllowedValuesType();
                  for (Object value : enumValues) {
                    ValueType vt = owsf.createValueType();
                    vt.setValue(value.toString());
            allowed.getValue().add(vt);
          }
                  literal.setAllowedValues(allowed);
                } else {
                  literal.setAnyValue( owsf.createAnyValueType() );
                }

                //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());
View Full Code Here

          
            //handle the literal case
            if (ppios.get( 0 ) instanceof LiteralPPIO ) {
                LiteralPPIO lppio = (LiteralPPIO) ppios.get( 0 );
               
                LiteralInputType literal = wpsf.createLiteralInputType();
                input.setLiteralData( literal );
               
                // map the java class to an xml type name
                if ( !String.class.equals(lppio.getType()) ) {
                  Class type = lppio.getType();
                  if(PRIMITIVE_TO_WRAPPER.containsKey(type)) {
                    type = PRIMITIVE_TO_WRAPPER.get(type);
                  }
                    Name typeName = xsp.name(type);
                    if ( typeName != null ) {
                        literal.setDataType(Ows11Util.type("xs:" + typeName.getLocalPart()));       
                    }   
                }
                if (p.metadata.get(Parameter.OPTIONS) != null) {
                    List<Object> options = (List<Object>) p.metadata.get(Parameter.OPTIONS);
                    Object[] optionsArray = options.toArray(new Object[options.size()]);
                    addAllowedValues(literal, optionsArray);
                } else if (lppio.getType().isEnum()) {
                  Object[] enumValues = lppio.getType().getEnumConstants();
                    addAllowedValues(literal, enumValues);
                } else {
                  literal.setAnyValue( owsf.createAnyValueType() );
                }

                try {
                    if (p.sample != null) {
                        literal.setDefaultValue(lppio.encode(p.sample));
                    }
                } catch (Exception e) {
                    LOGGER.log(Level.WARNING, "Failed to fill the default value for input " + p.key
                            + " of process " + name, e);
                }
View Full Code Here

           
            //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
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetLiteralOutput(LiteralOutputType newLiteralOutput, NotificationChain msgs) {
        LiteralOutputType oldLiteralOutput = literalOutput;
        literalOutput = newLiteralOutput;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.OUTPUT_DESCRIPTION_TYPE__LITERAL_OUTPUT, oldLiteralOutput, newLiteralOutput);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

                //this is a reference
                InputReferenceType ref = input.getReference();
               
                //grab the location and method
                String href = ref.getHref();
                MethodType meth = ref.getMethod() != null ? ref.getMethod() : MethodType.GET_LITERAL;
               
                //handle get vs post
                if ( meth == MethodType.POST_LITERAL ) {
                    //post, handle the body
                }
View Full Code Here

TOP

Related Classes of net.opengis.wps10.LiteralInputType

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.