public class RegistryNamespaceResolver extends Object implements NamespaceResolver
| Constructor and Description |
|---|
RegistryNamespaceResolver(javax.jcr.NamespaceRegistry registry)
Creates a new namespace resolver based on the given namespace registry.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getPrefix(String uri)
Returns the prefix which is mapped to the given URI.
|
String |
getURI(String prefix)
Returns the URI to which the given prefix is mapped.
|
public RegistryNamespaceResolver(javax.jcr.NamespaceRegistry registry)
registry - namespace registrypublic String getPrefix(String uri) throws javax.jcr.NamespaceException
NamespaceResolvergetPrefix in interface NamespaceResolveruri - namespace URIjavax.jcr.NamespaceException - if the URI is unknown.public String getURI(String prefix) throws javax.jcr.NamespaceException
NamespaceResolvergetURI in interface NamespaceResolverprefix - namespace prefixjavax.jcr.NamespaceException - if the prefix is unknown.Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.