Package org.biojava.bio.program.gff
Interface GFFErrorHandler
-
- All Known Implementing Classes:
GFFErrorHandler.AbortErrorHandler,GFFErrorHandler.SkipRecordErrorHandler
public interface GFFErrorHandler
Interface which captures any errors which occur when parsing a GFF stream. Providing a custom implementation of this interface allows intelligent recovery from errors when parsing GFF.Each of these methods has three options:
- Throw a ParserException. This need only contain a detail message, the parser will fill in other fields. parsing will be aborted.
- Throw an IgnoreRecordException. This line of the GFF file will be ignored, but parsing will not be aborted
- Return a value for the field.
- Author:
- Thomas Down, Matthew Pocock
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classGFFErrorHandler.AbortErrorHandlerstatic classGFFErrorHandler.SkipRecordErrorHandler
-
Field Summary
Fields Modifier and Type Field Description static GFFErrorHandlerABORT_PARSINGstatic GFFErrorHandlerSKIP_RECORD
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intinvalidEnd(String token)The `end' field of the GFF entry was not a valid value.intinvalidFrame(String token)The `frame' field of the GFF entry was not a valid value.doubleinvalidScore(String token)The `score' field of the GFF entry was not a valid value.intinvalidStart(String token)The `start' field of the GFF entry was not a valid value.StrandedFeature.StrandinvalidStrand(String token)The `strand' field of the GFF entry was not a valid value.
-
-
-
Field Detail
-
ABORT_PARSING
static final GFFErrorHandler ABORT_PARSING
-
SKIP_RECORD
static final GFFErrorHandler SKIP_RECORD
-
-
Method Detail
-
invalidStart
int invalidStart(String token) throws ParserException, IgnoreRecordException
The `start' field of the GFF entry was not a valid value.- Parameters:
token- The start token found.- Returns:
- A parsed value, if this is possible
- Throws:
ParserException- If parsing should be abortedIgnoreRecordException- If this record should be silently skipped.
-
invalidEnd
int invalidEnd(String token) throws ParserException, IgnoreRecordException
The `end' field of the GFF entry was not a valid value.- Parameters:
token- The end token found.- Returns:
- A parsed value, if this is possible
- Throws:
ParserException- If parsing should be abortedIgnoreRecordException- If this record should be silently skipped.
-
invalidScore
double invalidScore(String token) throws ParserException, IgnoreRecordException
The `score' field of the GFF entry was not a valid value.- Parameters:
token- The score token found.- Returns:
- A parsed value, if this is possible
- Throws:
ParserException- If parsing should be abortedIgnoreRecordException- If this record should be silently skipped.
-
invalidFrame
int invalidFrame(String token) throws ParserException, IgnoreRecordException
The `frame' field of the GFF entry was not a valid value.- Parameters:
token- The frame token found.- Returns:
- A parsed value, if this is possible
- Throws:
ParserException- If parsing should be abortedIgnoreRecordException- If this record should be silently skipped.
-
invalidStrand
StrandedFeature.Strand invalidStrand(String token) throws ParserException, IgnoreRecordException
The `strand' field of the GFF entry was not a valid value.- Parameters:
token- The strand token found.- Returns:
- A parsed value, if this is possible
- Throws:
ParserException- If parsing should be abortedIgnoreRecordException- If this record should be silently skipped.
-
-