public class GFFFilterer extends java.lang.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(java.lang.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(java.lang.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(java.lang.String locator)
GFFDocumentHandlerstartDocument in interface GFFDocumentHandlerlocator - A URI for the stream being parsed.public void endDocument()
GFFDocumentHandlerThis gives you the chance to flush results, or do calculations if you wish.
endDocument in interface GFFDocumentHandlerpublic void commentLine(java.lang.String comment)
GFFDocumentHandler
comment has already had the leading '#'
removed, and may have had leading-and-trailing whitespace trimmed.
commentLine in interface GFFDocumentHandlercomment - the comment Stringpublic void recordLine(GFFRecord record)
recordLine in interface GFFDocumentHandlerrecord - the GFFRecord containing all the info