Package org.biojava.bio.program.gff
Class GFFWriter
java.lang.Object
org.biojava.bio.program.gff.GFFWriter
- All Implemented Interfaces:
GFFDocumentHandler
Listens to a stream of GFF events and writes the lines to a
PrintWriter.
This will ignore all exceptions. Perhaps the error-handling needs to move into an error handling interface?
- Author:
- Matthew Pocock, Keith James (docs)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
commentLine
(String comment) Prints the comment directly to the PrintWriter after adding a leading '#
'.void
Flushes the PrintWriter to make sure that everything is written.void
invalidEnd
(String token, NumberFormatException nfe) void
invalidFrame
(String token, NumberFormatException nfe) void
invalidScore
(String token, NumberFormatException nfe) void
invalidStart
(String token, NumberFormatException nfe) void
invalidStrand
(String token) void
recordLine
(GFFRecord record) Prints record to the PrintWriter.void
startDocument
(String locator) Indicates that a new GFF document has been started.
-
Constructor Details
-
GFFWriter
Create a new GFFWriter that will write to out.- Parameters:
out
- the PrintWriter to write to
-
-
Method Details
-
startDocument
Description copied from interface:GFFDocumentHandler
Indicates that a new GFF document has been started. This gives you a hook to set up per-document resources.- Specified by:
startDocument
in interfaceGFFDocumentHandler
- Parameters:
locator
- A URI for the stream being parsed.
-
endDocument
Flushes the PrintWriter to make sure that everything is written.- Specified by:
endDocument
in interfaceGFFDocumentHandler
-
commentLine
Prints the comment directly to the PrintWriter after adding a leading '#
'.- Specified by:
commentLine
in interfaceGFFDocumentHandler
- Parameters:
comment
- the comment String
-
recordLine
Prints record to the PrintWriter.- Specified by:
recordLine
in interfaceGFFDocumentHandler
- Parameters:
record
- the GFFRecord containing all the info
-
invalidStart
- Throws:
BioException
-
invalidEnd
- Throws:
BioException
-
invalidScore
- Throws:
BioException
-
invalidStrand
- Throws:
BioException
-
invalidFrame
- Throws:
BioException
-