Class TLcdWFSGetFeatureRequest

java.lang.Object
com.luciad.ogc.wfs.client.TLcdWFSGetFeatureRequest
All Implemented Interfaces:
ILcdOWSRequest
Direct Known Subclasses:
TLcdWFSGetFeatureWithLockRequest

public class TLcdWFSGetFeatureRequest extends Object implements ILcdOWSRequest
A WFS GetFeature request. Instances of this class can be created using the TLcdWFSClient.createGetFeatureRequest() method. This method will ensure a request object is created that is compatible with the WFS version implemented by the WFS server.
Since:
8.2
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Result type indicating that the WFS should generate a complete response, containing all the features that satisfy the request.
    static final String
    Result type indicating that the WFS should indicate the number of features that satisfy the request.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a key-value pair (KVP) encoding of this request.
    getRestEncoding(URI aBaseURI)
    Returns null, REST encoding is not supported.
    Returns an object representing data to be used by the transportation layer (see ILcdOWSTransport) to perform this OGC Web Service request.
    Returns the XML encoding of this request.
    void
    setBoundingBox(double aMinX, double aMaxX, double aMinY, double aMaxY)
    Sets the bounding box that the WFS should use to filter the requested feature type(s).
    void
    setBoundingBox(double aMinX, double aMaxX, double aMinY, double aMaxY, String aSrsName)
    Sets the bounding box that the WFS should use to filter the requested feature type(s).
    void
    setMaxFeatures(int aMaxFeatures)
    Sets the maximum number of features that the WFS should return in response to a query.
    void
    Sets the OGC Filter that the WFS should apply to the requested feature type(s).
    void
    Sets the OGC Filters that the WFS should apply to the requested feature types.
    void
    Sets the OGC SortBy that the WFS should apply to the requested feature type(s).
    void
    setOutputFormat(String aOutputFormat)
    Sets the output format that the WFS should use to encode a response to a query.
    void
    setResultType(String aResultType)
    Sets the desired response type for this request.
    void
    setTransportData(Object aTransportData)
    Sets an object representing data to be used by the transportation layer (see ILcdOWSTransport) to perform this OGC Web Service request.
    void
    setTypeName(QName aTypeName)
    Sets the feature type name to query.
    void
    setTypeNames(QName[] aTypeNames)
    Sets the feature type names to query.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • RESULT_TYPE_HITS

      public static final String RESULT_TYPE_HITS
      Result type indicating that the WFS should generate a complete response, containing all the features that satisfy the request.
      See Also:
    • RESULT_TYPE_RESULTS

      public static final String RESULT_TYPE_RESULTS
      Result type indicating that the WFS should indicate the number of features that satisfy the request.
      See Also:
  • Method Details

    • getTransportData

      public Object getTransportData()
      Returns an object representing data to be used by the transportation layer (see ILcdOWSTransport) to perform this OGC Web Service request. The type of object and the data contained in it depends on the ILcdOWSTransport object used to perform this request.

      An example in the case of a HTTP transport connection is a map of request properties (see URLConnection.getRequestProperties()) to be used for the request.

      Specified by:
      getTransportData in interface ILcdOWSRequest
      Returns:
      an object representing data to be used by the transportation layer to perform this OGC Web Service request.
    • setTransportData

      public void setTransportData(Object aTransportData)
      Sets an object representing data to be used by the transportation layer (see ILcdOWSTransport) to perform this OGC Web Service request. The type of object and the data contained in it depends on the ILcdOWSTransport object used to perform this request.
      Parameters:
      aTransportData - an object representing data to be used by the transportation layer to perform this OGC Web Service request.
      See Also:
    • setTypeName

      public void setTypeName(QName aTypeName)
      Sets the feature type name to query. All previously set names will be cleared.
      Parameters:
      aTypeName - a feature type name
      Throws:
      NullPointerException - if the feature type name is null
      See Also:
    • setTypeNames

      public void setTypeNames(QName[] aTypeNames)
      Sets the feature type names to query. All previously set names will be cleared.
      Parameters:
      aTypeNames - the feature type names
      Throws:
      NullPointerException - if the type name array is null or contains null values
      See Also:
    • setMaxFeatures

      public void setMaxFeatures(int aMaxFeatures)
      Sets the maximum number of features that the WFS should return in response to a query.
      Parameters:
      aMaxFeatures - a maximum number of features
      Throws:
      IllegalArgumentException - if the number is not strictly positive
    • setOutputFormat

      public void setOutputFormat(String aOutputFormat)
      Sets the output format that the WFS should use to encode a response to a query.
      Parameters:
      aOutputFormat - the output format that the WFS should use to encode a response to a query.
      Throws:
      NullPointerException - if the output format is null
    • setOGCFilter

      public void setOGCFilter(TLcdOGCFilter aFilter)
      Sets the OGC Filter that the WFS should apply to the requested feature type(s).

      When OGC Filters are used in a request, their amount should be equal to the amount of feature types to be requested. This method only accepts one OGC Filter; if there are multiple feature types requested, the supplied OGC Filter will be used for each feature type. Alternatively, you can use the method setOGCFilters(com.luciad.ogc.filter.model.TLcdOGCFilter[]), which accepts multiple OGC Filter instances.

      Note that this parameter is mutually exclusive with BBOX: setting an OGC Filter will remove the BBOX parameter from the request, if it was set.

      Parameters:
      aFilter - the OGC Filter that the WFS should apply to the requested feature type(s).
      Throws:
      NullPointerException - if the filter is null
      IllegalArgumentException - if the filter cannot be encoded to XML
    • setOGCFilters

      public void setOGCFilters(TLcdOGCFilter[] aFilters)
      Sets the OGC Filters that the WFS should apply to the requested feature types.

      When OGC Filters are used in a request, their amount should be equal to the amount of feature types to be requested. The length of the supplied OGC Filter array should therefore match the number of requested feature types, when sending this request to a WFS.

      Note that this parameter is mutually exclusive with BBOX: using OGC Filters will remove the BBOX parameter from the request, if it was set.

      Parameters:
      aFilters - the OGC Filters that the WFS should apply to the requested feature types.
      Throws:
      NullPointerException - if the filter array or one of the filters is null
      IllegalArgumentException - if the filter array is empty or if one of the filters cannot be encoded to XML
    • setOGCSortBy

      public void setOGCSortBy(TLcdOGCSortBy aSortBy)
      Sets the OGC SortBy that the WFS should apply to the requested feature type(s). A SortBy element defines a list of properties that must be taken into account by the WFS for sorting the result.
      Parameters:
      aSortBy - the OGC SortBy that the WFS should apply to the requested feature type(s).
      Throws:
      NullPointerException - if the SortBy is null
    • setBoundingBox

      public void setBoundingBox(double aMinX, double aMaxX, double aMinY, double aMaxY)
      Sets the bounding box that the WFS should use to filter the requested feature type(s). The coordinates are specified in the WGS84 reference system, where X=longitude and Y=latitude.

      This parameter is only considered for KVP encoded requests, because it is only used as a shorthand representation of a bounding box filter - which would be expressed in a much longer form using XML.

      Note that this parameter is mutually exclusive with an OGC Filter: setting a bounding box will remove the FILTER parameter from the request, if it was set.

      Parameters:
      aMinX - The minimum X coordinate (longitude) of the bounding box
      aMaxX - The maximum X coordinate (longitude) of the bounding box
      aMinY - The minimum Y coordinate (latitude) of the bounding box
      aMaxY - The maximum Y coordinate (latitude) of the bounding box
    • setBoundingBox

      public void setBoundingBox(double aMinX, double aMaxX, double aMinY, double aMaxY, String aSrsName)
      Sets the bounding box that the WFS should use to filter the requested feature type(s). The coordinates are specified in the reference system that corresponds to aSrsName.

      This parameter is only considered for KVP encoded requests, because it is only used as a shorthand representation of a bounding box filter - which would be expressed in a much longer form using XML.

      Note that this parameter is mutually exclusive with an OGC Filter: setting a bounding box will remove the FILTER parameter from the request, if it was set.

      Parameters:
      aMinX - The minimum X coordinate of the bounding box
      aMaxX - The maximum X coordinate of the bounding box
      aMinY - The minimum Y coordinate of the bounding box
      aMaxY - The maximum Y coordinate of the bounding box
      aSrsName - The srsName that corresponds to the reference system of the coordinates. A list of supported srsNames is specified by the server.
    • setResultType

      public void setResultType(String aResultType)
      Sets the desired response type for this request.

      If set to RESULT_TYPE_RESULTS, a complete response is generated by the WFS, containing all the features that satisfy the request. This is the default settings used by a WFS if this parameter is not set. If set to RESULT_TYPE_HITS, the response only indicates the number of features that satisfy the request.

      Parameters:
      aResultType - the desired response type for this request
    • getKVPEncoding

      public Map getKVPEncoding()
      Returns a key-value pair (KVP) encoding of this request.

      If no key-value pairs are defined, an empty map should be returned. If no key-value pair encoding is supported for this request, null should be returned.

      Specified by:
      getKVPEncoding in interface ILcdOWSRequest
      Returns:
      the key-value pair (KVP) representation of this request.
    • getXMLEncoding

      public InputStream getXMLEncoding()
      Returns the XML encoding of this request.

      If no XML encoding is supported for this request, nullshould be returned.

      Specified by:
      getXMLEncoding in interface ILcdOWSRequest
      Returns:
      the XML representation of this request.
    • getRestEncoding

      public URI getRestEncoding(URI aBaseURI)
      Returns null, REST encoding is not supported.
      Specified by:
      getRestEncoding in interface ILcdOWSRequest
      Parameters:
      aBaseURI - the base URI to be used to construct the REST encoding
      Returns:
      null
      Since:
      2013.0