public abstract class NodeImpl extends AbstractNode
This is the top-level class in the implementation class hierarchy; it essentially contains all those methods that can be defined using other primitive methods, without direct access to data.
| Modifier and Type | Field and Description |
|---|---|
protected static NodeInfo[] |
emptyArray |
protected int |
index |
protected com.icl.saxon.tree.ParentNodeImpl |
parent |
NODE_LETTERATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Constructor and Description |
|---|
NodeImpl() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order.
|
String |
generateId()
Get a character string that uniquely identifies this node within this document
(The calling code will prepend a document identifier)
|
NamedNodeMap |
getAttributes()
Return a
NamedNodeMap containing the attributes of this node (if
it is an Element ) or null otherwise. |
String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node
|
String |
getAttributeValue(String uri,
String localName)
Find the value of a given attribute of this node.
|
String |
getBaseURI()
Get the base URI for the node.
|
NodeList |
getChildNodes()
Return a
NodeList that contains all children of this node. |
String |
getDisplayName()
Get the display name of this node.
|
Element |
getDocumentElement()
Get the outermost element.
|
DocumentInfo |
getDocumentRoot()
Get the root (document) node
|
AxisEnumeration |
getEnumeration(byte axisNumber,
NodeTest nodeTest)
Return an enumeration over the nodes reached by the given axis from this node
|
int |
getFingerprint()
Get the fingerprint of the node.
|
Node |
getFirstChild()
Get first child - default implementation used for leaf nodes
|
Node |
getLastChild()
Get last child - default implementation used for leaf nodes
|
int |
getLineNumber()
Get the line number of the node within its source document entity
|
String |
getLocalName()
Get the local name of this node.
|
int |
getNameCode()
Get the nameCode of the node.
|
NamePool |
getNamePool()
Get the NamePool
|
NodeImpl |
getNextInDocument(NodeImpl anchor)
Get the next node in document order
|
Node |
getNextSibling()
Get next sibling node
|
Node |
getOriginatingNode()
Get the node corresponding to this javax.xml.transform.dom.DOMLocator
|
NodeInfo |
getParent()
Find the parent node of this node.
|
String |
getPrefix()
Get the prefix part of the name of this node.
|
NodeImpl |
getPreviousInDocument()
Get the previous node in document order
|
Node |
getPreviousSibling()
Get the previous sibling of the node
|
protected long |
getSequenceNumber()
Get the node sequence number (in document order).
|
String |
getSystemId()
Get the system ID for the node.
|
String |
getURI()
Get the URI part of the name of this node.
|
boolean |
hasAttributes()
Returns whether this node (if it is an element) has any attributes.
|
boolean |
hasChildNodes()
Determine whether the node has any children.
|
boolean |
isSameNodeInfo(NodeInfo other)
Determine whether this is the same node as another node
|
void |
outputNamespaceNodes(Outputter out,
boolean includeAncestors)
Output all namespace nodes associated with this element.
|
void |
removeNode()
Remove this node from the tree.
|
void |
setSystemId(String uri)
Set the system ID of this node.
|
appendChild, appendData, cloneNode, compareDocumentPosition, copyStringValue, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, disallowUpdate, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getColumnNumber, getData, getDoctype, getElementById, getElementsByTagName, getElementsByTagNameNS, getFeature, getImplementation, getLength, getName, getNamespaceURI, getNodeName, getNodeValue, getOwnerDocument, getOwnerElement, getParentNode, getPublicId, getSchemaTypeInfo, getSpecified, getTagName, getTextContent, getUserData, getValue, getWholeText, hasAttribute, hasAttributeNS, importNode, insertBefore, insertData, isDefaultNamespace, isElementContentWhitespace, isEqualNode, isId, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, replaceData, replaceWholeText, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setPrefix, setTextContent, setUserData, setValue, splitText, substringData, supportsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNodeTypecopy, getNodeType, getStringValueprotected static NodeInfo[] emptyArray
protected com.icl.saxon.tree.ParentNodeImpl parent
protected int index
public void setSystemId(String uri)
public boolean isSameNodeInfo(NodeInfo other)
isSameNodeInfo in interface NodeInfoisSameNodeInfo in class AbstractNodepublic int getNameCode()
getNameCode in interface NodeInfogetNameCode in class AbstractNodeallocate,
getFingerprintpublic int getFingerprint()
getFingerprint in interface NodeInfogetFingerprint in class AbstractNodepublic String generateId()
generateId in interface NodeInfogenerateId in class AbstractNodepublic Node getOriginatingNode()
getOriginatingNode in interface DOMLocatorgetOriginatingNode in class AbstractNodepublic String getSystemId()
getSystemId in interface NodeInfogetSystemId in interface SourcegetSystemId in interface SourceLocatorgetSystemId in class AbstractNodepublic String getBaseURI()
getBaseURI in interface NodeInfogetBaseURI in interface NodegetBaseURI in class AbstractNodeprotected long getSequenceNumber()
public final int compareOrder(NodeInfo other)
compareOrder in interface NodeInfocompareOrder in class AbstractNodeother - The other node, whose position is to be compared with this nodepublic NamePool getNamePool()
public String getPrefix()
public String getURI()
getURI in interface NodeInfogetURI in class AbstractNodepublic String getDisplayName()
getDisplayName in interface NodeInfogetDisplayName in class AbstractNodepublic String getLocalName()
getLocalName in interface NodeInfogetLocalName in interface NodegetLocalName in class AbstractNodepublic int getLineNumber()
getLineNumber in interface NodeInfogetLineNumber in interface SourceLocatorgetLineNumber in class AbstractNodepublic final NodeInfo getParent()
getParent in interface NodeInfogetParent in class AbstractNodepublic Node getPreviousSibling()
getPreviousSibling in interface NodegetPreviousSibling in class AbstractNodepublic Node getNextSibling()
getNextSibling in interface NodegetNextSibling in class AbstractNodepublic Node getFirstChild()
getFirstChild in interface NodegetFirstChild in class AbstractNodepublic Node getLastChild()
getLastChild in interface NodegetLastChild in class AbstractNodepublic AxisEnumeration getEnumeration(byte axisNumber, NodeTest nodeTest)
getEnumeration in interface NodeInfogetEnumeration in class AbstractNodenode - NodeInfo representing the node from which the enumeration startsnodeType - the type(s) of node to be included, e.g. NodeInfo.ELEMENT, NodeInfo.TEXT.
The value NodeInfo.NODE means include any type of node.nodeTest - A pattern to be matched by the returned nodespublic boolean hasAttributes()
hasAttributes in interface NodehasAttributes in class AbstractNodetrue if this node has any attributes,
false otherwise.public String getAttributeValue(String uri, String localName)
getAttributeValue in interface NodeInfogetAttributeValue in class AbstractNodeuri - the namespace uri of an attributelocalName - the local name of an attributepublic String getAttributeValue(int fingerprint)
getAttributeValue in interface NodeInfogetAttributeValue in class AbstractNodefingerprint - The fingerprint of the attribute namepublic Element getDocumentElement()
getDocumentElement in class AbstractNodepublic DocumentInfo getDocumentRoot()
getDocumentRoot in interface NodeInfogetDocumentRoot in class AbstractNodepublic NodeImpl getNextInDocument(NodeImpl anchor)
anchor: - the scan stops when it reaches a node that is not a descendant of the specified
anchor nodepublic NodeImpl getPreviousInDocument()
public void outputNamespaceNodes(Outputter out, boolean includeAncestors) throws TransformerException
outputNamespaceNodes in interface NodeInfooutputNamespaceNodes in class AbstractNodeout - The relevant outputterincludeAncestors - True if namespaces declared on ancestor elements must
be output; false if it is known that these are already on the result treeTransformerExceptionpublic void removeNode()
public NodeList getChildNodes()
NodeList that contains all children of this node. If
there are no children, this is a NodeList containing no
nodes.getChildNodes in interface NodegetChildNodes in class AbstractNodepublic NamedNodeMap getAttributes()
NamedNodeMap containing the attributes of this node (if
it is an Element ) or null otherwise. (DOM method)getAttributes in interface NodegetAttributes in class AbstractNodepublic boolean hasChildNodes()
hasChildNodes in interface NodeInfohasChildNodes in interface NodehasChildNodes in class AbstractNodetrue if the node has any children,
false if the node has no children.