Home / Development / Documentation / 2.0.44 / NewickReader
TreeGraph 2
 


info.bioinfweb.treegraph.document.io.newick
Class NewickReader

java.lang.Object
  extended by info.bioinfweb.treegraph.document.io.AbstractDocumentReader
      extended by info.bioinfweb.treegraph.document.io.TextStreamReader
          extended by info.bioinfweb.treegraph.document.io.newick.NewickReader
All Implemented Interfaces:
DocumentReader

public class NewickReader
extends TextStreamReader
implements DocumentReader

Reads text files consisting only of Newick strings.

Author:
Ben Stöver

Nested Class Summary
private static class NewickReader.Status
           
 
Field Summary
 
Fields inherited from class info.bioinfweb.treegraph.document.io.AbstractDocumentReader
document, loadLogger
 
Constructor Summary
NewickReader()
          Contructs an instance of NewickReader.
 
Method Summary
 Document read(File file, LoadLogger loadLogger, NodeBranchDataAdapter internalAdapter, NodeBranchDataAdapter branchLengthsAdapter, TreeSelector selector, boolean translateInternals)
          If you want to implement file specific functionalities you should override this method.
 Document read(InputStream stream, LoadLogger loadLogger, NodeBranchDataAdapter internalAdapter, NodeBranchDataAdapter branchLengthsAdapter, TreeSelector selector, boolean translateInternals)
           
private  String[] splitDocument(String content)
           
private  String terminateNewick(String newick)
           
 
Methods inherited from class info.bioinfweb.treegraph.document.io.TextStreamReader
readStream
 
Methods inherited from class info.bioinfweb.treegraph.document.io.AbstractDocumentReader
reachElementEnd, reachElementEnd, read, read, read, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.bioinfweb.treegraph.document.io.DocumentReader
read, read, read, read
 

Constructor Detail

NewickReader

public NewickReader()
Contructs an instance of NewickReader.

Method Detail

terminateNewick

private String terminateNewick(String newick)

splitDocument

private String[] splitDocument(String content)

read

public Document read(InputStream stream,
                     LoadLogger loadLogger,
                     NodeBranchDataAdapter internalAdapter,
                     NodeBranchDataAdapter branchLengthsAdapter,
                     TreeSelector selector,
                     boolean translateInternals)
              throws Exception
Specified by:
read in interface DocumentReader
Throws:
Exception

read

public Document read(File file,
                     LoadLogger loadLogger,
                     NodeBranchDataAdapter internalAdapter,
                     NodeBranchDataAdapter branchLengthsAdapter,
                     TreeSelector selector,
                     boolean translateInternals)
              throws Exception
Description copied from class: AbstractDocumentReader
If you want to implement file specific functionalities you should override this method. It is called by all other read-methods with a file as parameter.

Specified by:
read in interface DocumentReader
Overrides:
read in class AbstractDocumentReader
Throws:
Exception
See Also:
info.bioinfweb.treegraph.document.io.DocumentReader#read(java.io.File, NodeBranchDataAdapter, int)