Class 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
    • Constructor Detail

      • WMS1_0_0

        public WMS1_0_0()
        Public constructor creates the WMS1_0_0 object.
    • Method Detail

      • getVersion

        public 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 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"
      • createDescribeLayerRequest

        public DescribeLayerRequest createDescribeLayerRequest​(URL onlineResource)
                                                        throws UnsupportedOperationException
        Note that WMS 1.0.0 does not support this method.
        Specified by:
        createDescribeLayerRequest in class WMSSpecification
        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)
      • 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 class WMSSpecification
        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 class WMSSpecification
        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)