Class 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.

    Author:
    Andy Clark, IBM
    • Constructor Detail

      • QName

        public QName()
        Default constructor.
      • QName

        public QName​(QName qname)
    • Method Detail

      • 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()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object