public class FingerprintedQName extends Object implements NodeName
Constructor and Description |
---|
FingerprintedQName(String prefix,
String uri,
String localName) |
FingerprintedQName(String prefix,
String uri,
String localName,
int nameCode) |
FingerprintedQName(String prefix,
String uri,
String localName,
NamePool pool) |
FingerprintedQName(StructuredQName qName,
NamePool pool) |
Modifier and Type | Method and Description |
---|---|
int |
allocateNameCode(NamePool pool)
Allocate a nameCode from the NamePool (if none has already been allocated).
|
boolean |
equals(Object other) |
static FingerprintedQName |
fromClarkName(String expandedName)
Make a FingerprintedQName from a Clark name
|
String |
getDisplayName()
Get the display name, that is the lexical QName in the form [prefix:]local-part
|
int |
getFingerprint()
Get the fingerprint of this name if known.
|
String |
getLocalPart()
Get the local part of the QName
|
int |
getNameCode()
Get the nameCode of this name if known.
|
NamespaceBinding |
getNamespaceBinding()
Get a
NamespaceBinding whose (prefix, uri) pair are the prefix and URI of this
node name |
String |
getPrefix()
Get the prefix of the QName.
|
StructuredQName |
getStructuredQName()
Get the name in the form of a StructuredQName
|
String |
getURI()
Get the namespace URI of the QName.
|
boolean |
hasFingerprint()
Ask whether this node name representation has a known namecode and fingerprint
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
hasURI(String ns)
Test whether this name is in a given namespace
|
int |
identityHashCode()
Get a hashCode that offers the guarantee that if A.isIdentical(B), then A.identityHashCode() == B.identityHashCode()
|
boolean |
isIdentical(IdentityComparable other)
Determine whether two IdentityComparable objects are identical.
|
boolean |
isInSameNamespace(NodeName other)
Test whether this name is in the same namespace as another name
|
void |
setNameCode(int nameCode)
Set the nameCode for this QName.
|
public FingerprintedQName(String prefix, String uri, String localName, int nameCode)
public FingerprintedQName(String prefix, String uri, String localName, NamePool pool)
public FingerprintedQName(StructuredQName qName, NamePool pool)
public static FingerprintedQName fromClarkName(String expandedName)
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.IllegalArgumentException
- if the Clark name is malformedpublic boolean hasFingerprint()
hasFingerprint
in interface NodeName
public int getFingerprint()
getFingerprint
in interface NodeName
public int getNameCode()
getNameCode
in interface NodeName
public void setNameCode(int nameCode)
nameCode
- the nameCode associated with this QName by the NamePoolpublic int allocateNameCode(NamePool pool)
allocateNameCode
in interface NodeName
pool
- the namePoolpublic String getDisplayName()
getDisplayName
in interface NodeName
public String getPrefix()
public String getURI()
public String getLocalPart()
getLocalPart
in interface NodeName
public StructuredQName getStructuredQName()
getStructuredQName
in interface NodeName
public boolean isInSameNamespace(NodeName other)
isInSameNamespace
in interface NodeName
other
- the other namepublic boolean hasURI(String ns)
public NamespaceBinding getNamespaceBinding()
NamespaceBinding
whose (prefix, uri) pair are the prefix and URI of this
node namegetNamespaceBinding
in interface NodeName
public int identityHashCode()
identityHashCode
in interface IdentityComparable
public int hashCode()
public boolean isIdentical(IdentityComparable other)
isIdentical
in interface IdentityComparable
other
- the other valueCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.