Package org.locationtech.jts.wms
Class Parser
- java.lang.Object
-
- org.locationtech.jts.wms.Parser
-
public class Parser extends Object
Pulls WMS objects out of the XML- Author:
- Chris Hodgson chodgson@refractions.net
-
-
Constructor Summary
Constructors Constructor Description Parser()
Creates a Parser for dealing with WMS XML.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoundingBox
boundingBoxFromNode(Node n)
Creates a new BoundingBox object based on the DOM Node given.Capabilities
parseCapabilities(WMService service, InputStream inStream)
Parses the WMT_MS_Capabilities XML from the given InputStream into a Capabilities object.MapLayer
wmsLayerFromNode(Node layerNode)
Traverses the DOM tree underneath the specified Node and generates a corresponding WMSLayer object tree.
-
-
-
Method Detail
-
parseCapabilities
public Capabilities parseCapabilities(WMService service, InputStream inStream) throws IOException
Parses the WMT_MS_Capabilities XML from the given InputStream into a Capabilities object.- Parameters:
service
- the WMService from which this MapDescriptor is derivedinStream
- the inputStream containing the WMT_MS_Capabilities XML to parse- Returns:
- the MapDescriptor object created from the specified XML InputStream
- Throws:
IOException
-
wmsLayerFromNode
public MapLayer wmsLayerFromNode(Node layerNode)
Traverses the DOM tree underneath the specified Node and generates a corresponding WMSLayer object tree. The returned WMSLayer will be set to have the specified parent.- Parameters:
layerNode
- a DOM Node which is aXML element - Returns:
- a WMSLayer with complete subLayer tree that corresponds to the DOM Node provided
-
boundingBoxFromNode
public BoundingBox boundingBoxFromNode(Node n) throws Exception
Creates a new BoundingBox object based on the DOM Node given.- Parameters:
n
- the DOM Node to create the Bounding box from, must be either a LatLonBoundingBox element or a BoundingBox element- Returns:
- a new BoundingBox object based on the DOM Node provided
- Throws:
Exception
-
-