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 theNamespaceResolverinterface on aSession. 
- 
- 
Constructor Summary
Constructors Constructor Description SessionNamespaceResolver(javax.jcr.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.StringgetPrefix(java.lang.String uri)Returns the prefix which is mapped to the given URI.java.lang.StringgetURI(java.lang.String prefix)Returns the URI to which the given prefix is mapped. 
 - 
 
- 
- 
Method Detail
- 
getPrefix
public java.lang.String getPrefix(java.lang.String uri) throws javax.jcr.NamespaceExceptionReturns the prefix which is mapped to the given URI.- Specified by:
 getPrefixin interfaceNamespaceResolver- Parameters:
 uri- namespace URI- Returns:
 - the prefix mapped to the given URI.
 - Throws:
 javax.jcr.NamespaceException- if the URI is unknown.
 
- 
getURI
public java.lang.String getURI(java.lang.String prefix) throws javax.jcr.NamespaceExceptionReturns the URI to which the given prefix is mapped.- Specified by:
 getURIin interfaceNamespaceResolver- Parameters:
 prefix- namespace prefix- Returns:
 - the namespace URI to which the given prefix is mapped.
 - Throws:
 javax.jcr.NamespaceException- if the prefix is unknown.
 
 - 
 
 -