org.geotools.data.wms
Class WMS1_0_0

java.lang.Object
  extended byorg.geotools.data.wms.Specification
      extended byorg.geotools.data.wms.WMS1_0_0
Direct Known Subclasses:
WMS1_1_0

public class WMS1_0_0
extends Specification

Provides support for the Web Map Server 1.0 Specificaiton.

This class opperates as a Factory creating the following related objects.

The idea is that this class opperates a Toolkit for all things assocated with Web Map Server 1.0.0 Specification. The various objects produced by this toolkit are used as stratagy objects for the top level Web Map Server objects:

WMS1_0_0 provides both name and version information that may be checked against a GetCapabilities document during version negotiation.

Author:
Jody Garnett, Refractions Research

Nested Class Summary
static class WMS1_0_0.GetCapsRequest
          We need a custom request object.
static class WMS1_0_0.GetFeatureInfoRequest
          A GetFeatureInfoRequest for a 1.0.0 server
static class WMS1_0_0.GetMapRequest
          A GetMapRequest for a 1.0.0 Server
 
Constructor Summary
WMS1_0_0()
          Public constructor creates the WMS1_0_0 object.
 
Method Summary
 DescribeLayerRequest createDescribeLayerRequest(java.net.URL onlineResource)
          Note that WMS 1.0.0 does not support this method.
 AbstractGetCapabilitiesRequest createGetCapabilitiesRequest(java.net.URL server)
          Create a request for performing GetCapabilities requests on a 1.0.0 server.
 GetFeatureInfoRequest createGetFeatureInfoRequest(java.net.URL onlineResource, GetMapRequest getMapRequest)
          Creates a GetFeatureInfoRequest for this specification, populating it with valid values.
 GetLegendGraphicRequest createGetLegendGraphicRequest(java.net.URL onlineResource)
          Note that WMS 1.0.0 does not support this method.
 GetMapRequest createGetMapRequest(java.net.URL get)
          Creates a GetMapRequest for this specification, populating it with valid values.
 GetStylesRequest createGetStylesRequest(java.net.URL onlineResource)
          Note that WMS 1.0.0 does not support this method
 PutStylesRequest createPutStylesRequest(java.net.URL onlineResource)
          Note that WMS 1.0.0 does not support this method
static java.lang.String getExceptionValue(java.lang.String mimeType)
          The WMS 1.0.0 specification uses internal mappings in the parameter value instead of direct mime types.
static java.lang.String getFormatValue(java.lang.String mimeType)
          Provides mapping from MIME type to WMS 1.0.0 Format.
 java.lang.String getVersion()
          Expected version attribute for root element.
static java.lang.String toExceptionMimeType(java.lang.String exception)
          The WMS 1.0.0 specification uses a mapping of mimetypes to values to use as parameter values in requests.
static java.lang.String toFormatMIME(java.lang.String format)
          Provides mapping from well known format to MIME type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WMS1_0_0

public WMS1_0_0()
Public constructor creates the WMS1_0_0 object.

Method Detail

getVersion

public java.lang.String getVersion()
Expected version attribute for root element.

Specified by:
getVersion in class Specification
Returns:
the expect version value for this specification

toFormatMIME

public static final java.lang.String toFormatMIME(java.lang.String format)
Provides mapping from well known format to MIME type.

WebMapServer api uses mime type internally for format information (indeed WMS 1.0.0 is the only WMS specifcation not to use MIME type directly).

Parameters:
format -
Returns:
MIME type for format

toExceptionMimeType

public static final java.lang.String toExceptionMimeType(java.lang.String exception)
The WMS 1.0.0 specification uses a mapping of mimetypes to values to use as parameter values in requests. This will take a parameter value and convert it to its according mime type.

Parameters:
exception - an exceptions parameter value, such as "WMS_XML"
Returns:
a mimeType, such as "application/vnd.ogc.se_xml"

getFormatValue

public static final java.lang.String getFormatValue(java.lang.String mimeType)
Provides mapping from MIME type to WMS 1.0.0 Format.

WebMapServer api uses mime type internally for format information (indeed WMS 1.0.0 is the only WMS specifcation not to use MIME type directly).

Parameters:
mimeType - MIME type such as "image/gif"
Returns:
Format well known WMS 1.0.0 format such as "GIF"

