Package org.biojavax.bio.phylo.io.nexus
Class TreesBlockParser
java.lang.Object
org.biojavax.bio.phylo.io.nexus.NexusBlockParser.Abstract
org.biojavax.bio.phylo.io.nexus.TreesBlockParser
- All Implemented Interfaces:
NexusBlockParser
Parses Nexus taxa blocks.
- Since:
- 1.6
- Author:
- Richard Holland, Tobias Thierer, Jim Balhoff, Tiago Antao
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojavax.bio.phylo.io.nexus.NexusBlockParser
NexusBlockParser.Abstract -
Field Summary
Fields inherited from interface org.biojavax.bio.phylo.io.nexus.NexusBlockParser
UNKNOWN_BLOCK -
Constructor Summary
ConstructorsConstructorDescriptionTreesBlockParser(TreesBlockListener blockListener) Delegates to NexusBlockParser.Abstract. -
Method Summary
Modifier and TypeMethodDescriptionvoidOpening a comment tag.voidcommentText(String comment) Receiving free text inside a comment tag.voidClosing a comment tag.voidClosing a line (semi-colon encountered).voidparseToken(String token) Notifies the parser of the next token.voidThis function is called when the parser is reset before starting a new block.Methods inherited from class org.biojavax.bio.phylo.io.nexus.NexusBlockParser.Abstract
endBlock, getBlockListener, getBlockName, startBlock, wantsBracketsAndBraces
-
Constructor Details
-
TreesBlockParser
Delegates to NexusBlockParser.Abstract.- Parameters:
blockListener- the listener to send parse events to.
-
-
Method Details
-
beginComment
Description copied from interface:NexusBlockParserOpening a comment tag.- Specified by:
beginCommentin interfaceNexusBlockParser- Overrides:
beginCommentin classNexusBlockParser.Abstract
-
commentText
Description copied from interface:NexusBlockParserReceiving free text inside a comment tag.- Specified by:
commentTextin interfaceNexusBlockParser- Overrides:
commentTextin classNexusBlockParser.Abstract- Parameters:
comment- the text of the comment.- Throws:
ParseException
-
endComment
Description copied from interface:NexusBlockParserClosing a comment tag.- Specified by:
endCommentin interfaceNexusBlockParser- Overrides:
endCommentin classNexusBlockParser.Abstract
-
resetStatus
Description copied from class:NexusBlockParser.AbstractThis function is called when the parser is reset before starting a new block.- Specified by:
resetStatusin classNexusBlockParser.Abstract
-
parseToken
Description copied from interface:NexusBlockParserNotifies the parser of the next token. Comment tokens will already have been parsed out and sent separately to the text() method of the listener. Quoted strings will have been parsed and underscores converted. What this token contains is the full string, after removal of quotes if necessary. The token will never be only whitespace.- Specified by:
parseTokenin interfaceNexusBlockParser- Specified by:
parseTokenin classNexusBlockParser.Abstract- Parameters:
token- the token to parse.- Throws:
ParseException- if the token is unparseable.
-
endTokenGroup
Description copied from interface:NexusBlockParserClosing a line (semi-colon encountered). This indicates that anything received after it is on the next logical line of the block.- Specified by:
endTokenGroupin interfaceNexusBlockParser- Overrides:
endTokenGroupin classNexusBlockParser.Abstract
-