Class JcrNamespaceRegistry

java.lang.Object
org.apache.sling.feature.cpconverter.vltpkg.JcrNamespaceRegistry
All Implemented Interfaces:
javax.jcr.NamespaceRegistry, NamespaceContext, org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver

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

    • JcrNamespaceRegistry

      public JcrNamespaceRegistry() throws javax.jcr.RepositoryException, org.apache.jackrabbit.commons.cnd.ParseException, IOException
      Throws:
      javax.jcr.RepositoryException
      org.apache.jackrabbit.commons.cnd.ParseException
      IOException
  • Method Details

    • 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
    • getNamespaceURI

      public String getNamespaceURI(String prefix)
      Specified by:
      getNamespaceURI in interface NamespaceContext
    • getPrefix

      public String getPrefix(String uri)
      Specified by:
      getPrefix in interface NamespaceContext
      Specified by:
      getPrefix in interface javax.jcr.NamespaceRegistry
      Specified by:
      getPrefix in interface org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver
    • getPrefixes

      public Iterator<String> getPrefixes(String namespaceURI)
      Specified by:
      getPrefixes in interface NamespaceContext
    • getRegisteredCndSystemIds

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