/* (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_1_0;
import javax.xml.namespace.QName;
import net.opengis.wfs.ResultTypeType;
import net.opengis.wfs.WfsFactory;
import org.geotools.xml.AbstractSimpleBinding;
import org.geotools.xml.InstanceComponent;
/**
* Binding object for the type http://www.opengis.net/wfs:ResultTypeType.
*
* <p>
* <pre>
* <code>
* <xsd:simpleType name="ResultTypeType">
* <xsd:restriction base="xsd:string">
* <xsd:enumeration value="results">
* <xsd:annotation>
* <xsd:documentation>
* Indicates that a complete response should be generated
* by the WFS. That is, all response feature instances
* should be returned to the client.
* </xsd:documentation>
* </xsd:annotation>
* </xsd:enumeration>
* <xsd:enumeration value="hits">
* <xsd:annotation>
* <xsd:documentation>
* Indicates that an empty response should be generated with
* the "numberOfFeatures" attribute set (i.e. no feature
* instances should be returned). In this manner a client may
* determine the number of feature instances that a GetFeature
* request will return without having to actually get the
* entire result set back.
* </xsd:documentation>
* </xsd:annotation>
* </xsd:enumeration>
* </xsd:restriction>
* </xsd:simpleType>
*
* </code>
* </pre>
* @generated
*/
public class ResultTypeTypeBinding extends AbstractSimpleBinding {
WfsFactory wfsfactory;
public ResultTypeTypeBinding(WfsFactory wfsfactory) {
this.wfsfactory = wfsfactory;
}
/**
* @generated
*/
public QName getTarget() {
return WFS.RESULTTYPETYPE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated modifiable
*/
public Class getType() {
return ResultTypeType.class;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated modifiable
*/
public Object parse(InstanceComponent instance, Object value)
throws Exception {
if ("results".equals(value)) {
return ResultTypeType.RESULTS_LITERAL;
}
if ("hits".equals(value)) {
return ResultTypeType.HITS_LITERAL;
}
return null;
}
}