|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeName
This interface represents a node name. Actually it represents any QName, but it is intended for use as an element or attribute name. Various implementations are available.
An important requirement of an implementation of this interface is that the hashCode() and
equals() methods are implemented correctly, so that any two node names compare equal if and only
if the local name and namespace URI parts are equal under Unicode codepoint comparison. To ensure this,
the hashCode must be computed using an algorithm equivalent to that used by the implementation class
FingerprintedQName
Method Summary | |
---|---|
int |
allocateNameCode(NamePool namePool)
Get the nameCode of this name, allocating a new code from the namepool if necessary |
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 |
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 |
Method Detail |
---|
String getPrefix()
String getURI()
String getLocalPart()
String getDisplayName()
StructuredQName getStructuredQName()
boolean isInSameNamespace(NodeName other)
other
- the other name
boolean isInNamespace(String ns)
ns
- the namespace to be tested against
NamespaceBinding getNamespaceBinding()
NamespaceBinding
whose (prefix, uri) pair are the prefix and URI of this
node name
boolean hasFingerprint()
int getFingerprint()
int getNameCode()
int allocateNameCode(NamePool namePool)
namePool
- the NamePool used to allocate the name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |