public class NamespaceRegistryImpl extends Object implements NamespaceRegistry
NamespaceRegistryImpl
implements the JCR client facing
NamespaceRegistry.NAMESPACE_EMPTY, NAMESPACE_JCR, NAMESPACE_MIX, NAMESPACE_NT, NAMESPACE_XML, PREFIX_EMPTY, PREFIX_JCR, PREFIX_MIX, PREFIX_NT, PREFIX_XML
Constructor and Description |
---|
NamespaceRegistryImpl(NamespaceStorage storage)
Create a new
NamespaceRegistryImpl . |
Modifier and Type | Method and Description |
---|---|
String |
getPrefix(String uri) |
String[] |
getPrefixes() |
String |
getURI(String prefix) |
String[] |
getURIs() |
void |
registerNamespace(String prefix,
String uri) |
void |
unregisterNamespace(String prefix) |
public NamespaceRegistryImpl(NamespaceStorage storage)
NamespaceRegistryImpl
.storage
- public void registerNamespace(String prefix, String uri) throws NamespaceException, UnsupportedRepositoryOperationException, RepositoryException
registerNamespace
in interface NamespaceRegistry
NamespaceException
UnsupportedRepositoryOperationException
RepositoryException
NamespaceRegistry.registerNamespace(String, String)
public void unregisterNamespace(String prefix) throws NamespaceException, UnsupportedRepositoryOperationException, RepositoryException
unregisterNamespace
in interface NamespaceRegistry
NamespaceException
UnsupportedRepositoryOperationException
RepositoryException
NamespaceRegistry.unregisterNamespace(String)
public String[] getPrefixes() throws RepositoryException
getPrefixes
in interface NamespaceRegistry
RepositoryException
NamespaceRegistry.getPrefixes()
public String[] getURIs() throws RepositoryException
getURIs
in interface NamespaceRegistry
RepositoryException
NamespaceRegistry.getURIs()
public String getURI(String prefix) throws NamespaceException
getURI
in interface NamespaceRegistry
NamespaceException
NamespaceRegistry.getURI(String)
,
NamespaceResolver.getURI(String)
public String getPrefix(String uri) throws NamespaceException
getPrefix
in interface NamespaceRegistry
NamespaceException
NamespaceRegistry.getPrefix(String)
,
NamespaceResolver.getPrefix(String)
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.