deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.ogcwebservices.wms.operation
Class GetFeatureInfo

java.lang.Object
  extended by org.deegree.ogcwebservices.AbstractOGCWebServiceRequest
      extended by org.deegree.ogcwebservices.wms.operation.WMSRequestBase
          extended by org.deegree.ogcwebservices.wms.operation.GetFeatureInfo
All Implemented Interfaces:
java.io.Serializable, OGCWebServiceRequest

public class GetFeatureInfo
extends WMSRequestBase

Version:
$Revision: 19752 $ $Date: 2009-09-24 12:04:55 +0200 (Do, 24 Sep 2009) $
Author:
Katharina Lupp Katharina Lupp
See Also:
Serialized Form

Method Summary
 void addQueryLayers(java.lang.String queryLayers)
          adds the
static GetFeatureInfo create(java.util.Map<java.lang.String,java.lang.String> model)
          creates a WMSFeatureInfoRequest from a HashMap that contains the request parameters as key-value-pairs.
static GetFeatureInfo create(java.lang.String version, java.lang.String id, java.lang.String[] queryLayers, GetMap getMapRequestCopy, java.lang.String infoFormat, int featureCount, java.awt.Point clickPoint, java.lang.String exceptions, StyledLayerDescriptor sld, java.util.Map<java.lang.String,java.lang.String> vendorSpecificParameter)
          creates a WMSFeatureInfoRequest from the request parameters.
 java.awt.Point getClickPoint()
          The required X and Y parameters indicate a point of interest on the map.
 java.lang.String getExceptions()
          The optional EXCEPTIONS parameter states the manner in which errors are to be reported to the client.
 int getFeatureCount()
          The optional FEATURE_COUNT parameter states the maximum number of features for which feature information should be returned.
 GetMap getGetMapRequestCopy()
           is not a name/value pair like the other parameters.
 java.lang.String getInfoFormat()
          The optional INFO_FORMAT indicates what format to use when returning the feature information.
 java.lang.String[] getQueryLayers()
          The required QUERY_LAYERS parameter states the map layer(s) from which feature information is desired to be retrieved.
 java.lang.String getRequestParameter()
          returns the parameter of a HTTP GET request.
 StyledLayerDescriptor getStyledLayerDescriptor()
          returns the SLD the request is made of.
 boolean isInfoFormatDefault()
           
 void setClickPoint(java.awt.Point clickPoint)
          sets the
 void setExceptions(java.lang.String exceptions)
          sets the
 void setFeatureCount(int featureCount)
          sets the
 void setGetMapRequestCopy(GetMap getMapRequestCopy)
          sets the
 void setInfoFormat(java.lang.String infoFormat)
          sets the
 void setQueryLayers(java.lang.String[] queryLayers)
          sets the
 void setStyledLayerDescriptor(StyledLayerDescriptor sld)
          sets the SLD the request is made of.
 java.lang.String toString()
           
 
Methods inherited from class org.deegree.ogcwebservices.wms.operation.WMSRequestBase
getServiceName
 
Methods inherited from class org.deegree.ogcwebservices.AbstractOGCWebServiceRequest
getId, getParam, getParamAsInt, getParamValues, getRequiredParam, getVendorSpecificParameter, getVendorSpecificParameters, getVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static GetFeatureInfo create(java.lang.String version,
                                    java.lang.String id,
                                    java.lang.String[] queryLayers,
                                    GetMap getMapRequestCopy,
                                    java.lang.String infoFormat,
                                    int featureCount,
                                    java.awt.Point clickPoint,
                                    java.lang.String exceptions,
                                    StyledLayerDescriptor sld,
                                    java.util.Map<java.lang.String,java.lang.String> vendorSpecificParameter)
creates a WMSFeatureInfoRequest from the request parameters.

Parameters:
version - VERSION=version (R): Request version.
id - the request id
queryLayers - QUERY_LAYERS=layer_list (R): Comma-separated list of one or more layers to be queried.
getMapRequestCopy - <map_request_copy> (R): Partial copy of the Map request parameters that generated the map for which information is desired.
infoFormat - INFO_FORMAT=output_format (O): Return format of feature information (MIME type).
featureCount - FEATURE_COUNT=number (O): Number of features about which to return information (default=1).
clickPoint - X=pixel_column (R): X coordinate in pixels of feature (measured from upper left corner=0) Y=pixel_row (R): Y coordinate in pixels of feature (measured from upper left corner=0)
exceptions - EXCEPTIONS=exception_format (O): The format in which exceptions are to be reported by the WMS (default=application/vnd.ogc.se_xml).
sld - StyledLayerDescriptor
vendorSpecificParameter - Vendor-specific parameters (O): Optional experimental parameters.
Returns:
an instance of WMSFeatureInfoRequest

create

public static GetFeatureInfo create(java.util.Map<java.lang.String,java.lang.String> model)
                             throws OGCWebServiceException
