|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojavax.bio.phylo.io.nexus.NexusFileListener.Abstract
public abstract static class NexusFileListener.Abstract
Example abstract implementation which all others should extend.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.biojavax.bio.phylo.io.nexus.NexusFileListener |
---|
NexusFileListener.Abstract |
Constructor Summary | |
---|---|
NexusFileListener.Abstract()
|
Method Summary | |
---|---|
void |
beginComment()
Opening a comment tag. |
protected abstract void |
beginFileComment()
This method will get called when a comment is started on the file, and not any block within it. |
protected abstract void |
blockEnded(NexusBlockParser blockParser)
This method gets called when the block parser is expected to have finished parsing a block. |
void |
commentText(java.lang.String comment)
Receiving free text inside a comment tag. |
void |
endBlock()
Finished reading a block. |
void |
endComment()
Closing a comment tag. |
protected abstract void |
endFileComment()
This method will get called when a comment is ended on the file, and not any block within it. |
void |
endTokenGroup()
Closing a line (semi-colon encountered). |
protected abstract void |
fileCommentText(java.lang.String comment)
This method will get called when comment text is found on the file, and not any block within it. |
NexusBlockParser |
getBlockParser(java.lang.String blockName)
Gets the parser to use for a given block. |
void |
parseToken(java.lang.String token)
Encountered a token. |
void |
setBlockParser(java.lang.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(java.lang.String blockName)
About to start a new block. |
boolean |
wantsBracketsAndBraces()
Does the listener want to know about brackets and braces as separate tokens? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.biojavax.bio.phylo.io.nexus.NexusFileListener |
---|
endFile, startFile |
Constructor Detail |
---|
public NexusFileListener.Abstract()
Method Detail |
---|
public void beginComment()
NexusFileListener
beginComment
in interface NexusFileListener
protected abstract void beginFileComment()
public void commentText(java.lang.String comment) throws ParseException
NexusFileListener
commentText
in interface NexusFileListener
comment
- the text of the comment.
ParseException
protected abstract void fileCommentText(java.lang.String comment)
comment
- the comment text.public void endComment()
NexusFileListener
endComment
in interface NexusFileListener
protected abstract void endFileComment()
public void endBlock()
NexusFileListener
endBlock
in interface NexusFileListener
protected abstract void blockEnded(NexusBlockParser blockParser)
blockParser
- the parser that has finished.public boolean wantsBracketsAndBraces()
NexusFileListener
wantsBracketsAndBraces
in interface NexusFileListener
public void setDefaultBlockParsers()
NexusFileListener
setDefaultBlockParsers
in interface NexusFileListener
public NexusBlockParser getBlockParser(java.lang.String blockName)
NexusFileListener
getBlockParser
in interface NexusFileListener
blockName
- the name of the block. return parser the parser to use. Is
never null.public void endTokenGroup()
NexusFileListener
endTokenGroup
in interface NexusFileListener
public void parseToken(java.lang.String token) throws ParseException
NexusFileListener
parseToken
in interface NexusFileListener
token
- the token.
ParseException
- if the token is invalid.public void setBlockParser(java.lang.String blockName, NexusBlockParser parser)
NexusFileListener
setBlockParser
in interface NexusFileListener
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.public void startBlock(java.lang.String blockName)
NexusFileListener
startBlock
in interface NexusFileListener
blockName
- the name of the new block.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |