Class GraphPrinter

java.lang.Object
org.somox.metrics.util.GraphPrinter

public class GraphPrinter extends Object
Helper class used in SoMoX to dump internal graphs in GraphML and DOT file format for debugging and metric calibration
  • Field Details

  • Constructor Details

    • GraphPrinter

      public GraphPrinter()
  • Method Details

    • cleanOutputFolder

      public static void cleanOutputFolder(String outputFolder)
      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 vertices
      T - Type of the graph's edges
      Parameters:
      componentToClassesHelper - Helper class used to retrieve the classes implementing a component
      relationshipGraph - The graph to dump
      outputFolder - The folder in which the graph is dumped
      iteration - Iteration number used to create the filename
      subgraphNo - Subgraph number used to create the filename