Deprecated
QName class represents the value of a qualified name
as specified in XML
Schema Part2: Datatypes specification.
The value of a QName contains a namespaceURI, a localPart and a prefix. The localPart provides the local part of the qualified name. The namespaceURI is a URI reference identifying the namespace.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | EMPTY_STRING
comment/shared empty string |
| private String | localPart
Field localPart |
| private String | namespaceURI
Field namespaceURI |
| private String | prefix
Field prefix |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the given object is identical to this
QName: false otherwise.the reference object with which to compare o)Overrides java. |
| public String | |
| public String | |
| public String | |
| public String | Returns: a string representation of the QNameReturns the fully qualified name of this QName |
| public int | Returns: a hash code value for this Qname objectOverrides java. |
| public boolean | |
| public String | Returns: a string representation of the QNameOverrides java. |
| public static QName |
| EMPTY_STRING | back to summary |
|---|---|
| private static final String EMPTY_STRING comment/shared empty string | |
| localPart | back to summary |
|---|---|
| private String localPart Field localPart | |
| namespaceURI | back to summary |
|---|---|
| private String namespaceURI Field namespaceURI | |
| prefix | back to summary |
|---|---|
| private String prefix Field prefix | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| QName | back to summary |
|---|---|
| public QName(String localPart) Constructor for the QName.
| |
| QName | back to summary |
|---|---|
| public QName(String namespaceURI, String localPart) Constructor for the QName. | |
| QName | back to summary |
|---|---|
| public QName(String namespaceURI, String localPart, String prefix) Constructor for the QName. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Tests this QName for equality with another object. If the given object is not a QName or String equivalent or is null then this method returns false.
For two QNames to be considered equal requires that both
localPart and namespaceURI must be equal. This method uses
Warning this equivalence is not commutative, i.e. qname.equals(string) may be true/false but string.equals(qname) is always false
This method satisfies the general contract of the
| |
| getLocalPart | back to summary |
|---|---|
| public String getLocalPart() Gets the Local part for this QName
| |
| getNamespaceURI | back to summary |
|---|---|
| public String getNamespaceURI() Gets the Namespace URI for this QName
| |
| getPrefix | back to summary |
|---|---|
| public String getPrefix() Gets the Prefix for this QName
| |
| getQualifiedName | back to summary |
|---|---|
| public String getQualifiedName() Returns the fully qualified name of this QName
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hash code value for this QName object. The hash code
is based on both the localPart and namespaceURI parts of the
QName. This method satisfies the general contract of the
| |
| matches | back to summary |
|---|---|
| public boolean matches(Object o) Tests if this QName matches another object. If the given object is not a QName or String equivalent or is null then this method returns false. For two QNames to be considered matching requires that both localPart and namespaceURI must be equal or one of them is a wildcard. If the supplied object is a String, then it is split in two on the last colon and the first half is matched against the prefix || namespaceURI and the second half is matched against the localPart
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this QName
| |
| valueOf | back to summary |
|---|---|
| public static QName valueOf(String s)
Deprecated as a consequence of Returns a QName holding the value of the specified String. The string must be in the form returned by the QName.toString() method, i.e. "{namespaceURI}localPart", with the "{namespaceURI}" part being optional. This method doesn't do a full validation of the resulting QName. In particular, it doesn't check that the resulting namespace URI is a legal URI (per RFC 2396 and RFC 2732), nor that the resulting local part is a legal NCName per the XML Namespaces specification.
| |