Class QName

java.lang.Object
org.htmlunit.cyberneko.xerces.xni.QName
All Implemented Interfaces:
Cloneable

public class QName extends Object implements Cloneable
A structure that holds the components of an XML Namespaces qualified name.

To be used correctly, the strings must be identical references for equal strings. Within the parser, these values are considered symbols and should always be retrieved from the SymbolTable.

See Also:
  • Field Details

    • prefix_

      private String prefix_
      The qname prefix. For example, the prefix for the qname "a:foo" is "a".
    • localpart_

      private String localpart_
      The qname localpart. For example, the localpart for the qname "a:foo" is "foo".
    • rawname_

      private String rawname_
      The qname rawname. For example, the rawname for the qname "a:foo" is "a:foo".
    • uri_

      private String uri_
      The URI to which the qname prefix is bound. This binding must be performed by a XML Namespaces aware processor.
  • Constructor Details

    • QName

      public QName()
      Default constructor.
    • QName

      public QName(String prefix, String localpart, String rawname, String uri)
    • QName

      public QName(QName qname)
  • Method Details

    • getPrefix

      public String getPrefix()
    • setPrefix

      public void setPrefix(String prefix)
    • getLocalpart

      public String getLocalpart()
    • getRawname

      public String getRawname()
    • setRawname

      public void setRawname(String rawname)
    • getUri

      public String getUri()
    • setUri

      public void setUri(String uri)
    • setValues

      public void setValues(QName qname)
      Convenience method to set the values of the qname components.
      Parameters:
      qname - The qualified name to be copied.
    • setValues

      public void setValues(String prefix, String localpart, String rawname, String uri)
      Convenience method to set the values of the qname components.
      Parameters:
      prefix - The qname prefix. (e.g. "a")
      localpart - The qname localpart. (e.g. "foo")
      rawname - The qname rawname. (e.g. "a:foo")
      uri - The URI binding. (e.g. "http://foo.com/mybinding")
    • splitQName

      public QName splitQName()
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • hashCode

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

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object