|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.topologi.diffx.sequence.PrefixMapping
public final class PrefixMapping
Provides a mapping of namespace URIs to prefixes.
This class can be used to reconstruct the qualified element or attribute names.
Note that for each namespace URI there can only be one prefix.
Constructor Summary | |
---|---|
PrefixMapping()
|
Method Summary | |
---|---|
void |
add(String uri,
String prefix)
Add the specified mapping if the namespace URI has not been mapped before. |
String |
getPrefix(String uri)
Returns the prefix corresponding to the given namespace URI. |
Enumeration<String> |
getURIs()
Returns an enumeration of the namespace URIs used in this mapping. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrefixMapping()
Method Detail |
---|
public void add(String uri, String prefix) throws NullPointerException
This method will ensure that the mapping is actually unique, that is that the namespace URI correspond to one and only one prefix and that the prefix only corresponds to one and only one namespace URI.
uri
- The namespace URI to map.prefix
- The prefix to use.
NullPointerException
- if the URI or prefix is null
public Enumeration<String> getURIs()
public String getPrefix(String uri)
uri
- The namespace URI to map.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |