Package org.geotools.ows.wms
Class WMS1_0_0
- Object
-
- Specification
-
- WMSSpecification
-
- WMS1_0_0
-
- Direct Known Subclasses:
WMS1_1_0
public class WMS1_0_0 extends WMSSpecification
Provides support for the Web Map Server 1.0 Specification.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, rgould
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description 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 serverstatic class
WMS1_0_0.GetMapRequest
A GetMapRequest for a 1.0.0 Serverstatic class
WMS1_0_0.InternalGetStylesRequest
-
Constructor Summary
Constructors Constructor Description WMS1_0_0()
Public constructor creates the WMS1_0_0 object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DescribeLayerRequest
createDescribeLayerRequest(URL onlineResource)
Note that WMS 1.0.0 does not support this method.GetCapabilitiesRequest
createGetCapabilitiesRequest(URL server)
Create a request for performing GetCapabilities requests on a 1.0.0 server.GetFeatureInfoRequest
createGetFeatureInfoRequest(URL onlineResource, GetMapRequest getMapRequest)
Creates a GetFeatureInfoRequest for this specification, populating it with valid values.GetLegendGraphicRequest
createGetLegendGraphicRequest(URL onlineResource)
Note that WMS 1.0.0 does not support this method.GetMapRequest
createGetMapRequest(URL get)
Creates a GetMapRequest for this specification, populating it with valid values.GetStylesRequest
createGetStylesRequest(URL onlineResource)
Creates a GetStylesRequest which can be used to retrieve styles from the WMS.PutStylesRequest
createPutStylesRequest(URL onlineResource)
Note that WMS 1.0.0 does not support this methodstatic String
getExceptionValue(String mimeType)
The WMS 1.0.0 specification uses internal mappings in the parameter value instead of direct mime types.static String
getFormatValue(String mimeType)
Provides mapping from MIME type to WMS 1.0.0 Format.String
getVersion()
Expected version attribute for root element.static String
toExceptionMimeType(String exception)
The WMS 1.0.0 specification uses a mapping of mimetypes to values to use as parameter values in requests.static String
toFormatMIME(String format)
Provides mapping from well known format to MIME type.
-
-
-
Method Detail
-
getVersion
public String getVersion()
Expected version attribute for root element.- Specified by:
getVersion
in classSpecification
- Returns:
- the expect version value for this specification
-
toFormatMIME
public static final String toFormatMIME(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).
- Returns:
- MIME type for format
-
toExceptionMimeType
public static final String toExceptionMimeType(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 String getFormatValue(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 String getExceptionValue(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 GetCapabilitiesRequest createGetCapabilitiesRequest(URL server)
Create a request for performing GetCapabilities requests on a 1.0.0 server.- Specified by:
createGetCapabilitiesRequest
in classSpecification
- 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(URL get)
Description copied from class:WMSSpecification
Creates a GetMapRequest for this specification, populating it with valid values.- Specified by:
createGetMapRequest
in classWMSSpecification
- Parameters:
get
- the URL for the GetMapRequest- Returns:
- a GetMapRequest that can be configured and used
- See Also:
WMSSpecification.createGetMapRequest(java.net.URL)
-
createGetFeatureInfoRequest
public GetFeatureInfoRequest createGetFeatureInfoRequest(URL onlineResource, GetMapRequest getMapRequest)
Description copied from class:WMSSpecification
Creates a GetFeatureInfoRequest for this specification, populating it with valid values.- Specified by:
createGetFeatureInfoRequest
in classWMSSpecification
- Parameters:
onlineResource
- the URL to be executed againstgetMapRequest
- a previously configured GetMapRequest- Returns:
- a GetFeatureInfoRequest that can be configured and used
- See Also:
WMSSpecification.createGetFeatureInfoRequest(java.net.URL, org.geotools.ows.wms.request.GetMapRequest)
-
createDescribeLayerRequest
public DescribeLayerRequest createDescribeLayerRequest(URL onlineResource) throws UnsupportedOperationException
Note that WMS 1.0.0 does not support this method.- Specified by:
createDescribeLayerRequest
in classWMSSpecification
- 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:
UnsupportedOperationException
- if the version of the specification doesn't support this request- See Also:
WMSSpecification.createDescribeLayerRequest(java.net.URL)
-
createGetLegendGraphicRequest
public GetLegendGraphicRequest createGetLegendGraphicRequest(URL onlineResource) throws UnsupportedOperationException
Note that WMS 1.0.0 does not support this method.- Specified by:
createGetLegendGraphicRequest
in classWMSSpecification
- Parameters:
onlineResource
- the location where the request can be made- Returns:
- a GetLegendGraphicRequest to be configured and passed to the WMS
- Throws:
UnsupportedOperationException
- if the version of the specification doesn't support this request- See Also:
WMSSpecification.createGetLegendGraphicRequest(java.net.URL)
-
createGetStylesRequest
public GetStylesRequest createGetStylesRequest(URL onlineResource) throws UnsupportedOperationException
Description copied from class:WMSSpecification
Creates a GetStylesRequest which can be used to retrieve styles from the WMS.- Specified by:
createGetStylesRequest
in classWMSSpecification
- Parameters:
onlineResource
- The location where the request can be made- Returns:
- a configurable request object to be passed to a WMS
- Throws:
UnsupportedOperationException
- if the version of the specification doesn't support this request- See Also:
WMSSpecification.createGetStylesRequest(java.net.URL)
-
createPutStylesRequest
public PutStylesRequest createPutStylesRequest(URL onlineResource) throws UnsupportedOperationException
Note that WMS 1.0.0 does not support this method- Specified by:
createPutStylesRequest
in classWMSSpecification
- Parameters:
onlineResource
- the location where the request can be made- Returns:
- a configureable request object to be passed to the WMS
- Throws:
UnsupportedOperationException
- if the version of the specification doesn't support this request- See Also:
WMSSpecification.createPutStylesRequest(java.net.URL)
-
-