|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.betwixt.strategy.NamespacePrefixMapper
public class NamespacePrefixMapper
Maps namespace URI
's to prefixes.
When validating xml documents including namespaces, the issue of prefixes (the short expression before the colon in a universal name) becomes important. DTDs are not namespace aware and so a fixed prefixed must be chosen and used consistently. This class is used to supply consistent, user specified prefixes.
Constructor Summary | |
---|---|
NamespacePrefixMapper()
|
Method Summary | |
---|---|
protected java.lang.String |
generatePrefix(java.lang.String namespaceUri)
Generates a prefix for the given namespace Uri. |
java.lang.String |
getPrefix(java.lang.String namespaceUri)
Gets the prefix to be used with the given namespace URI |
void |
setPrefix(java.lang.String namespaceUri,
java.lang.String prefix)
Sets the prefix to be used for the given namespace URI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamespacePrefixMapper()
Method Detail |
---|
public java.lang.String getPrefix(java.lang.String namespaceUri)
namespaceUri
-
public void setPrefix(java.lang.String namespaceUri, java.lang.String prefix)
namespaceUri
- prefix
- protected java.lang.String generatePrefix(java.lang.String namespaceUri)
namespaceUri
- URI, not null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |