public class RegistryNamespaceResolver extends java.lang.Object implements NamespaceResolver
Constructor and Description |
---|
RegistryNamespaceResolver(NamespaceRegistry registry)
Creates a new namespace resolver based on the given namespace registry.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPrefix(java.lang.String uri)
Returns the prefix which is mapped to the given URI.
|
java.lang.String |
getURI(java.lang.String prefix)
Returns the URI to which the given prefix is mapped.
|
public RegistryNamespaceResolver(NamespaceRegistry registry)
registry
- namespace registrypublic java.lang.String getPrefix(java.lang.String uri) throws NamespaceException
NamespaceResolver
getPrefix
in interface NamespaceResolver
uri
- namespace URINamespaceException
- if the URI is unknown.public java.lang.String getURI(java.lang.String prefix) throws NamespaceException
NamespaceResolver
getURI
in interface NamespaceResolver
prefix
- namespace prefixNamespaceException
- if the prefix is unknown.Copyright © 2010 - 2020 Adobe. All Rights Reserved