Class WMSXMLEncoder130
- java.lang.Object
-
- com.supermap.services.wms.AbstractWMSXMLEncoder
-
- com.supermap.services.wms.WMSXMLEncoder111
-
- com.supermap.services.wms.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 Summary
Fields Modifier and Type Field and Description protected static java.lang.StringNODE_ATT_SCHEMALOCATIONThe xsi:schemaLocation property of the WMS 1.3.0 XML document.protected static java.lang.StringNODE_ATT_VERSIONThe version property of the WMS 1.3.0 XML document.protected static java.lang.StringNODE_ATT_XMLNSThe xmlns property of the WMS 1.3.0 XML document.protected static java.lang.StringNODE_ATT_XSIThe xmlns:xsi property of the WMS 1.3.0 XML document.-
Fields inherited from class com.supermap.services.wms.AbstractWMSXMLEncoder
capabilitiesDTDOrXSD, CRS, exceptionDTDOrXSD, featureDTDOrXSD, OGC_NAMESPACE_URL, providerUrl, SRS, WMS_NAMESPACE_URL
-
-
Constructor Summary
Constructors Constructor and Description WMSXMLEncoder130()The Constructor.WMSXMLEncoder130(java.util.Map<java.lang.String,java.lang.String> urls)Constructs the WMSXMLEncoder130 object according to a series of document directories.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.Stringencode(OGCException[] exceptions)Convert theOGCExceptionobject to XML document string format of exception information.java.lang.StringgetVersion()Gets the WMS service version.protected voidwriteCRSNode(Node layerNode, WMSCapabilities wmsCapabilities)Add CRS node in the Layer node.protected voidwriteCRSNode(Node layerNode, WMSLayer wmsLayer)Add SRS node in the Layer node.protected NodewriteLatLonBounds(Node layerNode, Rectangle2D latLonBounds)Add the EX_GeographicBoundingBox node in Layer node, set the property of the node.protected voidwriteLatLonBoundsAttribute(Node node, Rectangle2D layerBounds)Set the property value of the EX_GeographicBoundingBox node.protected NodewriteRootNode(Node doc)Create the root node of WMS 1.3.0 Capabilities XML document, which is WMS_Capabilities node.protected voidwriteServiceNameNode(Node serviceNode)Add Name node in Service node.protected voidwriteSRSBounds(Node layerNode, WMSLayer wmsLayer)Write to SRSBounds-
Methods inherited from class com.supermap.services.wms.WMSXMLEncoder111
encode, encode, ensureNoXSS, getBBoxAttributeValue, onlineResourceElement, writeCapabilitiesNode, writeLayer, writeLayerStyle, writerLayers, writeServiceNode
-
Methods inherited from class com.supermap.services.wms.AbstractWMSXMLEncoder
getCapabilitiesDTDOrXSD, getExceptionDTDOrXSD, getFeatureDTDOrXSD, setCapabilitiesDTDOrXSD, setExceptionDTDOrXSD, setFeatureDTDOrXSD, setProviderUrl
-
-
-
-
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:
writeRootNodein classWMSXMLEncoder111- 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:
writeLatLonBoundsin classWMSXMLEncoder111- 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:
writeLatLonBoundsAttributein classWMSXMLEncoder111- 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:
writeServiceNameNodein classWMSXMLEncoder111- 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:
writeCRSNodein classWMSXMLEncoder111- Parameters:
layerNode- Layer node.
-
writeCRSNode
protected void writeCRSNode(Node layerNode, WMSLayer wmsLayer)
Description copied from class:WMSXMLEncoder111Add SRS node in the Layer node.
The default value of the SRS node is “EPSG:4326”.
- Overrides:
writeCRSNodein classWMSXMLEncoder111- Parameters:
layerNode- Layer node.
-
writeSRSBounds
protected void writeSRSBounds(Node layerNode, WMSLayer wmsLayer)
Write to SRSBounds- Overrides:
writeSRSBoundsin classWMSXMLEncoder111
-
encode
public java.lang.String encode(OGCException[] exceptions)
Convert the
OGCExceptionobject to XML document string format of exception information.- Specified by:
encodein interfaceWMSXMLEncoder- Overrides:
encodein classWMSXMLEncoder111- Parameters:
exceptions- OGC exception object array.- Returns:
- XML document string format of exception information.
-
getVersion
public java.lang.String getVersion()
Gets the WMS service version.
- Specified by:
getVersionin interfaceWMSXMLEncoder- Overrides:
getVersionin classWMSXMLEncoder111- Returns:
- return “1.3.0”.
-
-