public class GFFParser
extends java.lang.Object
| Constructor and Description |
|---|
GFFParser() |
| Modifier and Type | Method and Description |
|---|---|
protected GFFRecord |
createRecord(GFFDocumentHandler handler,
java.util.List aList,
java.lang.String rest,
java.lang.String comment)
Actually turns a list of tokens, some value string and a comment into a
GFFRecord and informs
handler.
|
GFFErrorHandler |
getErrorHandler()
Find the error handler used by this parser.
|
void |
parse(java.io.BufferedReader bReader,
GFFDocumentHandler handler)
Informs handler of each line of
gff read from bReader.
|
void |
parse(java.io.BufferedReader bReader,
GFFDocumentHandler handler,
java.lang.String locator)
Informs handler of each line of
GFF read from bReader
|
protected java.util.Map |
parseAttribute(java.lang.String attValList)
Parse attValList into a
Map of attributes and value lists.
|
void |
setErrorHandler(GFFErrorHandler errors)
Set the error handler used by this parser.
|
public void setErrorHandler(GFFErrorHandler errors)
public GFFErrorHandler getErrorHandler()
public void parse(java.io.BufferedReader bReader,
GFFDocumentHandler handler)
throws java.io.IOException,
BioException,
ParserException
bReader - the BufferedReader to parsehandler - the GFFDocumentHandler that will
listen for 'stuff' - class="type">IOException if for any reason
bReader throws one - class="type">BioException if
handler can not correct a parse errorjava.io.IOExceptionBioExceptionParserExceptionpublic void parse(java.io.BufferedReader bReader,
GFFDocumentHandler handler,
java.lang.String locator)
throws java.io.IOException,
BioException,
ParserException
bReader - the BufferedReader to parsehandler - the GFFDocumentHandler that will
listen for 'stuff' - class="type">IOException if for any reason
bReader throws one - class="type">BioException if
handler can not correct a parse errorjava.io.IOExceptionBioExceptionParserExceptionprotected GFFRecord createRecord(GFFDocumentHandler handler, java.util.List aList, java.lang.String rest, java.lang.String comment) throws BioException, ParserException, IgnoreRecordException
handler - a GFFDocumentHandler to inform of
any parse errors, and the completed GFFRecordaList - a List containing the 8 mandatory GFF columnsrest - a String representing the unparsed
attribute-value text, or null if there is nonecomment - a String containing the comment (without the
leading '#' character. - class="type">BioException if handler
could not correct a parse errorBioExceptionParserExceptionIgnoreRecordExceptionprotected java.util.Map parseAttribute(java.lang.String attValList)
The resulting Map will have String keys, with List values. If there are no values associated with a key, then it will have an empty List, not null as its value.
attValList - the String to parse