private static void gatherAncestors ( Vertex v, Map projectMap, Set out, Set visited ) { if ( visited.contains( v ) ) return; visited.add( v ); out.add( projectMap.get( v.getLabel() ) ); for ( Iterator i = v.getParents().iterator(); i.hasNext(); ) { Vertex parent = (Vertex) i.next(); gatherAncestors( parent, projectMap, out, visited ); } }
for (Vertex v : graph.getVerticies()) { log.debug(" " + v.getLabel()); if (!v.getParents().isEmpty()) { log.debug(" parents:"); for (Vertex parent : v.getParents()) { log.debug(" " + parent.getLabel());