Package org.apache.jackrabbit.jcr2spi
Class NamespaceRegistryImpl
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.NamespaceRegistryImpl
-
- All Implemented Interfaces:
NamespaceRegistry
public class NamespaceRegistryImpl extends Object implements NamespaceRegistry
NamespaceRegistryImplimplements the JCR client facing NamespaceRegistry.
-
-
Field Summary
-
Fields inherited from interface javax.jcr.NamespaceRegistry
NAMESPACE_EMPTY, NAMESPACE_JCR, NAMESPACE_MIX, NAMESPACE_NT, NAMESPACE_XML, PREFIX_EMPTY, PREFIX_JCR, PREFIX_MIX, PREFIX_NT, PREFIX_XML
-
-
Constructor Summary
Constructors Constructor Description NamespaceRegistryImpl(NamespaceStorage storage)Create a newNamespaceRegistryImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPrefix(String uri)String[]getPrefixes()StringgetURI(String prefix)String[]getURIs()voidregisterNamespace(String prefix, String uri)voidunregisterNamespace(String prefix)
-
-
-
Constructor Detail
-
NamespaceRegistryImpl
public NamespaceRegistryImpl(NamespaceStorage storage)
Create a newNamespaceRegistryImpl.- Parameters:
storage-
-
-
Method Detail
-
registerNamespace
public void registerNamespace(String prefix, String uri) throws NamespaceException, UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
registerNamespacein interfaceNamespaceRegistry- Throws:
NamespaceExceptionUnsupportedRepositoryOperationExceptionRepositoryException- See Also:
NamespaceRegistry.registerNamespace(String, String)
-
unregisterNamespace
public void unregisterNamespace(String prefix) throws NamespaceException, UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
unregisterNamespacein interfaceNamespaceRegistry- Throws:
NamespaceExceptionUnsupportedRepositoryOperationExceptionRepositoryException- See Also:
NamespaceRegistry.unregisterNamespace(String)
-
getPrefixes
public String[] getPrefixes() throws RepositoryException
- Specified by:
getPrefixesin interfaceNamespaceRegistry- Throws:
RepositoryException- See Also:
NamespaceRegistry.getPrefixes()
-
getURIs
public String[] getURIs() throws RepositoryException
- Specified by:
getURIsin interfaceNamespaceRegistry- Throws:
RepositoryException- See Also:
NamespaceRegistry.getURIs()
-
getURI
public String getURI(String prefix) throws NamespaceException
- Specified by:
getURIin interfaceNamespaceRegistry- Throws:
NamespaceException- See Also:
NamespaceRegistry.getURI(String),NamespaceResolver.getURI(String)
-
getPrefix
public String getPrefix(String uri) throws NamespaceException
- Specified by:
getPrefixin interfaceNamespaceRegistry- Throws:
NamespaceException- See Also:
NamespaceRegistry.getPrefix(String),NamespaceResolver.getPrefix(String)
-
-