public class TLcdWFSGetFeatureRequest extends Object implements ILcdOWSRequest
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.Modifier and Type | Field and Description |
---|---|
static String |
RESULT_TYPE_HITS
Result type indicating that the WFS should generate a complete response,
containing all the features that satisfy the request.
|
static String |
RESULT_TYPE_RESULTS
Result type indicating that the WFS should indicate the number of features
that satisfy the request.
|
Modifier and Type | Method and Description |
---|---|
Map |
getKVPEncoding()
Returns a key-value pair (KVP) encoding of this request.
|
URI |
getRestEncoding(URI aBaseURI)
Returns
null , REST encoding is not supported. |
Object |
getTransportData()
Returns an object representing data to be used by the transportation layer (see
ILcdOWSTransport )
to perform this OGC Web Service request. |
InputStream |
getXMLEncoding()
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
(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.
|
public static final String RESULT_TYPE_HITS
public static final String RESULT_TYPE_RESULTS
public Object getTransportData()
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.getTransportData
in interface ILcdOWSRequest
public void setTransportData(Object aTransportData)
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.aTransportData
- an object representing data to be used by the transportation layer
to perform this OGC Web Service request.getTransportData()
public void setTypeName(QName aTypeName)
aTypeName
- a feature type nameNullPointerException
- if the feature type name is nullsetTypeNames(javax.xml.namespace.QName[])
public void setTypeNames(QName[] aTypeNames)
aTypeNames
- the feature type namesNullPointerException
- if the type name array is null or contains null valuessetTypeName(javax.xml.namespace.QName)
public void setMaxFeatures(int aMaxFeatures)
aMaxFeatures
- a maximum number of featuresIllegalArgumentException
- if the number is not strictly positivepublic void setOutputFormat(String aOutputFormat)
aOutputFormat
- the output format that the WFS should use to encode a response to a query.NullPointerException
- if the output format is nullpublic void setOGCFilter(TLcdOGCFilter aFilter)
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.
aFilter
- the OGC Filter that the WFS should apply to the requested feature type(s).NullPointerException
- if the filter is nullIllegalArgumentException
- if the filter cannot be encoded to XMLpublic void setOGCFilters(TLcdOGCFilter[] aFilters)
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.
aFilters
- the OGC Filters that the WFS should apply to the requested feature types.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 XMLpublic void setOGCSortBy(TLcdOGCSortBy aSortBy)
aSortBy
- the OGC SortBy that the WFS should apply to the requested feature type(s).NullPointerException
- if the SortBy is nullpublic void setBoundingBox(double aMinX, double aMaxX, double aMinY, double aMaxY)
FILTER
parameter from the
request, if it was set.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 boxpublic void setBoundingBox(double aMinX, double aMaxX, double aMinY, double aMaxY, String aSrsName)
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.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.public void setResultType(String aResultType)
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.
aResultType
- the desired response type for this requestpublic Map getKVPEncoding()
null
should be returned.getKVPEncoding
in interface ILcdOWSRequest
public InputStream getXMLEncoding()
null
should be returned.getXMLEncoding
in interface ILcdOWSRequest
public URI getRestEncoding(URI aBaseURI)
null
, REST encoding is not supported.getRestEncoding
in interface ILcdOWSRequest
aBaseURI
- the base URI to be used to construct the REST encodingnull