Package org.geotools.ows.wms.request
Class AbstractGetFeatureInfoRequest
- Object
-
- AbstractRequest
-
- AbstractWMSRequest
-
- AbstractGetFeatureInfoRequest
-
- All Implemented Interfaces:
Request
,GetFeatureInfoRequest
- Direct Known Subclasses:
WMS1_0_0.GetFeatureInfoRequest
public abstract class AbstractGetFeatureInfoRequest extends AbstractWMSRequest implements GetFeatureInfoRequest
A base class for GetFeatureInfoRequests that provides some functionality.
-
-
Field Summary
-
Fields inherited from class AbstractRequest
EXCEPTION_XML, hints, onlineResource, properties
-
Fields inherited from interface GetFeatureInfoRequest
FEATURE_COUNT, INFO_FORMAT, QUERY_LAYERS, QUERY_X, QUERY_Y
-
-
Constructor Summary
Constructors Constructor Description AbstractGetFeatureInfoRequest(URL onlineResource, GetMapRequest request)
Constructs a GetFeatureInfoRequest.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addQueryLayer(Layer layer)
Add a Layer to the set of layers to be queried in the request.URL
getFinalURL()
Once the properties of the request are configured, this will return the URL that points to the server and contains all of the appropriate name/value parameters.protected String
getQueryX()
Created because the 1.3.0 spec changes this parameter name.protected String
getQueryY()
Created because the 1.3.0 spec changes this parameter name.protected void
initRequest()
protected abstract void
initVersion()
Sets up the version number for this request.void
setFeatureCount(int featureCount)
void
setFeatureCount(String featureCount)
void
setInfoFormat(String infoFormat)
Sets the INFO_FORMAT parameter, which specifies the format of the GetFeatureInfoResponse.void
setQueryLayers(Set<Layer> layers)
An unordered set of type Layer.void
setQueryPoint(int x, int y)
The point on the image (in pixels) to be queried.-
Methods inherited from class AbstractWMSRequest
initService
-
Methods inherited from class AbstractRequest
getPostContentType, getProperties, getRequestHints, performPostOutput, processKey, requiresPost, setProperty, setRequestHints
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Request
createResponse, getPostContentType, getProperties, getRequestHints, performPostOutput, requiresPost, setProperty, setRequestHints
-
-
-
-
Constructor Detail
-
AbstractGetFeatureInfoRequest
public AbstractGetFeatureInfoRequest(URL onlineResource, GetMapRequest request)
Constructs a GetFeatureInfoRequest. It will set the REQUEST and VERSION parameters, over-writing and values set there previously.- Parameters:
onlineResource
- the URL pointing to the place to execute a GetFeatureInfo requestrequest
- a previously configured GetMapRequest that the query will be executed on
-
-
Method Detail
-
getFinalURL
public URL getFinalURL()
Description copied from interface:Request
Once the properties of the request are configured, this will return the URL that points to the server and contains all of the appropriate name/value parameters.- Specified by:
getFinalURL
in interfaceRequest
- Overrides:
getFinalURL
in classAbstractRequest
- Returns:
- a URL that can be used to issue the request
- See Also:
org.geotools.data.wms.request.Request#getFinalURL()
-
addQueryLayer
public void addQueryLayer(Layer layer)
Description copied from interface:GetFeatureInfoRequest
Add a Layer to the set of layers to be queried in the request. This Layer must have queryable set to true.- Specified by:
addQueryLayer
in interfaceGetFeatureInfoRequest
- Parameters:
layer
- a queryable Layer- See Also:
GetFeatureInfoRequest.addQueryLayer(Layer)
-
setQueryLayers
public void setQueryLayers(Set<Layer> layers)
Description copied from interface:GetFeatureInfoRequest
An unordered set of type Layer. These are the layers that the GetFeatureInfo request will be performed on.- Specified by:
setQueryLayers
in interfaceGetFeatureInfoRequest
- Parameters:
layers
- A Set of type Layer, each to be queried- See Also:
GetFeatureInfoRequest.setQueryLayers(java.util.Set)
-
setInfoFormat
public void setInfoFormat(String infoFormat)
Description copied from interface:GetFeatureInfoRequest
Sets the INFO_FORMAT parameter, which specifies the format of the GetFeatureInfoResponse. Valid values are available in getInfoFormats()- Specified by:
setInfoFormat
in interfaceGetFeatureInfoRequest
- Parameters:
infoFormat
- a value from getInfoFormats()- See Also:
GetFeatureInfoRequest.setInfoFormat(java.lang.String)
-
setFeatureCount
public void setFeatureCount(String featureCount)
- Specified by:
setFeatureCount
in interfaceGetFeatureInfoRequest
- Parameters:
featureCount
- the maximum number of features to return in the response- See Also:
GetFeatureInfoRequest.setFeatureCount(java.lang.String)
-
setFeatureCount
public void setFeatureCount(int featureCount)
- Specified by:
setFeatureCount
in interfaceGetFeatureInfoRequest
- Parameters:
featureCount
- the maximum number of features to return in the response- See Also:
GetFeatureInfoRequest.setFeatureCount(int)
-
setQueryPoint
public void setQueryPoint(int x, int y)
Description copied from interface:GetFeatureInfoRequest
The point on the image (in pixels) to be queried. The image is represented by the GetMapRequest passed into the constructor.- Specified by:
setQueryPoint
in interfaceGetFeatureInfoRequest
- Parameters:
x
- the x point, in pixelsy
- the y point, in pixels- See Also:
GetFeatureInfoRequest.setQueryPoint(int, int)
-
getQueryX
protected String getQueryX()
Created because the 1.3.0 spec changes this parameter name. The 1.3.0 spec should over-ride this method.- Returns:
- a String representing the x-axis query point
-
getQueryY
protected String getQueryY()
Created because the 1.3.0 spec changes this parameter name. The 1.3.0 spec should over-ride this method.- Returns:
- a String representing the y-axis query point
-
initRequest
protected void initRequest()
- Specified by:
initRequest
in classAbstractRequest
-
initVersion
protected abstract void initVersion()
Description copied from class:AbstractRequest
Sets up the version number for this request. Typically something like setProperty("VERSION", "1.1.1");- Specified by:
initVersion
in classAbstractRequest
-
-