public abstract class AbstractWMSXMLEncoder extends java.lang.Object implements WMSXMLEncoder
Abstract WMS XML document encoder.
Realize general WMS XML encoding method.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
capabilitiesDTDOrXSD
DTD or XSD document address which is used in the XML document returned by the GetCapabilities operation.
|
protected static java.lang.String |
CRS |
protected java.lang.String |
exceptionDTDOrXSD
DTD or XSD document address of the WMS exception XML document.
|
protected java.lang.String |
featureDTDOrXSD
DTD or XSD document address which is used in the XML document returned by the GetFeatureInfo operation.
|
protected static java.lang.String |
OGC_NAMESPACE_URL
The name space of WMS 1.3.0 Service Exception XML document(xmlns).
|
protected java.lang.String |
providerUrl
Online resource URL.
|
protected static java.lang.String |
SRS |
protected static java.lang.String |
WMS_NAMESPACE_URL
The name space of WMS 1.3.0 Capabilities XML document(xmlns).
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractWMSXMLEncoder()
The Constructor.
|
protected |
AbstractWMSXMLEncoder(java.util.Map<java.lang.String,java.lang.String> params)
Constructs the AbstractWMSXMLEncoder object according to a series of document directories.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCapabilitiesDTDOrXSD()
Get the DTD or XSD document address of the Capabilities XML document.
|
java.lang.String |
getExceptionDTDOrXSD()
Get the DTD or XSD document address of the exception information XML document.
|
java.lang.String |
getFeatureDTDOrXSD()
Get DTD or XSD document address in the XML document of the GetFeatureInfo operation response.
|
void |
setCapabilitiesDTDOrXSD(java.lang.String path)
Set the DTD or XSD document address of the Capabilities XML document.
|
void |
setExceptionDTDOrXSD(java.lang.String url)
Set the DTD or XSD document address of the exception XML document.
|
void |
setFeatureDTDOrXSD(java.lang.String url)
Set DTD or XSD document address in the XML document of the GetFeatureInfo operation response.
|
void |
setProviderUrl(java.lang.String providerUrl)
Set Online resource URL.
|
protected abstract void |
writeCRSNode(Node layerNode, WMSLayer layer)
Add coordinate system node(SRS or CRS) to the Layer node.
|
protected abstract Node |
writeLayer(Node fatherNode, WMSLayer wmsLayer, Rectangle2D mapBounds, WMSCapabilities capabilities)
Add Layer sub node to the Layer parent node.
|
protected abstract void |
writeLayerStyle(Node layerNode, UserStyleElement wmsLayerStyle)
Add layer style node in the Layer node.
|
protected abstract Node |
writeRootNode(Node doc)
Creates the root node of WMS XML document.
|
protected abstract void |
writeServiceNameNode(Node serviceNode)
Add Name node in Service node.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
encode, encode, encode, getVersion
protected static final java.lang.String SRS
protected static final java.lang.String CRS
protected static final java.lang.String OGC_NAMESPACE_URL
The name space of WMS 1.3.0 Service Exception XML document(xmlns).
The default is “http://www.opengis.net/ogc”.
protected static final java.lang.String WMS_NAMESPACE_URL
The name space of WMS 1.3.0 Capabilities XML document(xmlns).
The default is “http://www.opengis.net/wms”.
protected java.lang.String capabilitiesDTDOrXSD
DTD or XSD document address which is used in the XML document returned by the GetCapabilities operation.
protected java.lang.String providerUrl
Online resource URL.
The URL is a URL prefix, which is an opaque string, including protocol, host name, port number (optional), path, English mark ("?"), and one or more parameters defined by server (optional), where the parameter uses"&" at the end.
In the XML document of WMS, the field value is recorded in the xlink:href property of the OnlineResource element.
protected java.lang.String exceptionDTDOrXSD
DTD or XSD document address of the WMS exception XML document.
protected java.lang.String featureDTDOrXSD
DTD or XSD document address which is used in the XML document returned by the GetFeatureInfo operation.
protected AbstractWMSXMLEncoder()
protected AbstractWMSXMLEncoder(java.util.Map<java.lang.String,java.lang.String> params)
params
- The parameter is a Map mapping. The mapping key value is CapabilitiesDTDOrXSD, providerUrl, exceptionDTDOrXSD and featureDTDOrXSD, and the key value is relevant document URL.public final void setProviderUrl(java.lang.String providerUrl)
Set Online resource URL.
The URL is a URL prefix, which is an opaque string, including protocol, host name, port number (optional), path, English mark ("?"), and one or more parameters defined by server (optional), where the parameter uses"&" at the end.
In the XML document of WMS, the field value is recorded in the xlink:href property of the OnlineResource element.
setProviderUrl
in interface WMSXMLEncoder
providerUrl
- online resource URL.public final void setCapabilitiesDTDOrXSD(java.lang.String path)
setCapabilitiesDTDOrXSD
in interface WMSXMLEncoder
path
- the DTD or XSD document address.public final void setExceptionDTDOrXSD(java.lang.String url)
setExceptionDTDOrXSD
in interface WMSXMLEncoder
url
- the DTD or XSD document address.public final void setFeatureDTDOrXSD(java.lang.String url)
setFeatureDTDOrXSD
in interface WMSXMLEncoder
url
- the DTD or XSD document address.public final java.lang.String getCapabilitiesDTDOrXSD()
getCapabilitiesDTDOrXSD
in interface WMSXMLEncoder
public final java.lang.String getExceptionDTDOrXSD()
getExceptionDTDOrXSD
in interface WMSXMLEncoder
public final java.lang.String getFeatureDTDOrXSD()
getFeatureDTDOrXSD
in interface WMSXMLEncoder
protected abstract Node writeRootNode(Node doc)
doc
- XML document root node, such as “<?xml version="1.0" encoding="UTF-8"?>”protected abstract Node writeLayer(Node fatherNode, WMSLayer wmsLayer, Rectangle2D mapBounds, WMSCapabilities capabilities)
fatherNode
- the Layer parent node.wmsLayer
- WMS layer.mapBounds
- the geographical range of the map.protected abstract void writeServiceNameNode(Node serviceNode)
serviceNode
- Service node.protected abstract void writeCRSNode(Node layerNode, WMSLayer layer)
layerNode
- Layer node.protected abstract void writeLayerStyle(Node layerNode, UserStyleElement wmsLayerStyle)
layerNode
- Layer node.