Package com.luciad.format.xml
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 TypeMethodDescriptionvoid
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.getNamespaceURI
(String aPrefix) Returns the namespace, corresponding with the given prefix, ornull
if no namespace is known for the given prefix.Returns the prefix, corresponding with the given namespace, ornull
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
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
- ifaIndex < 0 || aIndex >= getNamespaceCount()
-
getNamespaceURI
Returns the namespace, corresponding with the given prefix, ornull
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
- ifaPrefix == null
.
-
getPrefix
Returns the prefix, corresponding with the given namespace, ornull
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
- ifaNameSpaceURI == null
.
-
addPrefix
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 isnull
.
-