Package org.apache.sling.feature.cpconverter.vltpkg

## 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

### Field Summary

### Fields inherited from interface javax.jcr.NamespaceRegistry

`NAMESPACE_EMPTY, NAMESPACE_JCR, NAMESPACE_MIX, NAMESPACE_NT, NAMESPACE_XML, PREFIX_EMPTY, PREFIX_JCR, PREFIX_MIX, PREFIX_NT, PREFIX_XML`

### Constructor Summary

Constructors
`JcrNamespaceRegistry()`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getNamespaceURI​(String prefix)`
`String` `getPrefix​(String uri)`
`String[]` `getPrefixes()`
`Iterator<String>` `getPrefixes​(String namespaceURI)`
`@NotNull Collection<String>` `getRegisteredCndSystemIds()`
`String` `getURI​(String prefix)`
`String[]` `getURIs()`
`void` `registerCnd​(Reader reader, String systemId)`
`void` `registerNamespace​(String prefix, String uri)`
`void` `unregisterNamespace​(String prefix)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### 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 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`

#### 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()