public class WMSXMLEncoder111 extends AbstractWMSXMLEncoder
WMS 1.1.1 XML document encoder.
Convert the relevant WMS objects of SuperMap iServer to the XML document of WMS 1.1.1 service based on OGC standard.
capabilitiesDTDOrXSD, CRS, exceptionDTDOrXSD, featureDTDOrXSD, OGC_NAMESPACE_URL, providerUrl, SRS, WMS_NAMESPACE_URL| Constructor and Description |
|---|
WMSXMLEncoder111()
The Constructor.
|
WMSXMLEncoder111(java.util.Map<java.lang.String,java.lang.String> urls)
Constructs the WMSXMLEncoder111 object according to a series of document directories.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
encode(OGCException[] exceptions)
Convert the
OGCException object to XML document string format of exception information. |
java.lang.String |
encode(WMSCapabilities wmsCapabilities)
Construct the
WMSCapabilities object to Capabilities XML document string format of WMS service. |
java.lang.String |
encode(WMSFeatureInfo[] featureInfos, java.lang.String format)
Construct the
WMSFeatureInfo object to XML document string format of WMS 1.1.1 GetFeatureInfo operation. |
protected java.lang.String |
ensureNoXSS(java.lang.String message)
Get the matching information
|
protected java.lang.String[] |
getBBoxAttributeValue(Rectangle2D rect)
Gets the value of the bounding box (geographic range).
|
java.lang.String |
getVersion()
Gets the WMS service version.
|
protected void |
onlineResourceElement(Node fatherNode)
Set OnlineResource node.
|
protected Node |
writeCapabilitiesNode(Node rootNode, WMSCapabilities wmsCapabilities)
Create the Capability node of WMS 1.1.1 Capabilities XML file in the root node of the WMS 1.1.1 Capabilities XML file.
|
protected void |
writeCRSNode(Node layerNode, WMSCapabilities wmsCapabilities)
Add CRS node to the node which is represented with layerNode.
|
protected void |
writeCRSNode(Node layerNode, WMSLayer wmsLayer)
Add SRS node in the Layer node.
|
protected Node |
writeLatLonBounds(Node layerNode, Rectangle2D layerBounds)
Add the LatLonBoundingBox node in Layer node, set the property of the node.
|
protected void |
writeLatLonBoundsAttribute(Node node, Rectangle2D layerBounds)
Set the property value of the LatLonBoundingBox node.
|
protected Node |
writeLayer(Node fatherNode, WMSLayer wmsLayer, Rectangle2D mapBounds, WMSCapabilities wmsCapabilities)
Add Layer child nodes and other related nodes in the Layer parent node.
|
protected void |
writeLayerStyle(Node styleNode, UserStyleElement layerStyle)
Set the style of the layer, please refer to geoServer and the official SLD document
|
protected void |
writerLayers(Node mapNode, WMSCapabilities wmsCapabilities)
Add Layer node and relevant nodes in the node which is represented with mapNode.
|
protected Node |
writeRootNode(Node doc)
Create the root node of WMS 1.1.1 Capabilities XML document, which is WMT_MS_Capabilities node.
|
protected void |
writeServiceNameNode(Node serviceNode)
Add Name node in Service node.
|
protected Node |
writeServiceNode(Node rootNode, ServiceDescription serviceDescription)
Create the Service node of WMS 1.1.1 Capabilities XML file in the root node of the WMS 1.1.1 Capabilities XML file.
|
protected void |
writeSRSBounds(Node layerNode, WMSLayer wmsLayer)
Write to SRSBounds
|
getCapabilitiesDTDOrXSD, getExceptionDTDOrXSD, getFeatureDTDOrXSD, setCapabilitiesDTDOrXSD, setExceptionDTDOrXSD, setFeatureDTDOrXSD, setProviderUrlpublic WMSXMLEncoder111()
The Constructor.
public WMSXMLEncoder111(java.util.Map<java.lang.String,java.lang.String> urls)
Constructs the WMSXMLEncoder111 object according to a series of document directories.
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.protected Node writeRootNode(Node doc)
Create the root node of WMS 1.1.1 Capabilities XML document, which is WMT_MS_Capabilities node.
writeRootNode in class AbstractWMSXMLEncoderdoc - XML document root node, such as “<?xml version="1.0" encoding="UTF-8"?>”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 "OGC: WMS".
writeServiceNameNode in class AbstractWMSXMLEncoderserviceNode - Service node.protected Node writeServiceNode(Node rootNode, ServiceDescription serviceDescription)
Create the Service node of WMS 1.1.1 Capabilities XML file in the root node of the WMS 1.1.1 Capabilities XML file.
rootNode - the root node of WMS 1.1.1 Capabilities XML document, which is WMT_MS_Capabilities node.serviceDescription - service meta data information.protected Node writeCapabilitiesNode(Node rootNode, WMSCapabilities wmsCapabilities)
Create the Capability node of WMS 1.1.1 Capabilities XML file in the root node of the WMS 1.1.1 Capabilities XML file.
rootNode - the root node of WMS 1.1.1 Capabilities XML document, which is WMT_MS_Capabilities node.wmsCapabilities - WMS meta information.public java.lang.String encode(WMSCapabilities wmsCapabilities)
WMSCapabilities object to Capabilities XML document string format of WMS service.wmsCapabilities - WMSCapabilities object.protected Node writeLayer(Node fatherNode, WMSLayer wmsLayer, Rectangle2D mapBounds, WMSCapabilities wmsCapabilities)
Add Layer child nodes and other related nodes in the Layer parent node.
In SuperMap iServer, a Layer root node (Level 1 Layer node) corresponds to a map, the Layer node under the Layer root node indicates the map set (Level 2 Layer node), the Layer node under the level 2 Layer node indicates the layer.
writeLayer in class AbstractWMSXMLEncoderfatherNode - the Layer parent node.wmsLayer - WMS layer.mapBounds - the geographical range of the map.protected void writeLayerStyle(Node styleNode, UserStyleElement layerStyle)
writeLayerStyle in class AbstractWMSXMLEncoderstyleNode - Layer node.protected void writeCRSNode(Node layerNode, WMSLayer wmsLayer)
Add SRS node in the Layer node.
The default value of the SRS node is “EPSG:4326”.
writeCRSNode in class AbstractWMSXMLEncoderlayerNode - Layer node.wmsCapabilities -protected Node writeLatLonBounds(Node layerNode, Rectangle2D layerBounds)
Add the LatLonBoundingBox node in Layer node, set the property of the node.
layerNode - Layer node.layerBounds -layerBounds - geographical bounds.protected void writeLatLonBoundsAttribute(Node node, Rectangle2D layerBounds)
Set the property value of the LatLonBoundingBox node.
The properties of the LatLonBoundingBox node contain minx, miny, maxx and maxy.
node - LatLonBoundingBox node.layerBounds, - Rectangle2D mapBounds geographical bounds.protected void writerLayers(Node mapNode, WMSCapabilities wmsCapabilities)
Add Layer node and relevant nodes in the node which is represented with mapNode.
The node which is represented with mapNode is the level 1 Layer node of the Capabilities XML document.
mapNode - the level 1 Layer node of the Capabilities XML document.wmsCapabilities - WMS meta information.protected void writeCRSNode(Node layerNode, WMSCapabilities wmsCapabilities)
layerNode -wmsCapabilities -protected void onlineResourceElement(Node fatherNode)
Set OnlineResource node.
Include setting the parent node of the OnlineResource node: DCPType, HTTP and Get nodes.
fatherNode - the parent node of the OnlineResource node.protected java.lang.String[] getBBoxAttributeValue(Rectangle2D rect)
Gets the value of the bounding box (geographic range). Including minx, miny, maxx and maxy.
rect - the geographical range.public java.lang.String encode(WMSFeatureInfo[] featureInfos, java.lang.String format)
Construct the WMSFeatureInfo object to XML document string format of WMS 1.1.1 GetFeatureInfo operation.
featureInfos - WMSFeatureInfo object array.public java.lang.String encode(OGCException[] exceptions) throws org.w3c.dom.DOMException
Convert the OGCException object to XML document string format of exception information.
exceptions - OGC exception object array.org.w3c.dom.DOMExceptionprotected java.lang.String ensureNoXSS(java.lang.String message)
message - the information to matchpublic java.lang.String getVersion()
Gets the WMS service version.