Package org.somox.metrics.util
Class GraphPrinter
java.lang.Object
org.somox.metrics.util.GraphPrinter
Helper class used in SoMoX to dump internal graphs in GraphML and DOT file format for debugging
and metric calibration
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
cleanOutputFolder
(String outputFolder) Clean the given folder recursively to allow dumping of new graphsstatic <V,
T> void dumpGraph
(ComponentToImplementingClassesHelper componentToClassesHelper, org.jgrapht.Graph<V, T> relationshipGraph, String outputFolder, int iteration, int subgraphNo) Dump the given graph in both DOT and GraphML format
-
Field Details
-
ORIGINAL_GRAPH
public static final int ORIGINAL_GRAPH- See Also:
-
PROJECTED_GRAPH
public static final int PROJECTED_GRAPH- See Also:
-
graphFolderSegment
- See Also:
-
-
Constructor Details
-
GraphPrinter
public GraphPrinter()
-
-
Method Details
-
cleanOutputFolder
Clean the given folder recursively to allow dumping of new graphs- Parameters:
outputFolder
- The folder to delete
-
dumpGraph
public static <V,T> void dumpGraph(ComponentToImplementingClassesHelper componentToClassesHelper, org.jgrapht.Graph<V, T> relationshipGraph, String outputFolder, int iteration, int subgraphNo) Dump the given graph in both DOT and GraphML format- Type Parameters:
V
- Type of the graph's verticesT
- Type of the graph's edges- Parameters:
componentToClassesHelper
- Helper class used to retrieve the classes implementing a componentrelationshipGraph
- The graph to dumpoutputFolder
- The folder in which the graph is dumpediteration
- Iteration number used to create the filenamesubgraphNo
- Subgraph number used to create the filename
-