creates a WMSFeatureInfoRequest from a HashMap that contains the request parameters as key-value-pairs. Keys are expected to be in upper case notation.

Parameters:
model - HashMap containing the request parameters
Returns:
an instance of WMSFeatureInfoRequest
Throws:
OGCWebServiceException

getGetMapRequestCopy

public GetMap getGetMapRequestCopy()
is not a name/value pair like the other parameters. Instead, most of the GetMap request parameters that generated the original map are repeated. Two are omitted because GetFeatureInfo provides its own values: VERSION and REQUEST. The remainder of the GetMap request shall be embedded contiguously in the GetFeatureInfo request.

Returns:
a copy of the original request

setGetMapRequestCopy

public void setGetMapRequestCopy(GetMap getMapRequestCopy)
sets the

Parameters:
getMapRequestCopy -

getQueryLayers

public java.lang.String[] getQueryLayers()
The required QUERY_LAYERS parameter states the map layer(s) from which feature information is desired to be retrieved. Its value is a comma- separated list of one or more map layers that are returned as an array. This parameter shall contain at least one layer name, but may contain fewer layers than the original GetMap request.

If any layer in this list is not contained in the Capabilities XML of the WMS, the results are undefined and the WMS shall produce an exception response.

Returns:
the layer names

addQueryLayers

public void addQueryLayers(java.lang.String queryLayers)
adds the

Parameters:
queryLayers -

setQueryLayers

public void setQueryLayers(java.lang.String[] queryLayers)
sets the

Parameters:
queryLayers -

getInfoFormat

public java.lang.String getInfoFormat()
The optional INFO_FORMAT indicates what format to use when returning the feature information. Supported values for a GetFeatureInfo request on a WMS instance are listed as MIME types in one or more elements inside the element of its Capabilities XML. The entire MIME type string in is used as the value of the INFO_FORMAT parameter. In an HTTP environment, the MIME type shall be set on the returned object using the Content-type entity header.

EXAMPLE: The parameter INFO_FORMAT=application/vnd.ogc.gml requests that the feature information be formatted in Geography Markup Language (GML).

Returns:
the format

setInfoFormat

public void setInfoFormat(java.lang.String infoFormat)
sets the

Parameters:
infoFormat -

getFeatureCount

public int getFeatureCount()
The optional FEATURE_COUNT parameter states the maximum number of features for which feature information should be returned. Its value is a positive integer greater than zero. The default value is 1 if this parameter is omitted.

Returns:
the count

setFeatureCount

public void setFeatureCount(int featureCount)
sets the

Parameters:
featureCount -

getClickPoint

public java.awt.Point getClickPoint()
The required X and Y parameters indicate a point of interest on the map. X and Y identify a single point within the borders of the WIDTH and HEIGHT parameters of the embedded GetMap request. The origin is set to (0,0) centered in the pixel at the upper left corner; X increases to the right and Y increases downward. X and Y are retruned as java.awt.Point class/datastructure.

Returns:
the point of interest

setClickPoint

public void setClickPoint(java.awt.Point clickPoint)
sets the

Parameters:
clickPoint -

getExceptions

public java.lang.String getExceptions()
The optional EXCEPTIONS parameter states the manner in which errors are to be reported to the client. The default value is application/vnd.ogc.se_xml if this parameter is absent from the request. At present, not other values are defined for the WMS GetFeatureInfo request.

Returns:
the exception format

setExceptions

public void setExceptions(java.lang.String exceptions)
sets the

Parameters:
exceptions -

getStyledLayerDescriptor

public StyledLayerDescriptor getStyledLayerDescriptor()
returns the SLD the request is made of. This implies that a 'simple' HTTP GET-Request will be transformed into a valid SLD. This is mandatory within a JaGo WMS.

This mean even if a GetMap request is send using the HTTP GET method, an implementing class has to map the request to a SLD data sructure.

Returns:
the sld

setStyledLayerDescriptor

public void setStyledLayerDescriptor(StyledLayerDescriptor sld)
sets the SLD the request is made of. This implies that a 'simple' HTTP GET-Request or a part of it will be transformed into a valid SLD. For convenience it is asumed that the SLD names just a single layer to generate display elements of.

Parameters:
sld -

toString

public java.lang.String toString()
Overrides:
toString in class AbstractOGCWebServiceRequest

getRequestParameter

public java.lang.String getRequestParameter()
                                     throws OGCWebServiceException
returns the parameter of a HTTP GET request.

Specified by:
getRequestParameter in interface OGCWebServiceRequest
Overrides:
getRequestParameter in class AbstractOGCWebServiceRequest
Returns:
the URI of a HTTP GET request. If the request doesn't support HTTP GET a WebServiceException will be thrown
Throws:
OGCWebServiceException

isInfoFormatDefault

public boolean isInfoFormatDefault()
Returns:
whether the info format is the default setting

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org