Package org.dom4j
Class QName
java.lang.Object
org.dom4j.QName
- All Implemented Interfaces:
Serializable
QName
represents a qualified name value of an XML element or
attribute. It consists of a local name and a Namespace
instance. This
object is immutable.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DocumentFactory
The document factory used for this QName if specified or nullprivate int
A cached version of the hashcode for efficiencyprivate String
The local name of the element or attributeprivate static final String
NameChar
without colon.private static final String
NameStartChar
without colon.private Namespace
The Namespace of this element or attributeprivate static final String
NCName
private String
The qualified name of the element or attributeprivate static final Pattern
Regular expression forName
(with colon).private static final Pattern
Regular expression forNCName
.private static final Pattern
Regular expression forQName
.private static SingletonStrategy<QNameCache>
The Singleton instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
static QName
static QName
static QName
static QName
static QName
private static QNameCache
getCache()
DOCUMENT ME!getName()
DOCUMENT ME!DOCUMENT ME!DOCUMENT ME!DOCUMENT ME!DOCUMENT ME!int
hashCode()
DOCUMENT ME!private void
void
setDocumentFactory
(DocumentFactory documentFactory) toString()
private static void
validateName
(String name) protected static void
validateNCName
(String ncname) private static void
validateQName
(String qname) private void
-
Field Details
-
singleton
The Singleton instance -
NAME_START_CHAR
NameStartChar
without colon.NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
-
NAME_CHAR
NameChar
without colon.NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
-
NCNAME
NCName
NCName ::= NCNameStartChar NCNameChar* (An XML Name, minus the ":") NCNameChar ::= NameChar -':' NCNameStartChar ::= NameStartChar -':'
-
RE_NAME
Regular expression forName
(with colon).Name ::= NameStartChar (NameChar)*
-
RE_NCNAME
Regular expression forNCName
.NCName ::= NCNameStartChar NCNameChar* (An XML Name, minus the ":") NCNameChar ::= NameChar -':' NCNameStartChar ::= NameStartChar -':'
-
RE_QNAME
Regular expression forQName
.QName ::= PrefixedName | UnprefixedName PrefixedName ::= Prefix ':' LocalPart UnprefixedName ::= LocalPart Prefix ::= NCName LocalPart ::= NCName
-
name
The local name of the element or attribute -
qualifiedName
The qualified name of the element or attribute -
namespace
The Namespace of this element or attribute -
hashCode
private int hashCodeA cached version of the hashcode for efficiency -
documentFactory
The document factory used for this QName if specified or null
-
-
Constructor Details
-
QName
-
QName
-
QName
-
-
Method Details
-
get
-
get
-
get
-
get
-
get
-
getName
DOCUMENT ME!- Returns:
- the local name
-
getQualifiedName
DOCUMENT ME!- Returns:
- the qualified name in the format
prefix:localName
-
getNamespace
DOCUMENT ME!- Returns:
- the namespace of this QName
-
getNamespacePrefix
DOCUMENT ME!- Returns:
- the namespace URI of this QName
-
getNamespaceURI
DOCUMENT ME!- Returns:
- the namespace URI of this QName
-
hashCode
public int hashCode()DOCUMENT ME! -
equals
-
toString
-
getDocumentFactory
DOCUMENT ME!- Returns:
- the factory that should be used for Elements of this QName
-
setDocumentFactory
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
IOException
ClassNotFoundException
-
getCache
-
validateName
-
validateNCName
-
validateQName
-