Package org.biojavax.bio.phylo.io.nexus
Class NexusFileBuilder
java.lang.Object
org.biojavax.bio.phylo.io.nexus.NexusFileListener.Abstract
org.biojavax.bio.phylo.io.nexus.NexusFileBuilder
- All Implemented Interfaces:
NexusFileListener
Builds a Nexus file by listening to events.
- Since:
- 1.6
- Author:
- Richard Holland, Tobias Thierer, Jim Balhoff
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojavax.bio.phylo.io.nexus.NexusFileListener
NexusFileListener.Abstract -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method will get called when a comment is started on the file, and not any block within it.protected voidblockEnded(NexusBlockParser blockParser) This method gets called when the block parser is expected to have finished parsing a block.voidendFile()Finished reading a file.voidThis method will get called when a comment is ended on the file, and not any block within it.voidfileCommentText(String comment) This method will get called when comment text is found on the file, and not any block within it.Obtain the constructed file.voidCauses the default block parsers to be assigned.voidAbout to start a new file.Methods inherited from class org.biojavax.bio.phylo.io.nexus.NexusFileListener.Abstract
beginComment, commentText, endBlock, endComment, endTokenGroup, getBlockParser, parseToken, setBlockParser, startBlock, wantsBracketsAndBraces
-
Constructor Details
-
NexusFileBuilder
public NexusFileBuilder()
-
-
Method Details
-
setDefaultBlockParsers
Description copied from interface:NexusFileListenerCauses the default block parsers to be assigned. This is called by the constructor of the abstract implementation. If it is not called, then at least the unknown block parser must be set by other means.- Specified by:
setDefaultBlockParsersin interfaceNexusFileListener- Overrides:
setDefaultBlockParsersin classNexusFileListener.Abstract
-
blockEnded
Description copied from class:NexusFileListener.AbstractThis method gets called when the block parser is expected to have finished parsing a block.- Specified by:
blockEndedin classNexusFileListener.Abstract- Parameters:
blockParser- the parser that has finished.
-
startFile
Description copied from interface:NexusFileListenerAbout to start a new file. -
endFile
Description copied from interface:NexusFileListenerFinished reading a file. -
getNexusFile
Obtain the constructed file.- Returns:
- the constructed file.
-
beginFileComment
Description copied from class:NexusFileListener.AbstractThis method will get called when a comment is started on the file, and not any block within it.- Specified by:
beginFileCommentin classNexusFileListener.Abstract
-
fileCommentText
Description copied from class:NexusFileListener.AbstractThis method will get called when comment text is found on the file, and not any block within it.- Specified by:
fileCommentTextin classNexusFileListener.Abstract- Parameters:
comment- the comment text.
-
endFileComment
Description copied from class:NexusFileListener.AbstractThis method will get called when a comment is ended on the file, and not any block within it.- Specified by:
endFileCommentin classNexusFileListener.Abstract
-