public void removeCycles ( ) throws WikiApiException { DefaultEdge edge = null ; while ( ( edge = findCycle ( ) ) != null ) { Category sourceCat = wiki . getCategory ( categoryGraph . getGraph ( ) . getEdgeSource ( edge ) ) ; Category targetCat = wiki . getCategory ( categoryGraph . getGraph ( ) . getEdgeTarget ( edge ) ) ; logger . info ( "Removing cycle: " + sourceCat . getTitle ( ) + " - " + targetCat . getTitle ( ) ) ; categoryGraph . getGraph ( ) . removeEdge ( edge ) ; } }
Removes cycles from the graph that was used to construct the cycle handler .