public class TreeReader
extends java.lang.Object
This class contains file reading tools, to preformat file.
Modifier and Type | Field and Description |
---|---|
static int |
NEWICK
Newick format.
|
static int |
NEWICKTITLED
Newick format.
|
static int |
SIMPLE
Simple output
|
int |
treeIndex
The index
|
java.util.Vector |
trees
Trees
|
static int |
XML
XML format.
|
Constructor and Description |
---|
TreeReader(java.io.File file,
int format)
Generic constructor, from several formats
|
TreeReader(java.io.File file,
SpeciesDictionary dico,
java.util.Hashtable index,
int format)
Generic constructor, from several formats, filling a species dictionary, and an ID index
|
TreeReader(java.io.File file,
SpeciesDictionary dico,
java.util.Hashtable index,
int format,
int output)
Generic constructor, from several formats, filling a species dictionary, and an ID index
|
TreeReader(java.io.File file,
SpeciesDictionary dico,
int format)
Generic constructor, from several formats, filling a species dictionary
|
Modifier and Type | Method and Description |
---|---|
Tree |
nextTree()
Return the next tree
|
int |
toNewick(int index,
java.lang.String source,
java.lang.StringBuffer res,
SpeciesDictionary dico)
Private parser of a node, from a starting point in a newick string, to an ending point returned in an Integer object.
|
int |
toSimpleNewick(int index,
java.lang.String source,
java.lang.StringBuffer res,
SpeciesDictionary dico)
Private parser of a node, from a starting point in a newick string, to an ending point returned in an Integer object.
|
public static final int NEWICK
public static final int XML
public static final int NEWICKTITLED
public static final int SIMPLE
public java.util.Vector trees
public int treeIndex
public TreeReader(java.io.File file, int format)
file
- The tree fileformat
- The encoding formatpublic TreeReader(java.io.File file, SpeciesDictionary dico, int format)
file
- The tree filedico
- The species dictionary to fillformat
- The encoding formatpublic TreeReader(java.io.File file, SpeciesDictionary dico, java.util.Hashtable index, int format)
file
- The tree filedico
- The species dictionary to fillindex
- ID index to fillformat
- The encoding formatpublic TreeReader(java.io.File file, SpeciesDictionary dico, java.util.Hashtable index, int format, int output)
file
- The tree filedico
- The species dictionary to fillindex
- ID index to fillformat
- The encoding formatpublic int toNewick(int index, java.lang.String source, java.lang.StringBuffer res, SpeciesDictionary dico)
index
- The starting index in the newick stringsource
- The newick string, encoding the informationres
- The buffer used to return the resultdico
- The species dictionary to fillpublic int toSimpleNewick(int index, java.lang.String source, java.lang.StringBuffer res, SpeciesDictionary dico)
index
- The starting index in the newick stringsource
- The newick string, encoding the informationres
- The buffer used to return the resultdico
- The species dictionary to fillpublic Tree nextTree()