1 package org.apache.maven.archiva.dependency.graph.walk;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 import org.apache.maven.archiva.dependency.graph.DependencyGraph;
23 import org.apache.maven.archiva.dependency.graph.DependencyGraphEdge;
24 import org.apache.maven.archiva.dependency.graph.DependencyGraphNode;
25 import org.apache.maven.archiva.model.ArtifactReference;
27 import java.util.ArrayList;
28 import java.util.List;
31 implements DependencyGraphVisitor
33 private List walkPath = new ArrayList();
35 private int countDiscoverGraph = 0;
37 private int countFinishGraph = 0;
39 private int countDiscoverNode = 0;
41 private int countFinishNode = 0;
43 private int countDiscoverEdge = 0;
45 private int countFinishEdge = 0;
47 public void discoverEdge( DependencyGraphEdge edge )
52 public void discoverGraph( DependencyGraph graph )
57 public void discoverNode( DependencyGraphNode node )
60 walkPath.add( ArtifactReference.toKey( node.getArtifact() ) );
63 public void finishEdge( DependencyGraphEdge edge )
68 public void finishGraph( DependencyGraph graph )
73 public void finishNode( DependencyGraphNode node )
78 public List getCollectedPath()
83 public int getCountDiscoverEdge()
85 return countDiscoverEdge;
88 public int getCountDiscoverGraph()
90 return countDiscoverGraph;
93 public int getCountDiscoverNode()
95 return countDiscoverNode;
98 public int getCountFinishEdge()
100 return countFinishEdge;
103 public int getCountFinishGraph()
105 return countFinishGraph;
108 public int getCountFinishNode()
110 return countFinishNode;