Class TLcdXMLPrefixMap

java.lang.Object
com.luciad.format.xml.TLcdXMLPrefixMap
All Implemented Interfaces:
ILcdXMLPrefixMap, NamespaceContext

public class TLcdXMLPrefixMap extends Object implements NamespaceContext, ILcdXMLPrefixMap
Default implementation of ILcdXMLPrefixMap.
  • Constructor Details

    • TLcdXMLPrefixMap

      public TLcdXMLPrefixMap()
      Creates an empty prefix map.
    • TLcdXMLPrefixMap

      public TLcdXMLPrefixMap(String aNamespace, String aPrefix)
      Creates a prefix map with a single namespace.
      Since:
      2017.0
  • Method Details

    • getNamespaceCount

      public int getNamespaceCount()
      Description copied from interface: ILcdXMLPrefixMap
      Returns the number of namespaces, available in this map.
      Specified by:
      getNamespaceCount in interface ILcdXMLPrefixMap
      Returns:
      the number of namespaces, available in this map.
    • getNamespaceURI

      public String getNamespaceURI(int aIndex)
      Description copied from interface: ILcdXMLPrefixMap
      Returns the namespace at the given index.
      Specified by:
      getNamespaceURI in interface ILcdXMLPrefixMap
      Parameters:
      aIndex - the index of the namespace to be returned
      Returns:
      the namespace at the given indexs.
    • getNamespaceURI

      public String getNamespaceURI(String prefix)
      Description copied from interface: ILcdXMLPrefixMap
      Returns the namespace, corresponding with the given prefix, or null if no namespace is known for the given prefix.
      Specified by:
      getNamespaceURI in interface ILcdXMLPrefixMap
      Specified by:
      getNamespaceURI in interface NamespaceContext
      Parameters:
      prefix - the prefix for which to return its namespace.
      Returns:
      the namespace, corresponding with the given prefix.
    • getPrefix

      public String getPrefix(String namespaceURI)
      Description copied from interface: ILcdXMLPrefixMap
      Returns the prefix, corresponding with the given namespace, or null if no prefix is known for the given namespace.
      Specified by:
      getPrefix in interface ILcdXMLPrefixMap
      Specified by:
      getPrefix in interface NamespaceContext
      Parameters:
      namespaceURI - the namespace for which to return its prefix.
      Returns:
      the prefix, corresponding with the given namespace.
    • addPrefix

      public void addPrefix(String aNamespaceURI, String aPrefix)
      Description copied from interface: ILcdXMLPrefixMap
      Adds the given (namespace, prefix) mapping to this map.
      Specified by:
      addPrefix in interface ILcdXMLPrefixMap
      Parameters:
      aNamespaceURI - the namespace to be added.
      aPrefix - the prefix, corresponding to the namespace that is added.
    • getPrefixes

      public Iterator getPrefixes(String namespaceURI)
      Specified by:
      getPrefixes in interface NamespaceContext
      Since:
      2017.0