org.eclipse.actf.model.traverse
Interface INodeWalker

All Known Subinterfaces:
ITreeNodeWalker
All Known Implementing Classes:
AbstractNodeWalker, AbstractTreeNodeWalker, AccessibleElementTreeWalker, ContainerTreeNodeWalker, DomTreeNodeWalker, SwtTreeNodeWalker

public interface INodeWalker


Method Summary
 void addNodeFilter(INodeFilter filter)
          adds a filter to the list of filters through which nodes will be passed when successor nodes are retreaved via the getFilteredSuccessorNodes method.
 Object[] getFilteredSuccessorNodes(Object node)
          retreave the direct successors of the given element that pass each of the node filters added via the addNodeFilter method.
 Object[] getPredecessorNodes(Object node)
          retreave the direct predecessors of the given element.
 Object[] getStartNodes()
          get the starting nodes of the graph.
 Object[] getSuccessorNodes(Object node)
          retreave the direct successors of the given element.
 INodeFilter[] removeAllFilters()
          removes all filters from this walker
 void removeNodeFilter(INodeFilter filter)
          removes the specified filter from the list of filters through which a node is passed when getFilteredSuccessorNodes is called.
 

Method Detail

addNodeFilter

void addNodeFilter(INodeFilter filter)
adds a filter to the list of filters through which nodes will be passed when successor nodes are retreaved via the getFilteredSuccessorNodes method. If an identical filter is already in the list of filters, this method does nothing.

Parameters:
filter -
See Also:
getFilteredSuccessorNodes(Object)

removeNodeFilter

void removeNodeFilter(INodeFilter filter)
removes the specified filter from the list of filters through which a node is passed when getFilteredSuccessorNodes is called.

Parameters:
filter -
See Also:
getFilteredSuccessorNodes(Object)

removeAllFilters

INodeFilter[] removeAllFilters()
removes all filters from this walker

Returns:
all removed filters

getStartNodes

Object[] getStartNodes()
get the starting nodes of the graph. These are the nodes of the graph that have no predecessors.

Returns:
starting nodes of graph

getPredecessorNodes

Object[] getPredecessorNodes(Object node)
                             throws InvalidComponentException
retreave the direct predecessors of the given element. The direct predecessors of the given element are those elements that are connected to the given element via a single edge and serve as heads on that edge, permitting the given element to serve as the tail.

Parameters:
node - - node for which direct predecessors are desired
Returns:
direct predecessors of given node or empty array if no predecessors are present
Throws:
InvalidComponentException

getSuccessorNodes

Object[] getSuccessorNodes(Object node)
                           throws InvalidComponentException
retreave the direct successors of the given element. The direct successors of the given element are those elements that are connected to the given element via a single edge and serve as tails on that edge, permitting the given element to serve as the head.

Parameters:
node - - node for which direct successors are desired
Returns:
direct successors of given node or empty array if no successors are present
Throws:
InvalidComponentException

getFilteredSuccessorNodes

Object[] getFilteredSuccessorNodes(Object node)
                                   throws InvalidComponentException
retreave the direct successors of the given element that pass each of the node filters added via the addNodeFilter method. The direct successors of the given element are those elements that are connected to the given element via a single edge and serve as tails on that edge, permitting the given element to serve as the head.

If no filters have been added or if all filters pass all successor nodes, then this method is equivalent to getSuccessorNodes.

Parameters:
node - - node for which direct successors are desired
Returns:
direct successors of given node (filtered) or empty array if no successors are present
Throws:
InvalidComponentException
See Also:
addNodeFilter(INodeFilter)