|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.om.AbstractNode
net.sf.saxon.tree.NodeImpl
public abstract class NodeImpl
A node in the XML parse tree representing an XML element, character content, or attribute.
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.
Field Summary | |
---|---|
protected int |
index
|
protected ParentNodeImpl |
parent
|
Fields inherited from class net.sf.saxon.om.AbstractNode |
---|
NODE_LETTER |
Fields inherited from interface net.sf.saxon.om.NodeInfo |
---|
ALL_NAMESPACES, LOCAL_NAMESPACES, NO_NAMESPACES |
Constructor Summary | |
---|---|
NodeImpl()
|
Method Summary | |
---|---|
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order. |
abstract void |
copy(Receiver out,
int whichNamespaces)
|
void |
copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations)
Copy nodes. |
String |
generateId()
Get a character string that uniquely identifies this node within this document (The calling code will prepend a document identifier) |
String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node |
String |
getBaseURI()
Get the base URI for the node. |
String |
getDisplayName()
Get the display name of this node. |
Element |
getDocumentElement()
Get the outermost element. |
DocumentInfo |
getDocumentRoot()
Get the root (document) 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 |
getLocalPart()
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 |
NodeInfo |
getRoot()
Get the root 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 |
isSameNode(NodeInfo other)
Determine whether this is the same node as another node |
AxisIterator |
iterateAxis(byte axisNumber)
Return an enumeration over the nodes reached by the given axis from this node |
AxisIterator |
iterateAxis(byte axisNumber,
NodeTest nodeTest)
Return an enumeration over the nodes reached by the given axis from this node |
void |
outputNamespaceNodes(Receiver out,
boolean includeAncestors)
Output all namespace nodes associated with this element. |
void |
setSystemId(String uri)
Set the system ID of this node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
---|
compareDocumentPosition, getFeature, getTextContent, getUserData, isDefaultNamespace, isEqualNode, isSameNode, lookupNamespaceURI, lookupPrefix, setTextContent, setUserData |
Methods inherited from interface net.sf.saxon.om.NodeInfo |
---|
getNodeKind |
Field Detail |
---|
protected ParentNodeImpl parent
protected int index
Constructor Detail |
---|
public NodeImpl()
Method Detail |
---|
public void setSystemId(String uri)
public boolean isSameNode(NodeInfo other)
isSameNode
in interface NodeInfo
isSameNode
in class AbstractNode
other
- the node to be compared with this node
public int getNameCode()
getNameCode
in interface NodeInfo
getNameCode
in class AbstractNode
allocate
,
getFingerprint
public int getFingerprint()
getFingerprint
in interface NodeInfo
getFingerprint
in class AbstractNode
public String generateId()
generateId
in interface NodeInfo
generateId
in class AbstractNode
public Node getOriginatingNode()
getOriginatingNode
in interface DOMLocator
getOriginatingNode
in class AbstractNode
public String getSystemId()
getSystemId
in interface Source
getSystemId
in interface SourceLocator
getSystemId
in interface NodeInfo
getSystemId
in class AbstractNode
public String getBaseURI()
getBaseURI
in interface NodeInfo
getBaseURI
in interface Node
getBaseURI
in class AbstractNode
protected long getSequenceNumber()
public final int compareOrder(NodeInfo other)
compareOrder
in interface NodeInfo
compareOrder
in class AbstractNode
other
- The other node, whose position is to be compared with this node
public NamePool getNamePool()
public String getPrefix()
public String getURI()
getURI
in interface NodeInfo
getURI
in class AbstractNode
public String getDisplayName()
getDisplayName
in interface NodeInfo
getDisplayName
in class AbstractNode
public String getLocalPart()
getLocalPart
in interface NodeInfo
getLocalPart
in class AbstractNode
public int getLineNumber()
getLineNumber
in interface SourceLocator
getLineNumber
in interface NodeInfo
getLineNumber
in class AbstractNode
public final NodeInfo getParent()
getParent
in interface NodeInfo
getParent
in class AbstractNode
public Node getPreviousSibling()
getPreviousSibling
in interface Node
getPreviousSibling
in class AbstractNode
public Node getNextSibling()
getNextSibling
in interface Node
getNextSibling
in class AbstractNode
public Node getFirstChild()
getFirstChild
in interface Node
getFirstChild
in class AbstractNode
public Node getLastChild()
getLastChild
in interface Node
getLastChild
in class AbstractNode
public AxisIterator iterateAxis(byte axisNumber)
axisNumber
- The axis to be iterated over
Axis
public AxisIterator iterateAxis(byte axisNumber, NodeTest nodeTest)
iterateAxis
in interface NodeInfo
iterateAxis
in class AbstractNode
axisNumber
- The axis to be iterated overnodeTest
- A pattern to be matched by the returned nodes
Axis
public boolean hasAttributes()
hasAttributes
in interface Node
hasAttributes
in class AbstractNode
true
if this node has any attributes,
false
otherwise.public String getAttributeValue(int fingerprint)
getAttributeValue
in interface NodeInfo
getAttributeValue
in class AbstractNode
fingerprint
- The fingerprint of the attribute name
public Element getDocumentElement()
getDocumentElement
in class AbstractNode
public NodeInfo getRoot()
getRoot
in interface NodeInfo
getRoot
in class AbstractNode
public DocumentInfo getDocumentRoot()
getDocumentRoot
in interface NodeInfo
getDocumentRoot
in class AbstractNode
public NodeImpl getNextInDocument(NodeImpl anchor)
anchor:
- the scan stops when it reaches a node that is not a descendant of the specified
anchor node
public NodeImpl getPreviousInDocument()
public void outputNamespaceNodes(Receiver out, boolean includeAncestors) throws TransformerException
outputNamespaceNodes
in interface NodeInfo
outputNamespaceNodes
in class AbstractNode
out
- 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 tree
TransformerException
public final void copy(Receiver out, int whichNamespaces, boolean copyAnnotations) throws TransformerException
out
- the Receiver to which the node should be copiedwhichNamespaces
- in the case of an element, controls
which namespace nodes should be copied. Values are NO_NAMESPACES,
LOCAL_NAMESPACES, ALL_NAMESPACEScopyAnnotations
- indicates whether the type annotations
of element and attribute nodes should be copied
TransformerException
public abstract void copy(Receiver out, int whichNamespaces) throws TransformerException
TransformerException
public boolean hasChildNodes()
hasChildNodes
in interface NodeInfo
hasChildNodes
in interface Node
hasChildNodes
in class AbstractNode
true
if the node has any children,
false
if the node has no children.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |