Interface ILcdXMLPrefixMap

All Known Implementing Classes:
TLcdXMLPrefixMap

public interface ILcdXMLPrefixMap
Interface for retrieval of XML namespace to prefix mappings and vice versa. It is very similar to a NamespaceContext but it also supports iterating over all used namespaces.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addPrefix(String aNamespaceURI, String aPrefix)
    Adds the given (namespace, prefix) mapping to this map.
    int
    Returns the number of namespaces, available in this map.
    getNamespaceURI(int aIndex)
    Returns the namespace at the given index.
    Returns the namespace, corresponding with the given prefix, or null if no namespace is known for the given prefix.
    getPrefix(String aNameSpaceURI)
    Returns the prefix, corresponding with the given namespace, or null if no prefix is known for the given namespace.
  • Method Details

    • getNamespaceCount

      int getNamespaceCount()
      Returns the number of namespaces, available in this map.
      Returns:
      the number of namespaces, available in this map.
    • getNamespaceURI

      String getNamespaceURI(int aIndex)
      Returns the namespace at the given index.
      Parameters:
      aIndex - the index of the namespace to be returned
      Returns:
      the namespace at the given indexs.
      Throws:
      IndexOutOfBoundsException - if aIndex < 0 || aIndex >= getNamespaceCount()
    • getNamespaceURI

      String getNamespaceURI(String aPrefix)
      Returns the namespace, corresponding with the given prefix, or null if no namespace is known for the given prefix.
      Parameters:
      aPrefix - the prefix for which to return its namespace.
      Returns:
      the namespace, corresponding with the given prefix.
      Throws:
      NullPointerException - if aPrefix == null.
    • getPrefix

      String getPrefix(String aNameSpaceURI)
      Returns the prefix, corresponding with the given namespace, or null if no prefix is known for the given namespace.
      Parameters:
      aNameSpaceURI - the namespace for which to return its prefix.
      Returns:
      the prefix, corresponding with the given namespace.
      Throws:
      NullPointerException - if aNameSpaceURI == null.
    • addPrefix

      void addPrefix(String aNamespaceURI, String aPrefix)
      Adds the given (namespace, prefix) mapping to this map.
      Parameters:
      aNamespaceURI - the namespace to be added.
      aPrefix - the prefix, corresponding to the namespace that is added.
      Throws:
      NullPointerException - if one of the arguments is null.