com.supermap.services.wms

Class WMSXMLEncoder130

  • All Implemented Interfaces:
    WMSXMLEncoder


    public class WMSXMLEncoder130
    extends WMSXMLEncoder111
    

    WMS 1.3.0 XML document encoder.

    Convert the relevant WMS objects of SuperMap iServer to the XML document of WMS 1.3.0 service based on OGC standard.

    • Field Detail

      • NODE_ATT_VERSION

        protected static final java.lang.String NODE_ATT_VERSION
        

        The version property of the WMS 1.3.0 XML document.

        The default value is “version”.

      • NODE_ATT_XMLNS

        protected static final java.lang.String NODE_ATT_XMLNS
        

        The xmlns property of the WMS 1.3.0 XML document.

        The default is “xmlns”.

      • NODE_ATT_XSI

        protected static final java.lang.String NODE_ATT_XSI
        

        The xmlns:xsi property of the WMS 1.3.0 XML document.

        The default is “xmlns:xsi”.

      • NODE_ATT_SCHEMALOCATION

        protected static final java.lang.String NODE_ATT_SCHEMALOCATION
        

        The xsi:schemaLocation property of the WMS 1.3.0 XML document.

        The default is “xsi:schemaLocation”.

    • Constructor Detail

      • WMSXMLEncoder130

        public WMSXMLEncoder130()
        
        The Constructor.
      • WMSXMLEncoder130

        public WMSXMLEncoder130(java.util.Map<java.lang.String,java.lang.String> urls)
        
        Constructs the WMSXMLEncoder130 object according to a series of document directories.
        Parameters:
        urls - This parameter is a Map mapping. The key values for the mapping are CapabilitiesDTDOrXSD, providerUrl, exceptionDTDOrXSD, and featureDTDOrXSD, and the key value is the corresponding document (URL) address.
    • Method Detail

      • writeRootNode

        protected Node writeRootNode(Node doc)
        

        Create the root node of WMS 1.3.0 Capabilities XML document, which is WMS_Capabilities node.

        Overrides:
        writeRootNode in class WMSXMLEncoder111
        Parameters:
        doc - XML document root node, such as “<?xml version="1.0" encoding="UTF-8"?>”
        Returns:
        the root node of WMS 1.3.0 Capabilities XML document, which is WMS_Capabilities node.
      • writeLatLonBounds

        protected Node writeLatLonBounds(Node layerNode,
                             Rectangle2D latLonBounds)
        

        Add the EX_GeographicBoundingBox node in Layer node, set the property of the node.

        Overrides:
        writeLatLonBounds in class WMSXMLEncoder111
        Parameters:
        layerNode - Layer node.
        latLonBounds - geographical bounds.
        Returns:
        EX_GeographicBoundingBox node.
      • writeLatLonBoundsAttribute

        protected void writeLatLonBoundsAttribute(Node node,
                                      Rectangle2D layerBounds)
        

        Set the property value of the EX_GeographicBoundingBox node.

        The properties of the EX_GeographicBoundingBox node include westBoundLongitude, eastBoundLongitude, southBoundLatitude and northBoundLatitude.

        Overrides:
        writeLatLonBoundsAttribute in class WMSXMLEncoder111
        Parameters:
        node - EX_GeographicBoundingBox node.
        layerBounds - geographical bounds.
      • writeServiceNameNode

        protected void writeServiceNameNode(Node serviceNode)
        

        Add Name node in Service node.

        The Name node is used to describe the name of the service. The value of the Name node defaults to "WMS".

        Overrides:
        writeServiceNameNode in class WMSXMLEncoder111
        Parameters:
        serviceNode - Service node.
      • writeCRSNode

        protected void writeCRSNode(Node layerNode,
                        WMSCapabilities wmsCapabilities)
        

        Add CRS node in the Layer node.

        The default value of the SRS node is “CRS:84”.

        Overrides:
        writeCRSNode in class WMSXMLEncoder111
        Parameters:
        layerNode - Layer node.
      • writeCRSNode

        protected void writeCRSNode(Node layerNode,
                        WMSLayer wmsLayer)
        
        Description copied from class: WMSXMLEncoder111

        Add SRS node in the Layer node.

        The default value of the SRS node is “EPSG:4326”.

        Overrides:
        writeCRSNode in class WMSXMLEncoder111
        Parameters:
        layerNode - Layer node.
      • encode

        public java.lang.String encode(OGCException[] exceptions)
        

        Convert the OGCException object to XML document string format of exception information.

        Specified by:
        encode in interface WMSXMLEncoder
        Overrides:
        encode in class WMSXMLEncoder111
        Parameters:
        exceptions - OGC exception object array.
        Returns:
        XML document string format of exception information.