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

org.deegree.ogcwebservices.wms.operation
Class GetMap

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

public class GetMap
extends WMSRequestBase

This interface describes the access to the parameters of a GeMap request. It is excpected that there are two kinds of request. The first is the 'normal' HTTP GET request with name-value-pair enconding and the second is a HTTP POST request containing a SLD.

Even it is possible to access the values of a HTTP GET request throught their bean accessor methods the request shall be mapped to a SLD data structure that is accessible using the getSLD().

Version:
$Revision: 21363 $, $Date:20.03.2007$
Author:
Andreas Poth, last edited by: $Author:wanhoff$
See Also:
Serialized Form

Nested Class Summary
static class GetMap.Layer
          A Layer object.
 
Field Summary
 java.util.LinkedList<java.lang.String> warningHeaders
          A list to transport messages to the WMSHandler that need to be set in HTTP headers.
 
Constructor Summary
GetMap(java.lang.String version, java.lang.String id, GetMap.Layer[] ls, java.lang.String format, int width, int height, java.lang.String srs, Envelope boundingBox, boolean transparency, java.awt.Color bgColor, java.lang.String exceptions, java.net.URL sld_url, StyledLayerDescriptor sld, java.util.Map<java.lang.String,java.lang.String> vendorSpecificParameter, DimensionValues dimTime, DimensionValues dimElev)
           
GetMap(java.lang.String version, java.lang.String id, GetMap.Layer[] layers, Values elevation, java.util.Map<java.lang.String,Values> sampleDimension, java.lang.String format, int width, int height, java.lang.String srs, Envelope boundingBox, boolean transparency, java.awt.Color bGColor, java.lang.String exceptions, Values time, java.net.URL sldURL, StyledLayerDescriptor sld, java.util.Map<java.lang.String,java.lang.String> vendorSpecificParameter)
          Creates a new GetMapRequest object.
 
Method Summary
 void addLayers(GetMap.Layer layers)
          adds the <Layer>
static GetMap create(java.util.Map<java.lang.String,java.lang.String> model)
          creates a GetMapRequest from a HashMap that contains the request parameters as key-value-pairs.
static GetMap create(java.lang.String id, org.w3c.dom.Document doc)
          creates a GetMapRequest from its XML representation as defined in SLD 1.0.0 specification This method does not yet cope with 1.3.0.
static GetMap create(java.lang.String version, java.lang.String id, GetMap.Layer[] layers, Values elevation, java.util.Map<java.lang.String,Values> sampleDimension, java.lang.String format, int width, int height, java.lang.String srs, Envelope boundingBox, boolean transparency, java.awt.Color bGColor, java.lang.String exceptions, Values time, java.net.URL sldURL, StyledLayerDescriptor sld, java.util.Map<java.lang.String,java.lang.String> vendorSpecificParameter)
          creates a WTSGetViewRequest from a set of parameters and builds up the complete SLD.
static GetMap createGetMapRequest(AbstractDataSource ds, GetMap request, java.lang.String style, java.lang.String layer)
          creates a getMap request for requesting a cascaded remote WMS considering the getMap request and the filterconditions defined in the submitted DataSource object The request will be encapsualted within a OGCWebServiceEvent.
static GetMap.Layer createLayer(java.lang.String name, java.lang.String style)
          creates a Layer object beacuse of the inner class construct.
 java.awt.Color getBGColor()
          The optional BGCOLOR parameter specifies the color to be used as the background of the map.
 Envelope getBoundingBox()
          The required BBOX parameter allows a Client to request a particular Bounding Box.
 DimensionValues getDimElev()
           
 DimensionValues getDimTime()
           
 Values getElevation()
          Some geospatial information may be available at multiple elevations.
 java.lang.String getExceptions()
          The optional EXCEPTIONS parameter states the manner in which errors are to be reported to the client.
 java.lang.String getFormat()
          The FORMAT parameter specifies the output format of the response to an operation.
 int getHeight()
          HEIGHT specifies the number of pixels between the minimum and maximum Y values.
 GetMap.Layer[] getLayers()
          The required LAYERS parameter lists the map layer(s) to be returned by this GetMap request.
 java.lang.String getRequestParameter()
          returns the URI of a HTTP GET request.
 java.util.Map<java.lang.String,Values> getSampleDimension()
          Some geospatial information may be available at other dimensions (for example, satellite images in different wavelength bands).
 java.net.URL getSLD_URL()
           
 java.lang.String getSrs()
          The required SRS parameter states which Spatial Reference System applies to the values in the BBOX parameter.
 StyledLayerDescriptor getStyledLayerDescriptor()
           
 Values getTime()
          This specification is based on [ISO 8601:1988(E)]; it extends ISO 8601 in the following ways: It defines a syntax for expressing the start, end and periodicity of a data collection.
 boolean getTransparency()
          The optional TRANSPARENT parameter specifies whether the map background is to be made transparent or not.
 java.net.URL getWFS_URL()
           
 int getWidth()
          WIDTH specifies the number of pixels to be used between the minimum and maximum X values (inclusive) in the BBOX parameter.
 void setBoundingBox(Envelope boundingBox)
           
 void setDimElev(DimensionValues dimElev)
           
 void setDimTime(DimensionValues dimTime)
           
 void setFormat(java.lang.String format)
          sets the format
 void setHeight(int height)
           
 void setLayers(GetMap.Layer[] layers)
          sets the <Layer>
 void setSrs(java.lang.String srs)
          sets the srs
 void setWidth(int width)
           
 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
 

Field Detail

warningHeaders

public java.util.LinkedList<java.lang.String> warningHeaders
A list to transport messages to the WMSHandler that need to be set in HTTP headers.

Constructor Detail

GetMap

GetMap(java.lang.String version,
       java.lang.String id,
       GetMap.Layer[] layers,
       Values elevation,
       java.util.Map<java.lang.String,Values> sampleDimension,
       java.lang.String format,
       int width,
       int height,
       java.lang.String srs,
       Envelope boundingBox,
       boolean transparency,
       java.awt.Color bGColor,
       java.lang.String exceptions,
       Values time,
       java.net.URL sldURL,
       StyledLayerDescriptor sld,
       java.util.Map<java.lang.String,java.lang.String> vendorSpecificParameter)
Creates a new GetMapRequest object.

Parameters:
version -
id -
layers -
elevation -
sampleDimension -
format -
width -
height -
srs -
boundingBox -
transparency -
bGColor -
exceptions -
time -
sldURL -
sld -
vendorSpecificParameter -

GetMap

public GetMap(java.lang.String version,
              java.lang.String id,
              GetMap.Layer[] ls,
              java.lang.String format,
              int width,
              int height,
              java.lang.String srs,
              Envelope boundingBox,
              boolean transparency,
              java.awt.Color bgColor,
              java.lang.String exceptions,
              java.net.URL sld_url,
              StyledLayerDescriptor sld,
              java.util.Map<java.lang.String,java.lang.String> vendorSpecificParameter,
              DimensionValues dimTime,
              DimensionValues dimElev)
Parameters:
version -
id -
ls -
format -
width -
height -
srs -
boundingBox -
transparency -
bgColor -
exceptions -
sld_url -
sld -
vendorSpecificParameter -
dimTime -
dimElev -
Method Detail

create

public static GetMap create(java.lang.String version,
                            java.lang.String id,
                            GetMap.Layer[] layers,
                            Values elevation,
                            java.util.Map<java.lang.String,Values> sampleDimension,
                            java.lang.String format,
                            int width,
                            int height,
                            java.lang.String srs,
                            Envelope boundingBox,
                            boolean transparency,
                            java.awt.Color bGColor,
                            java.lang.String exceptions,
                            Values time,
                            java.net.URL sldURL,
                            StyledLayerDescriptor sld,
                            java.util.Map<java.lang.String,java.lang.String> vendorSpecificParameter)
