org.apache.maven.archiva.dependency.graph.walk
Class WalkDepthFirstSearch

Package class diagram package WalkDepthFirstSearch
java.lang.Object
  extended by org.apache.maven.archiva.dependency.graph.walk.WalkDepthFirstSearch
All Implemented Interfaces:
DependencyGraphWalker

public class WalkDepthFirstSearch
extends java.lang.Object
implements DependencyGraphWalker

Perform a walk of the graph using the DepthFirstSearch algorithm. NOTE: Default edgePredicate is to NOT traverse disabled edges.


Field Summary
 
Fields inherited from interface org.apache.maven.archiva.dependency.graph.walk.DependencyGraphWalker
PROCESSING, SEEN, UNSEEN
 
Constructor Summary
WalkDepthFirstSearch()
           
 
Method Summary
 org.apache.commons.collections.Predicate getEdgePredicate()
          Get the predicate used to determine if the walker should traverse an edge (or not).
 java.lang.Integer getNodeVisitState(org.apache.maven.archiva.model.ArtifactReference artifact)
          For a provided node, get the current node visit state.
 java.lang.Integer getNodeVisitState(DependencyGraphNode node)
           
 void setEdgePredicate(org.apache.commons.collections.Predicate edgePredicate)
          Set the predicate used for edge traversal
 void setNodeVisitState(org.apache.maven.archiva.model.ArtifactReference artifact, java.lang.Integer state)
           
 void setNodeVisitState(DependencyGraphNode node, java.lang.Integer state)
           
 void visit(DependencyGraph graph, DependencyGraphNode startNode, DependencyGraphVisitor visitor)
          Visit every node and edge in the graph from the startNode.
 void visit(DependencyGraph graph, DependencyGraphVisitor visitor)
          Visit every node and edge in the entire graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WalkDepthFirstSearch

public WalkDepthFirstSearch()
Method Detail

getEdgePredicate

public org.apache.commons.collections.Predicate getEdgePredicate()
Description copied from interface: DependencyGraphWalker
Get the predicate used to determine if the walker should traverse an edge (or not).

Specified by:
getEdgePredicate in interface DependencyGraphWalker
Returns:
the Predicate that returns true for edges that should be traversed.

setEdgePredicate

public void setEdgePredicate(org.apache.commons.collections.Predicate edgePredicate)
Description copied from interface: DependencyGraphWalker
Set the predicate used for edge traversal

Specified by:
setEdgePredicate in interface DependencyGraphWalker
Parameters:
edgePredicate - the Predicate that returns true for edges that should be traversed.

getNodeVisitState

public java.lang.Integer getNodeVisitState(DependencyGraphNode node)

getNodeVisitState

public java.lang.Integer getNodeVisitState(org.apache.maven.archiva.model.ArtifactReference artifact)
Description copied from interface: DependencyGraphWalker
For a provided node, get the current node visit state.

Specified by:
getNodeVisitState in interface DependencyGraphWalker
Returns:
the state of that node. (Can be DependencyGraphWalker.UNSEEN, DependencyGraphWalker.PROCESSING, or DependencyGraphWalker.SEEN )

setNodeVisitState

public void setNodeVisitState(DependencyGraphNode node,
                              java.lang.Integer state)

setNodeVisitState

public void setNodeVisitState(org.apache.maven.archiva.model.ArtifactReference artifact,
                              java.lang.Integer state)

visit

public void visit(DependencyGraph graph,
                  DependencyGraphVisitor visitor)
Description copied from interface: DependencyGraphWalker
Visit every node and edge in the entire graph.

Specified by:
visit in interface DependencyGraphWalker
Parameters:
graph - the graph to visit.
visitor - the visitor object to use during this visit.

visit

public void visit(DependencyGraph graph,
                  DependencyGraphNode startNode,
                  DependencyGraphVisitor visitor)
Description copied from interface: DependencyGraphWalker
Visit every node and edge in the graph from the startNode.

Specified by:
visit in interface DependencyGraphWalker
Parameters:
graph - the graph to visit.
startNode - the node to start the visit on.
visitor - the visitor object to use during this visit.