Package net.sf.saxon.om
Class FingerprintedQName
java.lang.Object
net.sf.saxon.om.FingerprintedQName
- All Implemented Interfaces:
- IdentityComparable,- NodeName
A QName triple (prefix, URI, local) with the additional ability to hold an integer fingerprint.
 The integer fingerprint provides a fast way of checking equality. A FingerprintedQName makes sense
 only in the context of a known NamePool, and instances must be compared only if they relate to the
 same NamePool. The fingerprint is optional, and is used only if present.
- 
Constructor SummaryConstructorsConstructorDescriptionFingerprintedQName(String prefix, NamespaceUri uri, String localName) FingerprintedQName(String prefix, NamespaceUri uri, String localName, int fingerprint) FingerprintedQName(String prefix, NamespaceUri uri, String localName, NamePool pool) FingerprintedQName(StructuredQName qName, int fingerprint) FingerprintedQName(StructuredQName qName, NamePool pool) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanstatic FingerprintedQNamefromClarkName(String expandedName) Make a FingerprintedQName from a Clark namestatic FingerprintedQNamefromEQName(String expandedName) Make a FingerprintedQName from a Clark nameGet the display name, that is the lexical QName in the form [prefix:]local-partintGet the fingerprint of this name if known.Get the local part of the QNameGet aNamespaceBindingwhose (prefix, uri) pair are the prefix and URI of this node nameGet the namespace URI of the QName.Get the prefix of the QName.Get the name in the form of a StructuredQNamebooleanAsk whether this node name representation has a known namecode and fingerprintinthashCode()Returns a hash code value for the object.booleanhasURI(NamespaceUri ns) Test whether this name is in a given namespaceintGet a hashCode that offers the guarantee that if A.isIdentical(B), then A.identityHashCode() == B.identityHashCode()booleanisIdentical(IdentityComparable other) Determine whether two IdentityComparable objects are identical.intobtainFingerprint(NamePool pool) Get the fingerprint of this name, allocating a new code from the namepool if necessarytoString()
- 
Constructor Details- 
FingerprintedQName
- 
FingerprintedQName
- 
FingerprintedQName
- 
FingerprintedQName
- 
FingerprintedQName
- 
FingerprintedQName
 
- 
- 
Method Details- 
fromClarkNameMake a FingerprintedQName from a Clark name- Parameters:
- expandedName- the name in Clark notation "{uri}local" if in a namespace, or "local" otherwise. The format "{}local" is also accepted for a name in no namespace.
- Returns:
- the constructed FingerprintedQName
- Throws:
- IllegalArgumentException- if the Clark name is malformed
 
- 
fromEQNameMake a FingerprintedQName from a Clark name- Parameters:
- expandedName- the name in EQName notation "Q{uri}local" if in a namespace, or "local" otherwise. The format "Q{}local" is also accepted for a name in no namespace.
- Returns:
- the constructed FingerprintedQName
- Throws:
- IllegalArgumentException- if the EQName name is malformed
 
- 
hasFingerprintpublic boolean hasFingerprint()Ask whether this node name representation has a known namecode and fingerprint- Specified by:
- hasFingerprintin interface- NodeName
- Returns:
- true if the methods getFingerprint() and getNameCode() will return a result other than -1
 
- 
getFingerprintpublic int getFingerprint()Get the fingerprint of this name if known. This method should not to any work to allocate a fingerprint if none is already available- Specified by:
- getFingerprintin interface- NodeName
- Returns:
- the fingerprint if known; otherwise -1
 
- 
obtainFingerprintGet the fingerprint of this name, allocating a new code from the namepool if necessary- Specified by:
- obtainFingerprintin interface- NodeName
- Parameters:
- pool- the NamePool used to allocate the name
- Returns:
- a fingerprint for this name, newly allocated if necessary
 
- 
getDisplayNameGet the display name, that is the lexical QName in the form [prefix:]local-part- Specified by:
- getDisplayNamein interface- NodeName
- Returns:
- the lexical QName
 
- 
getPrefixGet the prefix of the QName.
- 
getNamespaceUriGet the namespace URI of the QName.- Specified by:
- getNamespaceUriin interface- NodeName
- Returns:
- the URI. Returns the empty string to represent the no-namespace
 
- 
getLocalPartGet the local part of the QName- Specified by:
- getLocalPartin interface- NodeName
- Returns:
- the local part of the QName
 
- 
getStructuredQNameGet the name in the form of a StructuredQName- Specified by:
- getStructuredQNamein interface- NodeName
- Returns:
- the name in the form of a StructuredQName
 
- 
hasURITest whether this name is in a given namespace
- 
getNamespaceBindingGet aNamespaceBindingwhose (prefix, uri) pair are the prefix and URI of this node name- Specified by:
- getNamespaceBindingin interface- NodeName
- Returns:
- the corresponding NamespaceBinding
 
- 
identityHashCodepublic int identityHashCode()Get a hashCode that offers the guarantee that if A.isIdentical(B), then A.identityHashCode() == B.identityHashCode()- Specified by:
- identityHashCodein interface- IdentityComparable
- Returns:
- a hashCode suitable for use when testing for identity.
 
- 
equals
- 
hashCodepublic int hashCode()Returns a hash code value for the object.
- 
isIdenticalDetermine whether two IdentityComparable objects are identical. This is a stronger test than equality (even schema-equality); for example two dateTime values are not identical unless they are in the same timezone.- Specified by:
- isIdenticalin interface- IdentityComparable
- Parameters:
- other- the value to be compared with
- Returns:
- true if the two values are identical, false otherwise
 
- 
toString
 
-