Package ddf.util
Class NamespaceResolver
java.lang.Object
ddf.util.NamespaceResolver
- All Implemented Interfaces:
NamespaceContext
DDF namespace resolver loads all registered NamespaceMap interfaces and builds two HashMaps: one
for namespace URIs to prefixes, and one for namespace prefixes to URIs. If there are multiple
entries found for a single URI or prefix, the last one loaded from the OSGi Service Registry will
be the one used.
- Author:
- Hugh Rodgers
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDDF namespace resolver loads all registered NamespaceMap interfaces and builds two HashMaps: one for namespace URIs to prefixes, and one for namespace prefixes to URIs. -
Method Summary
Modifier and TypeMethodDescriptiongetNamespaceURI(String prefix) Retrieve the namespace URI for the given namespace prefix.Retrieve the namespace prefix for the given namespace URI.getPrefixes(String namespace)
-
Field Details
-
namespaceContexts
-
-
Constructor Details
-
NamespaceResolver
public NamespaceResolver()DDF namespace resolver loads all registered NamespaceMap interfaces and builds two HashMaps: one for namespace URIs to prefixes, and one for namespace prefixes to URIs. If there are multiple entries found for a single URI or prefix, the last one loaded from the OSGi Service Registry will be the one used.
-
-
Method Details
-
getNamespaceURI
Retrieve the namespace URI for the given namespace prefix. Prefix is retrieved from the list of namespace URIs and prefixes mapped from NamespaceMap entries in the OSGi Service Registry.- Specified by:
getNamespaceURIin interfaceNamespaceContext- Returns:
- the namespace URI for the given namespace prefix
-
getPrefix
Retrieve the namespace prefix for the given namespace URI. URI is retrieved from the list of namespace URIs and prefixes mapped from NamespaceMap entries in the OSGi Service Registry.- Specified by:
getPrefixin interfaceNamespaceContext- Returns:
- the namespace prefix for the given namespace URI
-
getPrefixes
- Specified by:
getPrefixesin interfaceNamespaceContext
-