data.exporters
Class ExporterTreeML

java.lang.Object
  extended by data.exporters.ExporterTreeML

public class ExporterTreeML
extends java.lang.Object

This class allow export Tree objects as TreeML files. It's mainly used to be the input of Prefuse visualitzation, but it could have other uses...

Version:
1.0
Author:
Oscar Flores

Constructor Summary
ExporterTreeML()
           
 
Method Summary
static java.io.File writeTreeML(Tree t)
          Creates a temporal file containing the exported tree in TreeML format
private static void writeTreeML(TreeNode t, int level, Matrix mat, java.io.OutputStreamWriter out)
          Writes recursively all the tree nodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExporterTreeML

public ExporterTreeML()
Method Detail

writeTreeML

public static java.io.File writeTreeML(Tree t)
                                throws DataException
Creates a temporal file containing the exported tree in TreeML format

Parameters:
t - Tree to export
Returns:
Temporal file with TreeML tree
Throws:
DataException

writeTreeML

private static void writeTreeML(TreeNode t,
                                int level,
                                Matrix mat,
                                java.io.OutputStreamWriter out)
                         throws java.io.IOException
Writes recursively all the tree nodes

Parameters:
t - Current TreeNode
level - Current identation level
mat - Reference Matrix
out - OutputStreamWriter of temp File
Throws:
java.io.IOException