Package de.latlon.ets.wms13.core.util
Class ServiceMetadataUtils
java.lang.Object
de.latlon.ets.wms13.core.util.ServiceMetadataUtils
Provides various utility methods for accessing service metadata.
- Author:
- Lyn Goltz
-
Method Summary
Modifier and TypeMethodDescriptionstatic Set<ProtocolBinding>getOperationBindings(Document wmsMetadata, String opName) Determines which protocol bindings are supported for a given operation.static URIgetOperationEndpoint(Document wmsMetadata, String opName, ProtocolBinding binding) Extracts a request endpoint from a WMS capabilities document.static URIgetSoapOperationEndpoint(Document wmsCapabilities, String operation) static NodeListparseAllLayerNodes(Document wmsCapabilities) Parses all Layer elements of a capabilities document.static BoundingBoxparseGeographicBoundingBox(Node layerNode) Parses the EX_GeographicBoundingBox from the layer.parseLayerInfo(Document wmsCapabilities) Parses all named layers from the capabilities document.(package private) static RequestableDimensionparseRequestableDimension(String units, String value) static NodeListparseRequestableLayerNodes(Document wmsCapabilities) Parses all requestable Layer elements of a capabilities document.parseSupportedFormats(Document wmsCapabilities, String opName) Parses the configured formats for the given operation.static StringparseUpdateSequence(Document wmsCapabilities) Parses the updateSequence value from the capabilities document.
-
Method Details
-
getOperationEndpoint
public static URI getOperationEndpoint(Document wmsMetadata, String opName, ProtocolBinding binding) Extracts a request endpoint from a WMS capabilities document. If the request URI contains a query component it is removed (but not from the source document).- Parameters:
wmsMetadata- the document node containing service metadata (OGC capabilities document).opName- the operation (request) namebinding- the message binding to use (ifnullany supported binding will be used)- Returns:
- the URI referring to a request endpoint,
nullif no matching endpoint is found
-
getOperationBindings
Determines which protocol bindings are supported for a given operation.- Parameters:
wmsMetadata- the capabilities document (wms:WMS_Capabilities), nevernullopName- the name of the WMS operation- Returns:
- A Set of protocol bindings supported for the operation. May be empty but
never
null.
-
parseSupportedFormats
Parses the configured formats for the given operation.- Parameters:
wmsCapabilities- the capabilities document (wms:WMS_Capabilities), nevernullopName- the name of the WMS operation- Returns:
- a list of the supported formats by the operation, never
null
-
parseLayerInfo
Parses all named layers from the capabilities document.- Parameters:
wmsCapabilities- the capabilities document (wms:WMS_Capabilities), nevernull- Returns:
- a list of
LayerInfos supported by the WMS, nevernull
-
parseUpdateSequence
Parses the updateSequence value from the capabilities document.- Parameters:
wmsCapabilities- the capabilities document (wms:WMS_Capabilities), nevernull- Returns:
- the value of the
ServiceMetadataUtilsattribute,nullif the attribute is missing or the value empty
-
parseGeographicBoundingBox
Parses the EX_GeographicBoundingBox from the layer.- Parameters:
layerNode- node of the layer, nevernull- Returns:
- the
BoundingBox- crs is CRS:84,nullif missing
-
parseAllLayerNodes
Parses all Layer elements of a capabilities document.- Parameters:
wmsCapabilities- capabilities document, nevernull- Returns:
- node list containing all layer elements of the capabilities document
- Throws:
XPathExpressionException- if theexpressioncannot be evaluated
-
parseRequestableLayerNodes
public static NodeList parseRequestableLayerNodes(Document wmsCapabilities) throws XPathExpressionException Parses all requestable Layer elements of a capabilities document. Requestable layers are identified by the existence of a Name sub element.- Parameters:
wmsCapabilities- capabilities document, nevernull- Returns:
- node list containing all requestable layer elements of the capabilities document
- Throws:
XPathExpressionException- if theexpressioncannot be evaluated
-
parseRequestableDimension
static RequestableDimension parseRequestableDimension(String units, String value) throws ParseException - Throws:
ParseException
-
getSoapOperationEndpoint
-