Package org.dom4j

Class QName

  • All Implemented Interfaces:
    java.io.Serializable

    public class QName
    extends java.lang.Object
    implements java.io.Serializable
    QName represents a qualified name value of an XML element or attribute. It consists of a local name and a Namespaceinstance. This object is immutable.
    See Also:
    Serialized Form
    • Constructor Detail

      • QName

        public QName(java.lang.String name)
      • QName

        public QName(java.lang.String name,
                     Namespace namespace)
      • QName

        public QName(java.lang.String name,
                     Namespace namespace,
                     java.lang.String qualifiedName)
    • Method Detail

      • get

        public static QName get(java.lang.String name)
      • get

        public static QName get(java.lang.String name,
                                Namespace namespace)
      • get

        public static QName get(java.lang.String name,
                                java.lang.String prefix,
                                java.lang.String uri)
      • get

        public static QName get(java.lang.String qualifiedName,
                                java.lang.String uri)
      • get

        public static QName get(java.lang.String localName,
                                Namespace namespace,
                                java.lang.String qualifiedName)
      • getName

        public java.lang.String getName()
        DOCUMENT ME!
        Returns:
        the local name
      • getQualifiedName

        public java.lang.String getQualifiedName()
        DOCUMENT ME!
        Returns:
        the qualified name in the format prefix:localName
      • getNamespace

        public Namespace getNamespace()
        DOCUMENT ME!
        Returns:
        the namespace of this QName
      • getNamespacePrefix

        public java.lang.String getNamespacePrefix()
        DOCUMENT ME!
        Returns:
        the namespace URI of this QName
      • getNamespaceURI

        public java.lang.String getNamespaceURI()
        DOCUMENT ME!
        Returns:
        the namespace URI of this QName
      • hashCode

        public int hashCode()
        DOCUMENT ME!
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hash code based on the qualified name and the URI of the namespace.
      • equals

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getDocumentFactory

        public DocumentFactory getDocumentFactory()
        DOCUMENT ME!
        Returns:
        the factory that should be used for Elements of this QName
      • setDocumentFactory

        public void setDocumentFactory(DocumentFactory documentFactory)
      • validateNCName

        protected static void validateNCName(java.lang.String ncname)