Interface NamespaceResolver
-
- All Known Subinterfaces:
NamespaceMappings
- All Known Implementing Classes:
AbstractNamespaceMappings
,AbstractNamespaceResolver
,AdditionalNamespaceResolver
,FileBasedNamespaceMappings
,NamespaceMapping
,NSRegistryBasedNamespaceMappings
,RegistryNamespaceResolver
,SessionImpl
,SessionImpl
,SessionNamespaceResolver
,XASessionImpl
,XASessionImpl
public interface NamespaceResolver
Interface for resolving namespace URIs and prefixes. Unlike the JCRNamespaceRegistry
interface, this interface contains no functionality other than the basic namespace URI and prefix resolution methods. This interface is therefore used internally in many places where the full namespace registry is either not available or some other mechanism is used for resolving namespaces.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
getURI
String getURI(String prefix) throws NamespaceException
Returns the URI to which the given prefix is mapped.- Parameters:
prefix
- namespace prefix- Returns:
- the namespace URI to which the given prefix is mapped.
- Throws:
NamespaceException
- if the prefix is unknown.
-
getPrefix
String getPrefix(String uri) throws NamespaceException
Returns the prefix which is mapped to the given URI.- Parameters:
uri
- namespace URI- Returns:
- the prefix mapped to the given URI.
- Throws:
NamespaceException
- if the URI is unknown.
-
-