Package org.custommonkey.xmlunit
Class QualifiedName
- java.lang.Object
-
- org.custommonkey.xmlunit.QualifiedName
-
public final class QualifiedName extends java.lang.ObjectSince javax.xml.namespace.QName is not present prior to Java5, this is XMLUnit's own abstraction.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringlocalNameprivate java.lang.StringnamespaceUri
-
Constructor Summary
Constructors Constructor Description QualifiedName(java.lang.String localName)QualifiedName(java.lang.String namespaceUri, java.lang.String localName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetLocalName()java.lang.StringgetNamespaceURI()inthashCode()private static QualifiedNameparsePrefixFormat(java.lang.String value, int colon, NamespaceContext ctx)private static QualifiedNameparseQNameToString(java.lang.String value, int closingBrace)java.lang.StringtoString()Represents the QualifiedName as {NS-URI}LOCAL-NAME.static QualifiedNamevalueOf(java.lang.String value)Parses strings of the form "{NS-URI}LOCAL-NAME" or "prefix:localName" as QualifiedNames.static QualifiedNamevalueOf(java.lang.String value, NamespaceContext ctx)Parses strings of the form "{NS-URI}LOCAL-NAME" or "prefix:localName" as QualifiedNames.
-
-
-
Method Detail
-
getNamespaceURI
public java.lang.String getNamespaceURI()
-
getLocalName
public java.lang.String getLocalName()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
valueOf
public static QualifiedName valueOf(java.lang.String value)
Parses strings of the form "{NS-URI}LOCAL-NAME" or "prefix:localName" as QualifiedNames.When using the prefix-version the prefix must be defined inside the current NamespaceContext.
-
toString
public java.lang.String toString()
Represents the QualifiedName as {NS-URI}LOCAL-NAME.If the NS-URI is equal to NULL_NS_URI only the local name is returned.
- Overrides:
toStringin classjava.lang.Object
-
valueOf
public static QualifiedName valueOf(java.lang.String value, NamespaceContext ctx)
Parses strings of the form "{NS-URI}LOCAL-NAME" or "prefix:localName" as QualifiedNames.When using the prefix-version the prefix must be defined inside the NamespaceContext given as argument.
-
parseQNameToString
private static QualifiedName parseQNameToString(java.lang.String value, int closingBrace)
-
parsePrefixFormat
private static QualifiedName parsePrefixFormat(java.lang.String value, int colon, NamespaceContext ctx)
-
-