getExceptionValue

public static final java.lang.String getExceptionValue(java.lang.String mimeType)
The WMS 1.0.0 specification uses internal mappings in the parameter value instead of direct mime types. This will map a given mime type to its proper parameter value according to the spec.

Parameters:
mimeType - the mimeType to use, such as "application/vnd.ogc.se_xml"
Returns:
the proper parameter value, such as "WMS_XML"

createGetCapabilitiesRequest

public AbstractGetCapabilitiesRequest createGetCapabilitiesRequest(java.net.URL server)
Create a request for performing GetCapabilities requests on a 1.0.0 server.

Specified by:
createGetCapabilitiesRequest in class Specification
Parameters:
server - a URL that points to the 1.0.0 server
Returns:
a AbstractGetCapabilitiesRequest object that can provide a valid request
See Also:
Specification.createGetCapabilitiesRequest(java.net.URL)

createGetMapRequest

public GetMapRequest createGetMapRequest(java.net.URL get)
Description copied from class: Specification
Creates a GetMapRequest for this specification, populating it with valid values.

Specified by:
createGetMapRequest in class Specification
Parameters:
get - the URL for the GetMapRequest
Returns:
a GetMapRequest that can be configured and used
See Also:
Specification.createGetMapRequest(java.net.URL)

createGetFeatureInfoRequest

public GetFeatureInfoRequest createGetFeatureInfoRequest(java.net.URL onlineResource,
                                                         GetMapRequest getMapRequest)
Description copied from class: Specification
Creates a GetFeatureInfoRequest for this specification, populating it with valid values.

Specified by:
createGetFeatureInfoRequest in class Specification
Parameters:
onlineResource - the URL to be executed against
getMapRequest - a previously configured GetMapRequest
Returns:
a GetFeatureInfoRequest that can be configured and used
See Also:
Specification.createGetFeatureInfoRequest(java.net.URL, org.geotools.data.wms.request.GetMapRequest)

createDescribeLayerRequest

public DescribeLayerRequest createDescribeLayerRequest(java.net.URL onlineResource)
                                                throws java.lang.UnsupportedOperationException
Note that WMS 1.0.0 does not support this method.

Specified by:
createDescribeLayerRequest in class Specification
Parameters:
onlineResource - the location where the request can be made
Returns:
a DescribeLayerRequest to be configured and then passed to the Web Map Server
Throws:
java.lang.UnsupportedOperationException - if the version of the specification doesn't support this request
See Also:
Specification.createDescribeLayerRequest(java.net.URL)

createGetLegendGraphicRequest

public GetLegendGraphicRequest createGetLegendGraphicRequest(java.net.URL onlineResource)
                                                      throws java.lang.UnsupportedOperationException
Note that WMS 1.0.0 does not support this method.

Specified by:
createGetLegendGraphicRequest in class Specification
Parameters:
onlineResource - the location where the request can be made
Returns:
a GetLegendGraphicRequest to be configured and passed to the WMS
Throws:
java.lang.UnsupportedOperationException - if the version of the specification doesn't support this request
See Also:
Specification.createGetLegendGraphicRequest(java.net.URL)

createGetStylesRequest

public GetStylesRequest createGetStylesRequest(java.net.URL onlineResource)
                                        throws java.lang.UnsupportedOperationException
Note that WMS 1.0.0 does not support this method

Specified by:
createGetStylesRequest in class Specification
Parameters:
onlineResource - The location where the request can be made
Returns:
a configurable request object to be passed to a WMS
Throws:
java.lang.UnsupportedOperationException - if the version of the specification doesn't support this request
See Also:
Specification.createGetStylesRequest(java.net.URL)

createPutStylesRequest

public PutStylesRequest createPutStylesRequest(java.net.URL onlineResource)
                                        throws java.lang.UnsupportedOperationException
Note that WMS 1.0.0 does not support this method

Specified by:
createPutStylesRequest in class Specification
Parameters:
onlineResource - the location where the request can be made
Returns:
a configureable request object to be passed to the WMS
Throws:
java.lang.UnsupportedOperationException - if the version of the specification doesn't support this request
See Also:
Specification.createPutStylesRequest(java.net.URL)


Copyright © GeoTools. All Rights Reserved.