org.eclipse.actf.model.dom.traverse
Class DomTreeNodeWalker
java.lang.Object
org.eclipse.actf.model.traverse.AbstractNodeWalker
org.eclipse.actf.model.traverse.AbstractTreeNodeWalker
org.eclipse.actf.model.dom.traverse.DomTreeNodeWalker
- All Implemented Interfaces:
- INodeWalker, ITreeNodeWalker
public class DomTreeNodeWalker
- extends AbstractTreeNodeWalker
used to walk the nodes of a DomModel
. In particular,
each node of trees walked should be an instance of org.w3c.dom.Node
.
- Author:
- Mike Squillace
- See Also:
DomModel
,
Node
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DomTreeNodeWalker
public DomTreeNodeWalker()
getChildren
public Object[] getChildren(Object element)
throws InvalidComponentException
- returns the children of the given node.
- Parameters:
element
- - node of tree
- Returns:
- children of given node or empty array if no children are found
- Throws:
InvalidComponentException
- if the element is disposed or otherwise invalid
getParent
public Object getParent(Object element)
throws InvalidComponentException
- return the parent of the given node.
- Parameters:
element
- - node of tree
- Returns:
- parent of given node or
null
if node has no parent
- Throws:
InvalidComponentException
- if component is disposed or otherwise invalid
getStartNodes
public Object[] getStartNodes()
- returns empty arrayget the starting nodes of the graph. These are the nodes of the graph that have
no predecessors.
- Returns:
- starting nodes of graph