org.eclipse.actf.model.mozdom.traverse
Class MozillaDomTreeWalker

java.lang.Object
  extended by org.eclipse.actf.model.traverse.AbstractNodeWalker
      extended by org.eclipse.actf.model.traverse.AbstractTreeNodeWalker
          extended by org.eclipse.actf.model.mozdom.traverse.MozillaDomTreeWalker
All Implemented Interfaces:
INodeWalker, ITreeNodeWalker

public class MozillaDomTreeWalker
extends AbstractTreeNodeWalker

a tree walker for the Mozilla browser DOM. This TreeWalker is based on the hierarchy obtained from a Mozilla browser via XPCOM. Thus, each node in the tree will be expected to be an instance of org.mozilla.interfaces.nsIDOMNode.

Author:
Mike Squillace
See Also:
XPCOM API Reference

Field Summary
 
Fields inherited from class org.eclipse.actf.model.traverse.AbstractTreeNodeWalker
clCache, componentBridgeMap, configuration
 
Fields inherited from class org.eclipse.actf.model.traverse.AbstractNodeWalker
nodeFilters
 
Constructor Summary
MozillaDomTreeWalker()
           
 
Method Summary
 Object[] getChildren(Object element)
          returns the children of the given node.
 Object getParent(Object element)
          return the parent of the given node.
 Object[] getStartNodes()
          get the starting nodes of the graph.
 
Methods inherited from class org.eclipse.actf.model.traverse.AbstractTreeNodeWalker
getBridgedChild, getBridgedParent, getChild, getFilteredChildren, getFilteredSuccessorNodes, getPredecessorNodes, getSuccessorNodes, hasChildren, setComponentBridgeMap
 
Methods inherited from class org.eclipse.actf.model.traverse.AbstractNodeWalker
addNodeFilter, removeAllFilters, removeNodeFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.actf.model.traverse.INodeWalker
addNodeFilter, removeAllFilters, removeNodeFilter
 

Constructor Detail

MozillaDomTreeWalker

public MozillaDomTreeWalker()
Method Detail

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

getStartNodes

public Object[] getStartNodes()
Description copied from interface: INodeWalker
get the starting nodes of the graph. These are the nodes of the graph that have no predecessors.

Returns:
starting nodes of graph

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