java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.util.graph.DotGraphUtil

public class DotGraphUtil extends Object
Util to write Dot graphs. The resulting file can be tranformed to a grapg with the command dot -Tpng -o out.png file.dot
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
  • Constructor Details

    • DotGraphUtil

      public DotGraphUtil()
  • Method Details

    • writeDirectedGraphToDotFile

      public static <T> void writeDirectedGraphToDotFile(File dotFile, List<Map.Entry<T,T>> edges, Function<T,String> nodeToId, String... graphAttributes)
    • writeDirectedGraphToDotFile

      public static <T> void writeDirectedGraphToDotFile(File dotFile, List<Map.Entry<T,T>> edges)
    • writeDirectedGraphToDotFile

      public static <T> void writeDirectedGraphToDotFile(File dotFile, Map<T,Set<T>> edges, Function<T,String> nodeToId, String... graphAttributes)
    • writeDirectedGraphToDotFile

      public static <T> void writeDirectedGraphToDotFile(File dotFile, Map<T,Set<T>> edges)
    • renderGraph

      public static <T> void renderGraph(Map<T,Set<T>> edges, File imageFile)
    • renderFilePng

      public static <T> void renderFilePng(File dotFile, File imageFile) throws IOException
      Throws:
      IOException
    • renderFile

      public static <T> void renderFile(File dotFile, File imageFile, String dotCommand, String type) throws IOException
      Throws:
      IOException
    • makeQuotedNodeID

      public static String makeQuotedNodeID(String nodeId)