public interface NexusFileListener
Modifier and Type | Interface and Description |
---|---|
static class |
NexusFileListener.Abstract
Example abstract implementation which all others should extend.
|
Modifier and Type | Method and Description |
---|---|
void |
beginComment()
Opening a comment tag.
|
void |
commentText(String comment)
Receiving free text inside a comment tag.
|
void |
endBlock()
Finished reading a block.
|
void |
endComment()
Closing a comment tag.
|
void |
endFile()
Finished reading a file.
|
void |
endTokenGroup()
Closing a line (semi-colon encountered).
|
NexusBlockParser |
getBlockParser(String blockName)
Gets the parser to use for a given block.
|
void |
parseToken(String token)
Encountered a token.
|
void |
setBlockParser(String blockName,
NexusBlockParser parser)
Sets the parser to use for a given block.
|
void |
setDefaultBlockParsers()
Causes the default block parsers to be assigned.
|
void |
startBlock(String blockName)
About to start a new block.
|
void |
startFile()
About to start a new file.
|
boolean |
wantsBracketsAndBraces()
Does the listener want to know about brackets and braces as separate
tokens?
|
void startFile()
void endFile()
void beginComment()
void commentText(String comment) throws ParseException
comment
- the text of the comment.ParseException
void endComment()
void endTokenGroup()
void setDefaultBlockParsers()
void setBlockParser(String blockName, NexusBlockParser parser)
blockName
- the name of the block.parser
- the parser to use. Use null to unset an existing
one and use the default one for that block instead.NexusBlockParser getBlockParser(String blockName)
blockName
- the name of the block. return parser the parser to use. Is
never null.void startBlock(String blockName)
blockName
- the name of the new block.void endBlock()
void parseToken(String token) throws ParseException
token
- the token.ParseException
- if the token is invalid.boolean wantsBracketsAndBraces()
Copyright © 2014 BioJava. All rights reserved.