Class RegistryNamespaceResolver

  • All Implemented Interfaces:
    NamespaceResolver

    public class RegistryNamespaceResolver
    extends java.lang.Object
    implements NamespaceResolver
    Namespace resolver based on the repository-wide namespace mappings stored in a namespace registry.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getPrefix​(java.lang.String uri)
      Returns the prefix which is mapped to the given URI.
      java.lang.String getURI​(java.lang.String prefix)
      Returns the URI to which the given prefix is mapped.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RegistryNamespaceResolver

        public RegistryNamespaceResolver​(NamespaceRegistry registry)
        Creates a new namespace resolver based on the given namespace registry.
        Parameters:
        registry - namespace registry
    • Method Detail

      • getURI

        public java.lang.String getURI​(java.lang.String prefix)
                                throws NamespaceException
        Description copied from interface: NamespaceResolver
        Returns the URI to which the given prefix is mapped.
        Specified by:
        getURI in interface NamespaceResolver
        Parameters:
        prefix - namespace prefix
        Returns:
        the namespace URI to which the given prefix is mapped.
        Throws:
        NamespaceException - if the prefix is unknown.