Home / Development / Documentation / 2.0.44 / NexusReader
TreeGraph 2
 


info.bioinfweb.treegraph.document.io.nexus
Class NexusReader

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.nexus.NexusReader
All Implemented Interfaces:
DocumentReader

public class NexusReader
extends TextStreamReader

This class reads a tree loads a tree out of a Nexus file. It uses a class that implements info.bioinfweb.treegraph.document.io.nexus.NexusTreeSelector to choose which tree to load, if there are several stored in the Nexus file.

Author:
Ben Stöver

Field Summary
 
Fields inherited from class info.bioinfweb.treegraph.document.io.AbstractDocumentReader
document, loadLogger
 
Constructor Summary
NexusReader()
          Constructs an instance of NexusReader.
 
Method Summary
 Document read(File file, LoadLogger loadLogger, NodeBranchDataAdapter internalAdapter, NodeBranchDataAdapter branchLengthAdapter, TreeSelector selector, boolean translateInternalNodes)
          If you want to implement file specific functionalities you should override this method.
 Document read(InputStream stream, LoadLogger loadLogger, NodeBranchDataAdapter internalAdapter, NodeBranchDataAdapter branchLengthAdapter, TreeSelector selector, boolean translateInternalNodes)
           
 
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
 

Constructor Detail

NexusReader

public NexusReader()
Constructs an instance of NexusReader.

Method Detail

read

public Document read(InputStream stream,
                     LoadLogger loadLogger,
                     NodeBranchDataAdapter internalAdapter,
                     NodeBranchDataAdapter branchLengthAdapter,
                     TreeSelector selector,
                     boolean translateInternalNodes)
              throws Exception
Throws:
Exception

read

public Document read(File file,
                     LoadLogger loadLogger,
                     NodeBranchDataAdapter internalAdapter,
                     NodeBranchDataAdapter branchLengthAdapter,
                     TreeSelector selector,
                     boolean translateInternalNodes)
              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)