public class ServiceMetadataUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
URL_TEMPLATE_PARAMS
Key value that associates an Element node (osd:Url in an OpenSearch
description document) with the collection of URL template parameters it
declares.
|
| Constructor and Description |
|---|
ServiceMetadataUtils() |
| Modifier and Type | Method and Description |
|---|---|
(package private) static void |
addDomainValues(Set<String> valueSet,
net.sf.saxon.s9api.XdmValue opMetadata)
Adds the allowed values of operation metadata elements to the given set.
|
static Set<String> |
getConstraintValues(Document cswMetadata,
String name)
Searches a CSW capabilities document for the specified constraint and
returns its set of allowed values.
|
static List<Node> |
getOpenSearchQueriesByRole(Document osDescr,
QName role)
Returns a list of nodes representing queries defined in an OpenSearch
description document.
|
static List<Node> |
getOpenSearchURLTemplates(Document osDescr)
Returns a list of nodes representing the URL templates defined in an
OpenSearch description document.
|
static URI |
getOperationEndpoint(Document cswMetadata,
String opName,
String httpMethod)
Extracts a request endpoint from a service capabilities document.
|
static Set<String> |
getParameterValues(Document cswMetadata,
String reqName,
String paramName)
Searches a CSW capabilities document for the specified request parameter
and returns its set of allowed values.
|
public static final String URL_TEMPLATE_PARAMS
public static URI getOperationEndpoint(Document cswMetadata, String opName, String httpMethod)
cswMetadata - A DOM Document node containing service metadata (OGC
capabilities document).opName - The operation (request) name.httpMethod - The HTTP method to use (if null or empty the
first method listed will be used).public static List<Node> getOpenSearchURLTemplates(Document osDescr)
List<TemplateParamInfo>
containing information about the declared template parameters; it can be
accessed via getUserData using
the key value URL_TEMPLATE_PARAMS.osDescr - An OpenSearchDescription document
(osd:OpenSearchDescription).public static List<Node> getOpenSearchQueriesByRole(Document osDescr, QName role)
osDescr - An OpenSearchDescription document.role - The (qualified) name of a query role.public static Set<String> getConstraintValues(Document cswMetadata, String name)
cswMetadata - A CSW capabilities document.name - The name of the constraint (not case-sensitive).public static Set<String> getParameterValues(Document cswMetadata, String reqName, String paramName)
cswMetadata - A CSW capabilities document.reqName - The name of a service request; if omitted, the search is
restricted to service-level parameters.paramName - The name of the request parameter (not case-sensitive).static void addDomainValues(Set<String> valueSet, net.sf.saxon.s9api.XdmValue opMetadata)
valueSet - The set to which the values are added.opMetadata - A sequence of operation metadata elements
(ows:Parameter or ows:Constraint, of type ows:DomainType).Copyright © 2018 Open Geospatial Consortium. All rights reserved.