Class NamespaceContextMap

java.lang.Object
eu.europa.esig.dss.NamespaceContextMap
All Implemented Interfaces:
NamespaceContext

public final class NamespaceContextMap extends Object implements NamespaceContext
A class for namespace context management. It is used by XPath queries.
  • Constructor Details

    • NamespaceContextMap

      public NamespaceContextMap()
      This is the default constructor
  • Method Details

    • registerNamespace

      public boolean registerNamespace(String prefix, String namespace)
      This method allows to register a namespace and associated prefix. If the prefix exists already it is replaced.
      Parameters:
      prefix - namespace prefix
      namespace - namespace
      Returns:
      true if this map did not already contain the specified element
    • getPrefixMap

      public Map<String,String> getPrefixMap()
      Returns a prefix map (a copy)
      Returns:
      a map between prefixes and their corresponding uris
    • getNamespaceURI

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

      public String getPrefix(String namespaceURI)
      Specified by:
      getPrefix in interface NamespaceContext
    • getPrefixes

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