Package net.opengis.wfs

Examples of net.opengis.wfs.PropertyType


        delete.setFilter(ff.id(Collections.singleton(ff.featureId("restricted.23"))));
       
        UpdateElementType update = wfs.createUpdateElementType();
        update.setTypeName(restricted);
        update.setFilter(ff.id(Collections.singleton(ff.featureId("restricted.21"))));
        PropertyType property = wfs.createPropertyType();
        property.setName(new QName(SF_NAMESPACE, "cat"));
        property.setValue(-48);
        update.getProperty().add(property);
       
        TransactionType transaction = wfs.createTransactionType();
        transaction.getInsert().add(insert);
        transaction.getUpdate().add(update);
View Full Code Here


     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        //TODO: much of this method is duplicated in the 1.1.0 binding, it
        // would be nice if we could sync them up somewhow....
        PropertyType property = wfsfactory.createPropertyType();

        //<xsd:element name="Name" type="xsd:QName">
        property.setName((QName) node.getChildValue(QName.class));

        //<xsd:element minOccurs="0" name="Value">
        if (node.hasChild("Value")) {
            Object object = node.getChildValue("Value");

            //check for a map
            if (object instanceof Map) {
                Map map = (Map) object;

                //this means a complex element parsed by xs:AnyType binding
                // try to pull out some text
                if (!map.isEmpty()) {
                    //first check for some text
                    if (map.containsKey(null)) {
                        property.setValue(map.get(null));
                    } else {
                        //perhaps some other value
                        property.setValue(map.values().iterator().next());
                    }
                }
            } else {
                property.setValue(object);
            }
        }

        return property;
    }
View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        PropertyType property = wfsfactory.createPropertyType();

        //<xsd:element name="Name" type="xsd:string">
        String name = (String) node.getChildValue("Name");

        //turn into qname
        QName qName = (QName) new XSQNameBinding(namespaceContext).parse(null, name);
        property.setName(qName);

        //<xsd:element minOccurs="0" name="Value">
        if (node.hasChild("Value")) {
            Object object = node.getChildValue("Value");

            //check for a map
            if (object instanceof Map) {
                Map map = (Map) object;

                //this means a complex element parsed by xs:AnyType binding
                // try to pull out some text
                if (!map.isEmpty()) {
                    //first check for some text
                    if (map.containsKey(null)) {
                        property.setValue(map.get(null));
                    } else {
                        //perhaps some other value
                        property.setValue(map.values().iterator().next());
                    }
                }
            } else {
                property.setValue(object);
            }
        }

        return property;
    }
View Full Code Here

TOP

Related Classes of net.opengis.wfs.PropertyType

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.