001: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
002: * This code is licensed under the GPL 2.0 license, availible at the root
003: * application directory.
004: */
005: package org.geoserver.wfsv.xml.v1_1_0;
006:
007: import net.opengis.wfsv.DifferenceQueryType;
008: import net.opengis.wfsv.WfsvFactory;
009: import org.geotools.xml.*;
010: import org.opengis.filter.Filter;
011: import javax.xml.namespace.QName;
012:
013: /**
014: * Binding object for the type http://www.opengis.net/wfsv:DifferenceQueryType.
015: *
016: * <p>
017: *
018: * <pre>
019: * <code>
020: * <xsd:complexType name="DifferenceQueryType">
021: * <xsd:sequence>
022: * <xsd:element maxOccurs="1" minOccurs="0" ref="ogc:Filter">
023: * <xsd:annotation>
024: * <xsd:documentation>
025: * The Filter element is used to define spatial and/or non-spatial
026: * constraints on query. Spatial constrains use GML3 to specify
027: * the constraining geometry. A full description of the Filter
028: * element can be found in the Filter Encoding Implementation
029: * Specification.
030: * </xsd:documentation>
031: * </xsd:annotation>
032: * </xsd:element>
033: * </xsd:sequence>
034: * <xsd:attribute name="typeName" type="xsd:QName" use="required">
035: * <xsd:annotation>
036: * <xsd:documentation>
037: * The typeName attribute is a single feature type name that indicates which type
038: * of feature instances should be included in the reponse set.
039: * The names must be a valid type that belong to this query's feature content
040: * as defined by the GML Application Schema.
041: * </xsd:documentation>
042: * </xsd:annotation>
043: * </xsd:attribute>
044: * <xsd:attribute default="FIRST" name="fromFeatureVersion" type="xsd:string">
045: * <xsd:annotation>
046: * <xsd:documentation>
047: * Same as featureVersion in QueryType, but this indicates a starting feature version
048: * for a difference and log operations.
049: * </xsd:documentation>
050: * </xsd:annotation>
051: * </xsd:attribute>
052: * <xsd:attribute default="LAST" name="toFeatureVersion"
053: * type="xsd:string" use="optional">
054: * <xsd:annotation>
055: * <xsd:documentation>
056: * Same as featureVersion in QueryType, indicates the second version to be used for
057: * performing a difference of log operation.
058: * </xsd:documentation>
059: * </xsd:annotation>
060: * </xsd:attribute>
061: * </xsd:complexType>
062: *
063: * </code>
064: * </pre>
065: *
066: * </p>
067: *
068: * @generated
069: */
070: public class DifferenceQueryTypeBinding extends AbstractComplexBinding {
071: private WfsvFactory wfsvFactory;
072:
073: public DifferenceQueryTypeBinding(WfsvFactory wfsvFactory) {
074: this .wfsvFactory = wfsvFactory;
075: }
076:
077: /**
078: * @generated
079: */
080: public QName getTarget() {
081: return WFSV.DifferenceQueryType;
082: }
083:
084: /**
085: * <!-- begin-user-doc --> <!-- end-user-doc -->
086: *
087: * @generated modifiable
088: */
089: public Class getType() {
090: return DifferenceQueryType.class;
091: }
092:
093: /**
094: * <!-- begin-user-doc --> <!-- end-user-doc -->
095: *
096: * @generated modifiable
097: */
098: public Object parse(ElementInstance instance, Node node,
099: Object value) throws Exception {
100: DifferenceQueryType result = wfsvFactory
101: .createDifferenceQueryType();
102: result.setTypeName((QName) node.getAttributeValue("typeName"));
103:
104: if (node.hasChild(Filter.class)) {
105: result.setFilter((Filter) node.getChildValue(Filter.class));
106: }
107:
108: if (node.hasAttribute("fromFeatureVersion"))
109: result.setFromFeatureVersion((String) node
110: .getAttributeValue("fromFeatureVersion"));
111: if (node.hasAttribute("toFeatureVersion"))
112: result.setToFeatureVersion((String) node
113: .getAttributeValue("toFeatureVersion"));
114:
115: return result;
116: }
117: }
|