fr.orsay.lri.varna.models.treealign
Class TreeGraphviz

java.lang.Object
  extended by fr.orsay.lri.varna.models.treealign.TreeGraphviz

public class TreeGraphviz
extends Object

This class translates a Tree to a graphviz file.

Author:
Raphael Champeimont

Constructor Summary
TreeGraphviz()
           
 
Method Summary
private static String subtreeToGraphviz(Tree<? extends GraphvizDrawableNodeValue> tree)
           
static String treeToGraphviz(Tree<? extends GraphvizDrawableNodeValue> tree, String title)
          Creates a graphviz source from a Tree.
static void treeToGraphvizFile(Tree<? extends GraphvizDrawableNodeValue> tree, String filename)
          Like treeToGraphvizFile(Tree,String,String) but with the title equal to the filename.
static void treeToGraphvizFile(Tree<? extends GraphvizDrawableNodeValue> tree, String filename, String title)
          Creates a graphviz source file from a Tree.
static void treeToGraphvizPostscript(Tree<? extends GraphvizDrawableNodeValue> tree, String filename)
          Like treeToGraphvizPostscript(Tree,String,String) but with the title equal to the filename.
static void treeToGraphvizPostscript(Tree<? extends GraphvizDrawableNodeValue> tree, String filename, String title)
          Generates a PostScript file using graphviz.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeGraphviz

public TreeGraphviz()
Method Detail

treeToGraphvizPostscript

public static void treeToGraphvizPostscript(Tree<? extends GraphvizDrawableNodeValue> tree,
                                            String filename,
                                            String title)
                                     throws IOException
Generates a PostScript file using graphviz. The dot command must be available.

Throws:
IOException

treeToGraphvizPostscript

public static void treeToGraphvizPostscript(Tree<? extends GraphvizDrawableNodeValue> tree,
                                            String filename)
                                     throws IOException
Like treeToGraphvizPostscript(Tree,String,String) but with the title equal to the filename.

Throws:
IOException

treeToGraphvizFile

public static void treeToGraphvizFile(Tree<? extends GraphvizDrawableNodeValue> tree,
                                      String filename,
                                      String title)
                               throws IOException
Creates a graphviz source file from a Tree.

Parameters:
title - the title of the graph
Throws:
IOException

treeToGraphvizFile

public static void treeToGraphvizFile(Tree<? extends GraphvizDrawableNodeValue> tree,
                                      String filename)
                               throws IOException
Like treeToGraphvizFile(Tree,String,String) but with the title equal to the filename.

Throws:
IOException

treeToGraphviz

public static String treeToGraphviz(Tree<? extends GraphvizDrawableNodeValue> tree,
                                    String title)
Creates a graphviz source from a Tree.

Parameters:
title - the title of the graph

subtreeToGraphviz

private static String subtreeToGraphviz(Tree<? extends GraphvizDrawableNodeValue> tree)