public class NameOfNode extends Object implements NodeName
Constructor and Description |
---|
NameOfNode(NodeInfo node) |
Modifier and Type | Method and Description |
---|---|
int |
allocateNameCode(NamePool namePool)
Get the nameCode of this name, allocating a new code from the namepool if necessary
|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
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 |
isIdentical(IdentityComparable other)
Determine whether two IdentityComparable objects are identical.
|
boolean |
isInNamespace(String ns)
Test whether this name is in a given namespace
|
boolean |
isInSameNamespace(NodeName other)
Test whether this name is in the same namespace as another name
|
public NameOfNode(NodeInfo node)
public String getPrefix()
public String getURI()
public String getLocalPart()
getLocalPart
in interface NodeName
public String getDisplayName()
getDisplayName
in interface NodeName
public StructuredQName getStructuredQName()
getStructuredQName
in interface NodeName
public boolean isInSameNamespace(NodeName other)
isInSameNamespace
in interface NodeName
other
- the other namepublic boolean isInNamespace(String ns)
isInNamespace
in interface NodeName
ns
- the namespace to be tested againstpublic NamespaceBinding getNamespaceBinding()
NamespaceBinding
whose (prefix, uri) pair are the prefix and URI of this
node namegetNamespaceBinding
in interface NodeName
public boolean hasFingerprint()
hasFingerprint
in interface NodeName
public int getFingerprint()
getFingerprint
in interface NodeName
public int getNameCode()
getNameCode
in interface NodeName
public int allocateNameCode(NamePool namePool)
allocateNameCode
in interface NodeName
namePool
- the NamePool used to allocate the namepublic int hashCode()
public boolean equals(Object obj)
public boolean isIdentical(IdentityComparable other)
IdentityComparable
isIdentical
in interface IdentityComparable
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.