Class TLcdWFSGetFeatureRequest
- All Implemented Interfaces:
ILcdOWSRequest
- Direct Known Subclasses:
TLcdWFSGetFeatureWithLockRequest
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
Modifier and TypeFieldDescriptionstatic 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 TypeMethodDescriptionReturns a key-value pair (KVP) encoding of this request.getRestEncoding
(URI aBaseURI) Returnsnull
, REST encoding is not supported.Returns an object representing data to be used by the transportation layer (seeILcdOWSTransport
) 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
setOGCFilter
(TLcdOGCFilter aFilter) Sets the OGC Filter that the WFS should apply to the requested feature type(s).void
setOGCFilters
(TLcdOGCFilter[] aFilters) Sets the OGC Filters that the WFS should apply to the requested feature types.void
setOGCSortBy
(TLcdOGCSortBy aSortBy) 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 (seeILcdOWSTransport
) 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.
-
Field Details
-
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
Result type indicating that the WFS should indicate the number of features that satisfy the request.- See Also:
-
-
Method Details
-
getTransportData
Returns an object representing data to be used by the transportation layer (seeILcdOWSTransport
) to perform this OGC Web Service request. The type of object and the data contained in it depends on theILcdOWSTransport
object used to perform this request. An example in the case of a HTTP transport connection is a map of request properties (seeURLConnection.getRequestProperties()
) to be used for the request.- Specified by:
getTransportData
in interfaceILcdOWSRequest
- Returns:
- an object representing data to be used by the transportation layer to perform this OGC Web Service request.
-
setTransportData
Sets an object representing data to be used by the transportation layer (seeILcdOWSTransport
) to perform this OGC Web Service request. The type of object and the data contained in it depends on theILcdOWSTransport
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
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
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
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
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 theBBOX
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 nullIllegalArgumentException
- if the filter cannot be encoded to XML
-
setOGCFilters
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 theBBOX
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 nullIllegalArgumentException
- if the filter array is empty or if one of the filters cannot be encoded to XML
-
setOGCSortBy
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 theFILTER
parameter from the request, if it was set.- Parameters:
aMinX
- The minimum X coordinate (longitude) of the bounding boxaMaxX
- The maximum X coordinate (longitude) of the bounding boxaMinY
- The minimum Y coordinate (latitude) of the bounding boxaMaxY
- The maximum Y coordinate (latitude) of the bounding box
-
setBoundingBox
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 toaSrsName
. 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 theFILTER
parameter from the request, if it was set.- Parameters:
aMinX
- The minimum X coordinate of the bounding boxaMaxX
- The maximum X coordinate of the bounding boxaMinY
- The minimum Y coordinate of the bounding boxaMaxY
- The maximum Y coordinate of the bounding boxaSrsName
- The srsName that corresponds to the reference system of the coordinates. A list of supported srsNames is specified by the server.
-
setResultType
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 toRESULT_TYPE_HITS
, the response only indicates the number of features that satisfy the request.- Parameters:
aResultType
- the desired response type for this request
-
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 interfaceILcdOWSRequest
- Returns:
- the key-value pair (KVP) representation of this request.
-
getXMLEncoding
Returns the XML encoding of this request. If no XML encoding is supported for this request,null
should be returned.- Specified by:
getXMLEncoding
in interfaceILcdOWSRequest
- Returns:
- the XML representation of this request.
-
getRestEncoding
Returnsnull
, REST encoding is not supported.- Specified by:
getRestEncoding
in interfaceILcdOWSRequest
- Parameters:
aBaseURI
- the base URI to be used to construct the REST encoding- Returns:
null
- Since:
- 2013.0
-