|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.session.SessionNamespaceRegistry
Constructor Summary | |
SessionNamespaceRegistry(NamespaceRegistry registry)
Creates a local namespace registry based on the given global namespace registry. |
Method Summary | |
String |
getPrefix(String uri)
Returns the prefix that is mapped to the given namespace URI. |
String[] |
getPrefixes()
Returns the currently mapped namespace prefixes. |
String |
getURI(String prefix)
Returns the namespace URI that is mapped to the given prefix. |
String[] |
getURIs()
Returns the registered namespace URIs. |
void |
registerNamespace(String prefix,
String uri)
Creates a local namespace mapping. |
void |
unregisterNamespace(String prefix)
Not implemented. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SessionNamespaceRegistry(NamespaceRegistry registry)
registry
- global namespace registryMethod Detail |
public void registerNamespace(String prefix, String uri) throws NamespaceException, RepositoryException
This method implements the specified semantics of the Session.setNamespacePrefix method. Session implementations can use this method as follows:
NamespaceRegistry registry = new SessionNamespaceRegistry( getWorkspace().getNamespaceRegistry()); public void setNamespacePrefix(String prefix, String uri) throws NamespaceException, RepositoryException { return registry.registerNamespace(prefix, uri); }
registerNamespace
in interface NamespaceRegistry
prefix
- namespace prefixuri
- namespace URI
NamespaceException
- if the given namespace mapping is invalid
RepositoryException
- on repository errorsNamespaceRegistry.registerNamespace(String, String)
,
Session.setNamespacePrefix(String, String)
public void unregisterNamespace(String prefix) throws UnsupportedRepositoryOperationException
unregisterNamespace
in interface NamespaceRegistry
prefix
- namespace prefix
UnsupportedRepositoryOperationException
- always thrownpublic String[] getPrefixes() throws RepositoryException
This method implements the specified semantics of the Session.getNamespacePrefixes method. Session implementations can use this method as follows:
NamespaceRegistry registry = new SessionNamespaceRegistry( getWorkspace().getNamespaceRegistry()); public String getNamespacePrefixes() throws RepositoryException { return registry.getPrefixes(); }
getPrefixes
in interface NamespaceRegistry
RepositoryException
- on repository errorsNamespaceRegistry.getPrefixes()
,
Session.getNamespacePrefixes()
public String[] getURIs() throws RepositoryException
getURIs
in interface NamespaceRegistry
RepositoryException
- on repository errorsNamespaceRegistry.getURIs()
public String getURI(String prefix) throws NamespaceException, RepositoryException
This method implements the specified semantics of the Session.getNamespaceURI method. Session implementations can use this method as follows:
NamespaceRegistry registry = new SessionNamespaceRegistry( getWorkspace().getNamespaceRegistry()); public String getNamespaceURI(String prefix) throws NamespaceException, RepositoryException { return registry.getURI(prefix); }
getURI
in interface NamespaceRegistry
prefix
- namespace prefix
NamespaceException
- if the prefix is not registered or
currently visible
RepositoryException
- on repository errorsNamespaceRegistry.getURI(String)
,
Session.getNamespaceURI(String)
public String getPrefix(String uri) throws NamespaceException, RepositoryException
This method implements the specified semantics of the Session.getNamespacePrefix method. Session implementations can use this method as follows:
NamespaceRegistry registry = new SessionNamespaceRegistry( getWorkspace().getNamespaceRegistry()); public String getNamespacePrefix(String uri) throws NamespaceException, RepositoryException { return registry.getPrefix(uri); }
getPrefix
in interface NamespaceRegistry
uri
- namespace URI
NamespaceException
- if the namespace URI is not registered
RepositoryException
- on repository errorsNamespaceRegistry.getPrefix(String)
,
Session.getNamespacePrefix(String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |