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, propertiesFields inherited from interface GetFeatureInfoRequest
FEATURE_COUNT, INFO_FORMAT, QUERY_LAYERS, QUERY_X, QUERY_Y -
Constructor Summary
ConstructorsConstructorDescriptionAbstractGetFeatureInfoRequest(URL onlineResource, GetMapRequest request) Constructs a GetFeatureInfoRequest. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddQueryLayer(Layer layer) Add a Layer to the set of layers to be queried in the 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.protected StringCreated because the 1.3.0 spec changes this parameter name.protected StringCreated because the 1.3.0 spec changes this parameter name.protected voidprotected abstract voidSets up the version number for this request.voidsetFeatureCount(int featureCount) voidsetFeatureCount(String featureCount) voidsetInfoFormat(String infoFormat) Sets the INFO_FORMAT parameter, which specifies the format of the GetFeatureInfoResponse.voidsetQueryLayers(Set<Layer> layers) An unordered set of type Layer.voidsetQueryPoint(int x, int y) The point on the image (in pixels) to be queried.Methods inherited from class AbstractWMSRequest
initServiceMethods inherited from class AbstractRequest
getPostContentType, getProperties, getRequestHints, performPostOutput, processKey, requiresPost, setProperty, setRequestHintsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Request
createResponse, getPostContentType, getProperties, getRequestHints, performPostOutput, requiresPost, setProperty, setRequestHints
-
Constructor Details
-
AbstractGetFeatureInfoRequest
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 Details
-
getFinalURL
Description copied from interface:RequestOnce 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:
getFinalURLin interfaceRequest- Overrides:
getFinalURLin classAbstractRequest- Returns:
- a URL that can be used to issue the request
- See Also:
-
org.geotools.data.wms.request.Request#getFinalURL()
-
addQueryLayer
Description copied from interface:GetFeatureInfoRequestAdd a Layer to the set of layers to be queried in the request. This Layer must have queryable set to true.- Specified by:
addQueryLayerin interfaceGetFeatureInfoRequest- Parameters:
layer- a queryable Layer- See Also:
-
setQueryLayers
Description copied from interface:GetFeatureInfoRequestAn unordered set of type Layer. These are the layers that the GetFeatureInfo request will be performed on.- Specified by:
setQueryLayersin interfaceGetFeatureInfoRequest- Parameters:
layers- A Set of type Layer, each to be queried- See Also:
-
setInfoFormat
Description copied from interface:GetFeatureInfoRequestSets the INFO_FORMAT parameter, which specifies the format of the GetFeatureInfoResponse. Valid values are available in getInfoFormats()- Specified by:
setInfoFormatin interfaceGetFeatureInfoRequest- Parameters:
infoFormat- a value from getInfoFormats()- See Also:
-
setFeatureCount
- Specified by:
setFeatureCountin interfaceGetFeatureInfoRequest- Parameters:
featureCount- the maximum number of features to return in the response- See Also:
-
setFeatureCount
public void setFeatureCount(int featureCount) - Specified by:
setFeatureCountin interfaceGetFeatureInfoRequest- Parameters:
featureCount- the maximum number of features to return in the response- See Also:
-
setQueryPoint
public void setQueryPoint(int x, int y) Description copied from interface:GetFeatureInfoRequestThe point on the image (in pixels) to be queried. The image is represented by the GetMapRequest passed into the constructor.- Specified by:
setQueryPointin interfaceGetFeatureInfoRequest- Parameters:
x- the x point, in pixelsy- the y point, in pixels- See Also:
-
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
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:
initRequestin classAbstractRequest
-
initVersion
protected abstract void initVersion()Description copied from class:AbstractRequestSets up the version number for this request. Typically something like setProperty("VERSION", "1.1.1");- Specified by:
initVersionin classAbstractRequest
-