org.geotools.data.wms.request
Class AbstractGetFeatureInfoRequest

Object
  extended by AbstractRequest
      extended by AbstractWMSRequest
          extended by 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.

Module:
modules/extension/wms (gt-wms.jar)

Field Summary
 
Fields inherited from class AbstractRequest
EXCEPTION_XML, onlineResource, properties
 
Fields inherited from interface GetFeatureInfoRequest
FEATURE_COUNT, INFO_FORMAT, QUERY_LAYERS, QUERY_X, QUERY_Y
 
Fields inherited from interface Request
REQUEST, SERVICE, VERSION, WMTVER
 
Constructor Summary
AbstractGetFeatureInfoRequest(URL onlineResource, GetMapRequest request)
          Constructs a GetFeatureInfoRequest.
 
Method Summary
 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 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, performPostOutput, processKey, requiresPost, setProperty
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Request
createResponse, getPostContentType, getProperties, performPostOutput, requiresPost, setProperty
 

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 request
request - 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 interface Request
Overrides:
getFinalURL in class AbstractRequest
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 interface GetFeatureInfoRequest
Parameters:
layer - a queryable Layer
See Also:
GetFeatureInfoRequest.addQueryLayer(org.geotools.data.ows.Layer)

setQueryLayers

public void setQueryLayers(Set 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 interface GetFeatureInfoRequest
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 interface GetFeatureInfoRequest
Parameters:
infoFormat - a value from getInfoFormats()
See Also:
GetFeatureInfoRequest.setInfoFormat(java.lang.String)

setFeatureCount

public void setFeatureCount(String featureCount)
Specified by:
setFeatureCount in interface GetFeatureInfoRequest
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 interface GetFeatureInfoRequest
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 interface GetFeatureInfoRequest
Parameters:
x - the x point, in pixels
y - 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 class AbstractRequest

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 class AbstractRequest


Copyright © 1996-2010 Geotools. All Rights Reserved.