Class JcrNamespaceRegistry

  • All Implemented Interfaces:
    javax.jcr.NamespaceRegistry, org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver

    public class JcrNamespaceRegistry
    extends Object
    implements javax.jcr.NamespaceRegistry, org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver
    Simple namespace registry backed by a map
    • Constructor Detail

      • JcrNamespaceRegistry

        public JcrNamespaceRegistry()
    • Method Detail

      • registerCnd

        public void registerCnd​(Reader reader,
                                String systemId)
                         throws org.apache.jackrabbit.commons.cnd.ParseException,
                                javax.jcr.RepositoryException,
                                IOException
        Throws:
        org.apache.jackrabbit.commons.cnd.ParseException
        javax.jcr.RepositoryException
        IOException
      • registerNamespace

        public void registerNamespace​(String prefix,
                                      String uri)
                               throws javax.jcr.RepositoryException
        Specified by:
        registerNamespace in interface javax.jcr.NamespaceRegistry
        Throws:
        javax.jcr.RepositoryException
      • unregisterNamespace

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

        public String[] getPrefixes()
                             throws javax.jcr.RepositoryException
        Specified by:
        getPrefixes in interface javax.jcr.NamespaceRegistry
        Throws:
        javax.jcr.RepositoryException
      • getURIs

        public String[] getURIs()
                         throws javax.jcr.RepositoryException
        Specified by:
        getURIs in interface javax.jcr.NamespaceRegistry
        Throws:
        javax.jcr.RepositoryException
      • getURI

        public String getURI​(String prefix)
                      throws javax.jcr.NamespaceException
        Specified by:
        getURI in interface javax.jcr.NamespaceRegistry
        Specified by:
        getURI in interface org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver
        Throws:
        javax.jcr.NamespaceException
      • getPrefix

        public String getPrefix​(String uri)
                         throws javax.jcr.NamespaceException
        Specified by:
        getPrefix in interface javax.jcr.NamespaceRegistry
        Specified by:
        getPrefix in interface org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver
        Throws:
        javax.jcr.NamespaceException
      • getRegisteredCndSystemIds

        @NotNull
        public @NotNull Collection<String> getRegisteredCndSystemIds()