To be used correctly, the strings must be identical references for equal strings. Within the parser, these values are considered symbols and should always be retrieved from the SymbolTable
.
@see com.sun.org.apache.xerces.internal.util.SymbolTable
@author Andy Clark, IBMBetter performance patch for the equals method by Daniel Petersson: refer to jaxp issue 61; == were used to compare strings
@author Joe Wang, Oracle
@version $Id: QName.java,v 1.6 2010/03/18 19:32:31 joehw Exp $
Warning: This is a facade provided for use by user code, not for implementation. User implementations of this interface are highly likely to be incompatible with future releases of the product at both binary and source levels.
A qualified name consists of a prefix and a local name. The prefix is used as a short hand for a namespace URI.
Note, a null prefix is represented as an empty string, not a Java null.
It is common for QNames to be used as keys into HashMaps so instances of this object must implement equals and hashCode. Some helper methods are provided in the {@link NamespaceFactory} class.
@volantis-api-include-in PublicAPI @volantis-api-include-in ProfessionalServicesAPI @volantis-api-include-in InternalAPIThe 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. @version 1.1
The value of a QName contains a namespaceURI and a localPart. The localPart provides the local part of the qualified name. The namespaceURI is a URI reference identifying the namespace.
The prefix is included in the QName class to retain lexical information where present in an XML input source. The prefix is NOT used to compute the hash code or in the equals
operation. In other words, equality is defined only using the namespaceURI and the localPart.
@version 1.1
The value of a QName
contains a Namespace URI, local part and prefix.
The prefix is included in QName
to retain lexical information when present in an {@link javax.xml.transform.Source XML input source}. The prefix is NOT used in {@link #equals(Object) QName.equals(Object)} or to compute the {@link #hashCode() QName.hashCode()}. Equality and the hash code are defined using only the Namespace URI and local part.
If not specified, the Namespace URI is set to {@link javax.xml.XMLConstants#NULL_NS_URI XMLConstants.NULL_NS_URI}. If not specified, the prefix is set to {@link javax.xml.XMLConstants#DEFAULT_NS_PREFIX XMLConstants.DEFAULT_NS_PREFIX}.
QName
is immutable.
To be used correctly, the strings must be identical references for equal strings. Within the parser, these values are considered symbols and should always be retrieved from the SymbolTable
.
@see org.apache.xerces.util.SymbolTable
@author Andy Clark, IBM
@version $Id: QName.java 447247 2006-09-18 05:23:52Z mrglavas $
This class also defines a number of QName-valued constants relating to built-in types in XML Schema
A QName is immutable.
Note that a QName is not itself an {@link XdmItem} in this model; however it can be wrapped in anXdmItem.
Note: This class allows to carry a namespace prefix but it is not used in the equals() and hashCode() methods.
A qualified name is immutable once created, although the prefixed JCR name representation of the qualified name can change depending on the namespace mappings in effect.
This class also contains a number of common namespace and qualified name constants for the namespaces and names specified by the JCR specification.
The prefixed JCR name format of a qualified name is specified by section 4.6 of the the JCR 1.0 specification (JSR 170) as follows:
name ::= simplename | prefixedname simplename ::= onecharsimplename | twocharsimplename | threeormorecharname prefixedname ::= prefix ':' localname localname ::= onecharlocalname | twocharlocalname | threeormorecharname onecharsimplename ::= (* Any Unicode character except: '.', '/', ':', '[', ']', '*', ''', '"', '|' or any whitespace character *) twocharsimplename ::= '.' onecharsimplename | onecharsimplename '.' | onecharsimplename onecharsimplename onecharlocalname ::= nonspace twocharlocalname ::= nonspace nonspace threeormorecharname ::= nonspace string nonspace prefix ::= (* Any valid XML Name *) string ::= char | string char char ::= nonspace | ' ' nonspace ::= (* Any Unicode character except: '/', ':', '[', ']', '*', ''', '"', '|' or any whitespace character *)
In addition to the prefixed JCR name format, a qualified name can also be represented using the format "{namespaceURI}localPart
".
QName
represents a fully-qualified name.
@author Matthew J. Duftler (duftler@us.ibm.com)
@author Sanjiva Weerawarana (sanjiva@watson.ibm.com)
QName
represents a fully-qualified name.
@author Dirk Verbeeck
QName
represents a fully-qualified name.
To be used correctly, the strings must be identical references for equal strings. Within the parser, these values are considered symbols and should always be retrieved from the SymbolTable
.
@see org.apache.xerces.util.SymbolTable
@author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
@author Andy Clark, IBM
@version $Id: QName.java,v 1.1.2.3 2000/10/10 08:04:57 andyc Exp $
Note: This class allows to carry a namespace prefix but it is not used in the equals() and hashCode() methods.
QName
represents a qualified name value of an XML element or attribute. It consists of a local name and a {@link Namespace}instance. This object is immutable.
NOTE: this class is for internal use only.
Representation of a qualified name. This includes the JiBX serializer/deserializer methods for the representation. It assumes that the actual namespace declarations are being handled separately for marshalling
Note that this implementation treats only the namespace and local name as significant for purposes of comparing values. The prefix is held only as a convenience, and the actual prefix used when writing a value may differ from the prefix defined by the instance.
@author Dennis M. SosnoskiQualifed names are used within the repository schema, see {@link FieldType}.
They allow to re-use existing vocabularies (e.g. dublin core) without name clashes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|