/* (c) 2014 Open Source Geospatial Foundation - all rights reserved * (c) 2001 - 2013 OpenPlans * This code is licensed under the GPL 2.0 license, available at the root * application directory. */ package org.geoserver.wfs.xml.v1_0_0; import javax.xml.namespace.QName; import net.opengis.wfs.PropertyType; import net.opengis.wfs.UpdateElementType; import net.opengis.wfs.WfsFactory; import org.geotools.xml.AbstractComplexEMFBinding; import org.geotools.xml.ElementInstance; import org.geotools.xml.Node; import org.opengis.filter.Filter; /** * Binding object for the type http://www.opengis.net/wfs:UpdateElementType. * * <p> * <pre> * <code> * <xsd:complexType name="UpdateElementType"> * <xsd:sequence> * <xsd:element maxOccurs="unbounded" ref="wfs:Property"/> * <xsd:element maxOccurs="1" minOccurs="0" ref="ogc:Filter"> * <xsd:annotation> * <xsd:documentation> * The Filter element is used to constrain the scope * of the update operation to those features identified * by the filter. Feature instances can be specified * explicitly and individually using the identifier of * each feature instance OR a set of features to be * operated on can be identified by specifying spatial * and non-spatial constraints in the filter. * If no filter is specified, then the update operation * applies to all feature instances. * </xsd:documentation> * </xsd:annotation> * </xsd:element> * </xsd:sequence> * <xsd:attribute name="handle" type="xsd:string" use="optional"/> * <xsd:attribute name="typeName" type="xsd:QName" use="required"/> * </xsd:complexType> * * </code> * </pre> * @generated */ public class UpdateElementTypeBinding extends AbstractComplexEMFBinding { WfsFactory wfsfactory; public UpdateElementTypeBinding(WfsFactory wfsfactory) { super(wfsfactory); this.wfsfactory = wfsfactory; } /** * @generated */ public QName getTarget() { return WFS.UPDATEELEMENTTYPE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Class getType() { return UpdateElementType.class; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { UpdateElementType updateElement = wfsfactory.createUpdateElementType(); //<xsd:element maxOccurs="unbounded" ref="wfs:Property"/> updateElement.getProperty().addAll(node.getChildValues(PropertyType.class)); //<xsd:element maxOccurs="1" minOccurs="0" ref="ogc:Filter"> updateElement.setFilter((Filter) node.getChildValue(Filter.class)); //<xsd:attribute name="handle" type="xsd:string" use="optional"/> if (node.hasAttribute("handle")) { updateElement.setHandle((String) node.getAttributeValue("handle")); } //<xsd:attribute name="typeName" type="xsd:QName" use="required"/> updateElement.setTypeName((QName) node.getAttributeValue("typeName")); return updateElement; } @Override public Object getProperty(Object object, QName name) throws Exception { return super.getProperty(object, name); } }