public class GFFFilterer extends Object implements GFFDocumentHandler
The choice to forward or drop is made by a GFFRecordFilter.
Unless otherwise stated, all methods forward to the listening handler without altering the arguments in any way.
Constructor and Description |
---|
GFFFilterer(GFFDocumentHandler handler,
GFFRecordFilter filter)
Create a new GFFFilterer that will forward
to handler everything that
filter accepts.
|
Modifier and Type | Method and Description |
---|---|
void |
commentLine(String comment)
A comment line has been encountered.
|
void |
endDocument()
Indicates that the current GFF document has now ended.
|
void |
recordLine(GFFRecord record)
Only forward the GFFRecords that match a filter.
|
void |
startDocument(String locator)
Indicates that a new GFF document has been started.
|
public GFFFilterer(GFFDocumentHandler handler, GFFRecordFilter filter)
handler
- the listening GFFDocumentHandlerfilter
- the GFFRecordFilter that decides
what is forwarded to handlerpublic void startDocument(String locator)
GFFDocumentHandler
startDocument
in interface GFFDocumentHandler
locator
- A URI for the stream being parsed.public void endDocument()
GFFDocumentHandler
This gives you the chance to flush results, or do calculations if you wish.
endDocument
in interface GFFDocumentHandler
public void commentLine(String comment)
GFFDocumentHandler
comment has already had the leading '#
'
removed, and may have had leading-and-trailing whitespace trimmed.
commentLine
in interface GFFDocumentHandler
comment
- the comment Stringpublic void recordLine(GFFRecord record)
recordLine
in interface GFFDocumentHandler
record
- the GFFRecord containing all the infoCopyright © 2020 BioJava. All rights reserved.