org.geotools.data.wms.request
Class AbstractGetFeatureInfoRequest

java.lang.Object
  extended byorg.geotools.data.wms.request.AbstractRequest
      extended byorg.geotools.data.wms.request.AbstractGetFeatureInfoRequest
All Implemented Interfaces:
GetFeatureInfoRequest, Request
Direct Known Subclasses:
WMS1_0_0.GetFeatureInfoRequest

public abstract class AbstractGetFeatureInfoRequest
extends AbstractRequest
implements GetFeatureInfoRequest

A base class for GetFeatureInfoRequests that provides some functionality.


Field Summary
 
Fields inherited from class org.geotools.data.wms.request.AbstractRequest
EXCEPTION_XML, onlineResource, properties
 
Fields inherited from interface org.geotools.data.wms.request.GetFeatureInfoRequest
FEATURE_COUNT, INFO_FORMAT, QUERY_LAYERS, QUERY_X, QUERY_Y
 
Fields inherited from interface org.geotools.data.wms.request.Request
REQUEST, SERVICE, VERSION, WMTVER
 
Constructor Summary
AbstractGetFeatureInfoRequest(java.net.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.
 java.net.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  java.lang.String getQueryX()
          Created because the 1.3.0 spec changes this parameter name.
protected  java.lang.String getQueryY()
          Created because the 1.3.0 spec changes this parameter name.
protected  void initRequest()
           
protected abstract  void initVersion()
           
 void setFeatureCount(int featureCount)
           
 void setFeatureCount(java.lang.String featureCount)
           
 void setInfoFormat(java.lang.String infoFormat)
          Sets the INFO_FORMAT parameter, which specifies the format of the GetFeatureInfoResponse.
 void setQueryLayers(java.util.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 org.geotools.data.wms.request.AbstractRequest
getProperties, processKey, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.data.wms.request.Request
getProperties, setProperty
 

Constructor Detail

AbstractGetFeatureInfoRequest

public AbstractGetFeatureInfoRequest(java.net.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 java.net.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
See Also:
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(java.util.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(java.lang.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(java.lang.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 java.lang.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 java.lang.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()

initVersion

protected abstract void initVersion()


Copyright © GeoTools. All Rights Reserved.