This project has retired. For details please refer to its Attic page.
DependencyGraphWalker

org.apache.maven.archiva.dependency.graph.walk
Interface DependencyGraphWalker

Package class diagram package DependencyGraphWalker
All Known Implementing Classes:
WalkBreadthFirstSearch, WalkDepthFirstSearch

public interface DependencyGraphWalker

Walk nodes of the DependencyGraph.


Field Summary
static java.lang.Integer PROCESSING
          A getNodeVisitState(ArtifactReference) for a node that is actively being processed, but not yet finished processing.
static java.lang.Integer SEEN
          A getNodeVisitState(ArtifactReference) for a node that has been seen, and fully processed.
static java.lang.Integer UNSEEN
          A getNodeVisitState(ArtifactReference) for a node not yet seen in the walker.
 
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.
 void setEdgePredicate(org.apache.commons.collections.Predicate edgePredicate)
          Set the predicate used for edge traversal
 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.
 

Field Detail

UNSEEN

static final java.lang.Integer UNSEEN
A getNodeVisitState(ArtifactReference) for a node not yet seen in the walker.


PROCESSING

static final java.lang.Integer PROCESSING
A getNodeVisitState(ArtifactReference) for a node that is actively being processed, but not yet finished processing.


SEEN

static final java.lang.Integer SEEN
A getNodeVisitState(ArtifactReference) for a node that has been seen, and fully processed.

Method Detail

getNodeVisitState

java.lang.Integer getNodeVisitState(org.apache.maven.archiva.model.ArtifactReference artifact)
For a provided node, get the current node visit state.

Parameters:
node - the node that you are interested in.
Returns:
the state of that node. (Can be UNSEEN, PROCESSING, or SEEN )

getEdgePredicate

org.apache.commons.collections.Predicate getEdgePredicate()
Get the predicate used to determine if the walker should traverse an edge (or not).

Returns:
the Predicate that returns true for edges that should be traversed.

setEdgePredicate

void setEdgePredicate(org.apache.commons.collections.Predicate edgePredicate)
Set the predicate used for edge traversal

Parameters:
edgePredicate - the Predicate that returns true for edges that should be traversed.

visit

void visit(DependencyGraph graph,
           DependencyGraphNode startNode,
           DependencyGraphVisitor visitor)
Visit every node and edge in the graph from the startNode.

Parameters:
graph - the graph to visit.
startNode - the node to start the visit on.
visitor - the visitor object to use during this visit.

visit

void visit(DependencyGraph graph,
           DependencyGraphVisitor visitor)
Visit every node and edge in the entire graph.

Parameters:
graph - the graph to visit.
visitor - the visitor object to use during this visit.