Skip navigation links
info.bioinfweb.jphyloio.formats.newick

Class NewickStringReader

    • Constructor Detail

      • NewickStringReader

        public NewickStringReader(TextReaderStreamDataProvider<?> streamDataProvider,
                                  java.lang.String treeID,
                                  java.lang.String treeLabel,
                                  NewickReaderNodeLabelProcessor nodeLabelProcessor,
                                  boolean expectENewick)
        Creates a new instance of this class.
        Parameters:
        streamDataProvider - the stream data provider that allows this reader to access the necessary event reader properties
        treeLabel - the label of the tree to be read (This parameter also determines whether one or more trees shall be read from the underlying reader. If a string is specified, only one tree is read and the specified label is used for it. If null is specified, multiple trees are read until the end of the file is reached. None of them gets a defined label.)
        nodeLabelProcessor - the node label processor to be used to possibly translate node labels in Newick strings
        Throws:
        java.lang.NullPointerException - if streamDataProvider or nodeLabelProcessor are null
    • Method Detail

      • addNextEvents

        public boolean addNextEvents()
                              throws java.io.IOException
        Creates the next JPhyloIO event(s) from the Newick string provided by the underlying reader.
        Returns:
        true if more events were add to the queue or false if reading of the current tree(s) is finished.
        Throws:
        java.io.IOException