Package org.dom4j
Class QName
- java.lang.Object
-
- org.dom4j.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 aNamespace
instance. This object is immutable.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
static QName
get(java.lang.String name)
static QName
get(java.lang.String qualifiedName, java.lang.String uri)
static QName
get(java.lang.String name, java.lang.String prefix, java.lang.String uri)
static QName
get(java.lang.String name, Namespace namespace)
static QName
get(java.lang.String localName, Namespace namespace, java.lang.String qualifiedName)
DocumentFactory
getDocumentFactory()
DOCUMENT ME!java.lang.String
getName()
DOCUMENT ME!Namespace
getNamespace()
DOCUMENT ME!java.lang.String
getNamespacePrefix()
DOCUMENT ME!java.lang.String
getNamespaceURI()
DOCUMENT ME!java.lang.String
getQualifiedName()
DOCUMENT ME!int
hashCode()
DOCUMENT ME!void
setDocumentFactory(DocumentFactory documentFactory)
java.lang.String
toString()
protected static void
validateNCName(java.lang.String ncname)
-
-
-
Method Detail
-
get
public static QName get(java.lang.String name)
-
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 classjava.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 classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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)
-
-