creates a WTSGetViewRequest from a set of parameters and builds up the complete SLD.

Parameters:
version - Request version.
layers - list of one or more map layers. Optional if SLD parameter is present. Contains list of one rendering style per requested layer. Optional if SLD parameter is present.
elevation - Elevation of layer desired.
sampleDimension - Value of other dimensions as appropriate.
format - Output format of map.
width - Width in pixels of map picture.
height - Height in pixels of map picture.
srs - the requested Spatial Reference System.
boundingBox - Bounding box corners (lower left, upper right) in SRS units.
transparency - Background transparency of map.
bGColor - Hexadecimal red-green-blue color value for the background color.
exceptions - The format in which exceptions are to be reported by the WMS.
time - Time value of layer desired
sld - Styled Layer Descriptor
id - an unique ID of the request
sldURL -
vendorSpecificParameter - Vendor Specific Parameter
Returns:
an instance of GetMapRequest

createGetMapRequest

public static GetMap createGetMapRequest(AbstractDataSource ds,
                                         GetMap request,
                                         java.lang.String style,
                                         java.lang.String layer)
creates a getMap request for requesting a cascaded remote WMS considering the getMap request and the filterconditions defined in the submitted DataSource object The request will be encapsualted within a OGCWebServiceEvent.

Parameters:
ds -
request -
style -
layer -
Returns:
GetMap request object

create

public static GetMap create(java.util.Map<java.lang.String,java.lang.String> model)
                     throws InconsistentRequestException,
                            XMLParsingException,
                            java.net.MalformedURLException
creates a GetMapRequest 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 GetMapRequest
Throws:
InconsistentRequestException
XMLParsingException
java.net.MalformedURLException

create

public static GetMap create(java.lang.String id,
                            org.w3c.dom.Document doc)
                     throws XMLParsingException,
                            InvalidSRSException,
                            InconsistentRequestException
creates a GetMapRequest from its XML representation as defined in SLD 1.0.0 specification

This method does not yet cope with 1.3.0.

Parameters:
id - an unique id of the request
doc - the document tree
Returns:
an instance of GetMapRequest
Throws:
XMLParsingException
InvalidSRSException
InconsistentRequestException

getFormat

public java.lang.String getFormat()
The FORMAT parameter specifies the output format of the response to an operation.

An OGC Web CapabilitiesService may offer only a subset of the formats known for that type of operation, but the server shall advertise in its Capabilities XML those formats it does support and shall accept requests for any format it advertises. A CapabilitiesService Instance may optionally offer a new format not previously offered by other instances, with the recognition that clients are not required to accept or process an unknown format. If a request contains a Format not offered by a particular server, the server shall throw a CapabilitiesService Exception (with code "InvalidFormat").

Returns:
the output format

setFormat

public void setFormat(java.lang.String format)
sets the format

Parameters:
format - the requested output-format

getLayers

public GetMap.Layer[] getLayers()
The required LAYERS parameter lists the map layer(s) to be returned by this GetMap request. The value of the LAYERS parameter is a comma-separated list of one or more valid layer names. Allowed layer names are the character data content of any element in the Capabilities XML.

A WMS shall render the requested layers by drawing the leftmost in the list bottommost, the next one over that, and so on.

Each layer is associated to a style. Styles are also is encoded as a comma- seperated list within the GetMap request.

The required STYLES parameter lists the style in which each layer is to be rendered. There is a one-to-one correspondence between the values in the LAYERS parameter and the values in the STYLES parameter. Because of this layer-style combinations are returned coupled within an array of Layer- objects. Each map in the list of LAYERS is drawn using the corresponding style in the same position in the list of STYLES. Each style Name shall be one that was defined in the element of a