Class ReadOnlyNamespaceRegistry
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.name.ReadOnlyNamespaceRegistry
-
- All Implemented Interfaces:
javax.jcr.NamespaceRegistry
,NamespaceConstants
- Direct Known Subclasses:
ReadWriteNamespaceRegistry
public class ReadOnlyNamespaceRegistry extends java.lang.Object implements javax.jcr.NamespaceRegistry, NamespaceConstants
Read-only namespace registry. Used mostly internally when access to the in-content registered namespaces is needed. See theReadWriteNamespaceRegistry
subclass for a more complete registry implementation that supports also namespace modifications and that's thus better suited for use in in implementing the full JCR API.
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.spi.namespace.NamespaceConstants
NAMESPACE_OAK, NAMESPACE_REP, NAMESPACE_SV, NAMESPACE_XMLNS, NAMESPACES_PATH, PREFIX_OAK, PREFIX_REP, PREFIX_SV, PREFIX_XMLNS, REP_NAMESPACES, REP_NSDATA, REP_PREFIXES, REP_URIS, RESERVED_PREFIXES, RESERVED_URIS
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyNamespaceRegistry(Root root)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.lang.String
getPrefix(java.lang.String uri)
@NotNull java.lang.String[]
getPrefixes()
@NotNull java.lang.String
getURI(java.lang.String prefix)
@NotNull java.lang.String[]
getURIs()
void
registerNamespace(java.lang.String prefix, java.lang.String uri)
void
unregisterNamespace(java.lang.String prefix)
-
-
-
Constructor Detail
-
ReadOnlyNamespaceRegistry
public ReadOnlyNamespaceRegistry(Root root)
-
-
Method Detail
-
registerNamespace
public void registerNamespace(java.lang.String prefix, java.lang.String uri) throws javax.jcr.RepositoryException
- Specified by:
registerNamespace
in interfacejavax.jcr.NamespaceRegistry
- Throws:
javax.jcr.RepositoryException
-
unregisterNamespace
public void unregisterNamespace(java.lang.String prefix) throws javax.jcr.RepositoryException
- Specified by:
unregisterNamespace
in interfacejavax.jcr.NamespaceRegistry
- Throws:
javax.jcr.RepositoryException
-
getPrefixes
@NotNull public @NotNull java.lang.String[] getPrefixes()
- Specified by:
getPrefixes
in interfacejavax.jcr.NamespaceRegistry
-
getURIs
@NotNull public @NotNull java.lang.String[] getURIs()
- Specified by:
getURIs
in interfacejavax.jcr.NamespaceRegistry
-
getURI
@NotNull public @NotNull java.lang.String getURI(java.lang.String prefix) throws javax.jcr.NamespaceException
- Specified by:
getURI
in interfacejavax.jcr.NamespaceRegistry
- Throws:
javax.jcr.NamespaceException
-
getPrefix
@NotNull public @NotNull java.lang.String getPrefix(java.lang.String uri) throws javax.jcr.NamespaceException
- Specified by:
getPrefix
in interfacejavax.jcr.NamespaceRegistry
- Throws:
javax.jcr.NamespaceException
-
-