public class TLcdXMLPrefixMap extends Object implements NamespaceContext, ILcdXMLPrefixMap
Constructor and Description |
---|
TLcdXMLPrefixMap()
Creates an empty prefix map.
|
TLcdXMLPrefixMap(String aNamespace,
String aPrefix)
Creates a prefix map with a single namespace.
|
Modifier and Type | Method and Description |
---|---|
void |
addPrefix(String aNamespaceURI,
String aPrefix)
Adds the given (namespace, prefix) mapping to this map.
|
int |
getNamespaceCount()
Returns the number of namespaces, available in this map.
|
String |
getNamespaceURI(int aIndex)
Returns the namespace at the given index.
|
String |
getNamespaceURI(String prefix)
Returns the namespace, corresponding with the given prefix, or
null if no
namespace is known for the given prefix. |
String |
getPrefix(String namespaceURI)
Returns the prefix, corresponding with the given namespace, or
null if no
prefix is known for the given namespace. |
Iterator |
getPrefixes(String namespaceURI) |
public int getNamespaceCount()
ILcdXMLPrefixMap
getNamespaceCount
in interface ILcdXMLPrefixMap
public String getNamespaceURI(int aIndex)
ILcdXMLPrefixMap
getNamespaceURI
in interface ILcdXMLPrefixMap
aIndex
- the index of the namespace to be returnedpublic String getNamespaceURI(String prefix)
ILcdXMLPrefixMap
null
if no
namespace is known for the given prefix.getNamespaceURI
in interface ILcdXMLPrefixMap
getNamespaceURI
in interface NamespaceContext
prefix
- the prefix for which to return its namespace.public String getPrefix(String namespaceURI)
ILcdXMLPrefixMap
null
if no
prefix is known for the given namespace.getPrefix
in interface ILcdXMLPrefixMap
getPrefix
in interface NamespaceContext
namespaceURI
- the namespace for which to return its prefix.public void addPrefix(String aNamespaceURI, String aPrefix)
ILcdXMLPrefixMap
addPrefix
in interface ILcdXMLPrefixMap
aNamespaceURI
- the namespace to be added.aPrefix
- the prefix, corresponding to the namespace that is added.public Iterator getPrefixes(String namespaceURI)
getPrefixes
in interface NamespaceContext