Class QueryTypeBinding

  • All Implemented Interfaces:
    Binding, ComplexBinding
    Direct Known Subclasses:
    QueryTypeBinding

    public class QueryTypeBinding
    extends AbstractComplexEMFBinding
    Binding object for the type http://www.opengis.net/wfs:QueryType.

             <code>
      <xsd:complexType name="QueryType">
          <xsd:annotation>
              <xsd:documentation>
                  The Query element is of type QueryType.
               </xsd:documentation>
          </xsd:annotation>
          <xsd:sequence>
              <xsd:choice maxOccurs="unbounded" minOccurs="0">
                  <xsd:element ref="wfs:PropertyName">
                      <xsd:annotation>
                          <xsd:documentation>
                         The Property element is used to specify one or more
                         properties of a feature whose values are to be retrieved
                         by a Web Feature Service.
                         While a Web Feature Service should endeavour to satisfy
                         the exact request specified, in some instance this may
                         not be possible.  Specifically, a Web Feature Service
                         must generate a valid GML3 response to a Query operation.
                         The schema used to generate the output may include
                         properties that are mandatory.  In order that the output
                         validates, these mandatory properties must be specified
                         in the request.  If they are not, a Web Feature Service
                         may add them automatically to the Query before processing
                         it.  Thus a client application should, in general, be
                         prepared to receive more properties than it requested.
                         Of course, using the DescribeFeatureType request, a client
                         application can determine which properties are mandatory
                         and request them in the first place.
                      </xsd:documentation>
                      </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="wfs:XlinkPropertyName"/>
                  <xsd:element ref="ogc:Function">
                      <xsd:annotation>
                          <xsd:documentation>
                         A function may be used as a select item in a query.
                         However, if a function is used, care must be taken
                         to ensure that the result type matches the type in the
                      </xsd:documentation>
                      </xsd:annotation>
                  </xsd:element>
              </xsd:choice>
              <xsd:element maxOccurs="1" minOccurs="0" ref="ogc:Filter">
                  <xsd:annotation>
                      <xsd:documentation>
                      The Filter element is used to define spatial and/or non-spatial
                      constraints on query.  Spatial constrains use GML3 to specify
                      the constraining geometry.  A full description of the Filter
                      element can be found in the Filter Encoding Implementation
                      Specification.
                   </xsd:documentation>
                  </xsd:annotation>
              </xsd:element>
              <xsd:element maxOccurs="1" minOccurs="0" ref="ogc:SortBy">
                  <xsd:annotation>
                      <xsd:documentation>
                      The SortBy element is used specify property names whose
                      values should be used to order (upon presentation) the
                      set of feature instances that satisfy the query.
                   </xsd:documentation>
                  </xsd:annotation>
              </xsd:element>
          </xsd:sequence>
          <xsd:attribute name="handle" type="xsd:string" use="optional">
              <xsd:annotation>
                  <xsd:documentation>
                     The handle attribute allows a client application
                     to assign a client-generated identifier for the
                     Query.  The handle is included to facilitate error
                     reporting.  If one Query in a GetFeature request
                     causes an exception, a WFS may report the handle
                     to indicate which query element failed.  If the a
                     handle is not present, the WFS may use other means
                     to localize the error (e.g. line numbers).
                  </xsd:documentation>
              </xsd:annotation>
          </xsd:attribute>
          <xsd:attribute name="typeName" type="wfs:TypeNameListType" use="required">
              <xsd:annotation>
                  <xsd:documentation>
                    The typeName attribute is a list of one or more
                    feature type names that indicate which types
                    of feature instances should be included in the
                    reponse set.  Specifying more than one typename
                    indicates that a join operation is being performed.
                    All the names in the typeName list must be valid
                    types that belong to this query's feature content
                    as defined by the GML Application Schema.
                 </xsd:documentation>
              </xsd:annotation>
          </xsd:attribute>
          <xsd:attribute name="featureVersion" type="xsd:string" use="optional">
              <xsd:annotation>
                  <xsd:documentation>
                    For systems that implement versioning, the featureVersion
                    attribute is used to specify which version of a particular
                    feature instance is to be retrieved.  A value of ALL means
                    that all versions should be retrieved.  An integer value
                    'i', means that the ith version should be retrieve if it
                    exists or the most recent version otherwise.
                 </xsd:documentation>
              </xsd:annotation>
          </xsd:attribute>
          <xsd:attribute name="srsName" type="xsd:anyURI" use="optional">
              <xsd:annotation>
                  <xsd:documentation>
                    This attribute is used to specify a specific WFS-supported SRS
                    that should be used for returned feature geometries.  The value
                    may be the WFS StorageSRS value, DefaultRetrievalSRS value, or
                    one of AdditionalSRS values.  If no srsName value is supplied,
                    then the features will be returned using either the
                    DefaultRetrievalSRS, if specified, and StorageSRS otherwise.
                    For feature types with no spatial properties, this attribute
                    must not be specified or ignored if it is specified.
                 </xsd:documentation>
              </xsd:annotation>
          </xsd:attribute>
      </xsd:complexType>
     </code>
     
    • Constructor Detail

      • QueryTypeBinding

        public QueryTypeBinding​(WfsFactory factory)
    • Method Detail

      • getTarget

        public QName getTarget()
        Returns:
        The qualified name of the target for the binding.
      • getProperty

        public Object getProperty​(Object object,
                                  QName name)
                           throws Exception
        Overrides to return the value of the "typeName" attribute as a single String instead of a List. Otherwise typeName gets encoded as the QueryType.getTypeName() toString's value which depends on the toString implementation of the internal java.util.List.

        Also, if the requested property is "SortBy" and the QueryType has an empty sortby list, returns null to avoid encoding an empty sortBy list

        Specified by:
        getProperty in interface ComplexBinding
        Overrides:
        getProperty in class AbstractComplexEMFBinding
        Parameters:
        object - The object being encoded.
        name - The name of the property to obtain.
        Returns:
        The value of the property, or null.
        Throws:
        Exception
        See Also:
        ComplexBinding.getProperty(Object, QName)