Class QualifiedName

java.lang.Object
org.custommonkey.xmlunit.QualifiedName

public final class QualifiedName extends Object
Since javax.xml.namespace.QName is not present prior to Java5, this is XMLUnit's own abstraction.
  • Field Details

    • namespaceUri

      private final String namespaceUri
    • localName

      private final String localName
  • Constructor Details

    • QualifiedName

      public QualifiedName(String localName)
    • QualifiedName

      public QualifiedName(String namespaceUri, String localName)
  • Method Details

    • getNamespaceURI

      public String getNamespaceURI()
    • getLocalName

      public String getLocalName()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • valueOf

      public static QualifiedName valueOf(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.

      See Also:
    • toString

      public 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:
      toString in class Object
    • valueOf

      public static QualifiedName valueOf(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(String value, int closingBrace)
    • parsePrefixFormat

      private static QualifiedName parsePrefixFormat(String value, int colon, NamespaceContext ctx)