Class SessionNamespaceResolver
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.namespace.SessionNamespaceResolver
-
- All Implemented Interfaces:
NamespaceResolver
public class SessionNamespaceResolver extends java.lang.Object implements NamespaceResolver
helper class that exposes theNamespaceResolver
interface on aSession
.
-
-
Constructor Summary
Constructors Constructor Description SessionNamespaceResolver(Session session)
Creates a new namespace resolver based on a session
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
SessionNamespaceResolver
public SessionNamespaceResolver(Session session)
Creates a new namespace resolver based on a session- Parameters:
session
-
-
-
Method Detail
-
getPrefix
public java.lang.String getPrefix(java.lang.String uri) throws NamespaceException
Returns the prefix which is mapped to the given URI.- Specified by:
getPrefix
in interfaceNamespaceResolver
- Parameters:
uri
- namespace URI- Returns:
- the prefix mapped to the given URI.
- Throws:
NamespaceException
- if the URI is unknown.
-
getURI
public java.lang.String getURI(java.lang.String prefix) throws NamespaceException
Returns the URI to which the given prefix is mapped.- Specified by:
getURI
in interfaceNamespaceResolver
- Parameters:
prefix
- namespace prefix- Returns:
- the namespace URI to which the given prefix is mapped.
- Throws:
NamespaceException
- if the prefix is unknown.
-
-