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.wfs.xml.v1_0_0;
006:
007: import net.opengis.wfs.DescribeFeatureTypeType;
008: import net.opengis.wfs.WfsFactory;
009: import org.geotools.xml.AbstractComplexBinding;
010: import org.geotools.xml.ElementInstance;
011: import org.geotools.xml.Node;
012: import javax.xml.namespace.QName;
013:
014: /**
015: * Binding object for the type http://www.opengis.net/wfs:DescribeFeatureTypeType.
016: *
017: * <p>
018: * <pre>
019: * <code>
020: * <xsd:complexType name="DescribeFeatureTypeType">
021: * <xsd:annotation>
022: * <xsd:documentation> The DescribeFeatureType
023: * operation allows a client application to request
024: * that a Web Feature Service describe one or more
025: * feature types. A Web Feature Service must be able to
026: * generate feature descriptions as valid GML2
027: * application schemas. The schemas generated by
028: * the DescribeFeatureType operation can be used by
029: * a client application to validate the output.
030: * Feature instances within the WFS interface must be specified
031: * using GML2. The schema of feature instances specified
032: * within the WFS interface must validate against
033: * the feature schemas generated by the
034: * DescribeFeatureType request. </xsd:documentation>
035: * </xsd:annotation> <xsd:sequence> <xsd:element
036: * maxOccurs="unbounded" minOccurs="0" name="TypeName"
037: * type="xsd:QName"> <xsd:annotation>
038: * <xsd:documentation> The TypeName
039: * element is used to enumerate the feature types
040: * to be described. If no TypeName elements are
041: * specified then all features should
042: * be described. </xsd:documentation>
043: * </xsd:annotation> </xsd:element>
044: * </xsd:sequence> <xsd:attribute fixed="1.0.0" name="version"
045: * type="xsd:string" use="required"/> <xsd:attribute
046: * fixed="WFS" name="service" type="xsd:string" use="required"/>
047: * <xsd:attribute default="XMLSCHEMA" name="outputFormat"
048: * type="xsd:string" use="optional"> <xsd:annotation>
049: * <xsd:documentation> The outputFormat
050: * attribute is used to specify what schema
051: * description language should be used to describe
052: * features. The default value of XMLSCHEMA
053: * means that the Web Feature Service must
054: * generate a GML2 application schema that can
055: * be used to validate the GML2 output of a GetFeature
056: * request or feature instances specified in
057: * Transaction operations. </xsd:documentation>
058: * </xsd:annotation> </xsd:attribute> </xsd:complexType>
059: *
060: * </code>
061: * </pre>
062: * </p>
063: *
064: * @generated
065: */
066: public class DescribeFeatureTypeTypeBinding extends
067: AbstractComplexBinding {
068: WfsFactory wfsfactory;
069:
070: public DescribeFeatureTypeTypeBinding(WfsFactory wfsfactory) {
071: this .wfsfactory = wfsfactory;
072: }
073:
074: /**
075: * @generated
076: */
077: public QName getTarget() {
078: return WFS.DESCRIBEFEATURETYPETYPE;
079: }
080:
081: /**
082: * <!-- begin-user-doc -->
083: * <!-- end-user-doc -->
084: *
085: * @generated modifiable
086: */
087: public Class getType() {
088: return DescribeFeatureTypeType.class;
089: }
090:
091: /**
092: * <!-- begin-user-doc -->
093: * <!-- end-user-doc -->
094: *
095: * @generated modifiable
096: */
097: public Object parse(ElementInstance instance, Node node,
098: Object value) throws Exception {
099: DescribeFeatureTypeType describeFeatureType = wfsfactory
100: .createDescribeFeatureTypeType();
101:
102: WFSBindingUtils.service(describeFeatureType, node);
103: WFSBindingUtils.version(describeFeatureType, node);
104: WFSBindingUtils.outputFormat(describeFeatureType, node,
105: "XMLSCHEMA");
106:
107: describeFeatureType.getTypeName().addAll(
108: node.getChildValues(QName.class));
109:
110: return describeFeatureType;
111: }
112: }
|