Class 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 the ReadWriteNamespaceRegistry 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.
    • 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 interface javax.jcr.NamespaceRegistry
        Throws:
        javax.jcr.RepositoryException
      • unregisterNamespace

        public void unregisterNamespace​(java.lang.String prefix)
                                 throws javax.jcr.RepositoryException
        Specified by:
        unregisterNamespace in interface javax.jcr.NamespaceRegistry
        Throws:
        javax.jcr.RepositoryException
      • getPrefixes

        @NotNull
        public @NotNull java.lang.String[] getPrefixes()
        Specified by:
        getPrefixes in interface javax.jcr.NamespaceRegistry
      • getURIs

        @NotNull
        public @NotNull java.lang.String[] getURIs()
        Specified by:
        getURIs in interface javax.jcr.NamespaceRegistry
      • getURI

        @NotNull
        public @NotNull java.lang.String getURI​(java.lang.String prefix)
                                         throws javax.jcr.NamespaceException
        Specified by:
        getURI in interface javax.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 interface javax.jcr.NamespaceRegistry
        Throws:
        javax.jcr.NamespaceException