Package org.biojava.bio.program.gff
Class GFFWriter
- java.lang.Object
-
- org.biojava.bio.program.gff.GFFWriter
-
- All Implemented Interfaces:
GFFDocumentHandler
public class GFFWriter extends java.lang.Object implements 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 Constructor Description GFFWriter(java.io.PrintWriter out)Create a new GFFWriter that will write to out.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommentLine(java.lang.String comment)Prints the comment directly to the PrintWriter after adding a leading '#'.voidendDocument()Flushes the PrintWriter to make sure that everything is written.voidinvalidEnd(java.lang.String token, java.lang.NumberFormatException nfe)voidinvalidFrame(java.lang.String token, java.lang.NumberFormatException nfe)voidinvalidScore(java.lang.String token, java.lang.NumberFormatException nfe)voidinvalidStart(java.lang.String token, java.lang.NumberFormatException nfe)voidinvalidStrand(java.lang.String token)voidrecordLine(GFFRecord record)Prints record to the PrintWriter.voidstartDocument(java.lang.String locator)Indicates that a new GFF document has been started.
-
-
-
Method Detail
-
startDocument
public void startDocument(java.lang.String locator)
Description copied from interface:GFFDocumentHandlerIndicates that a new GFF document has been started. This gives you a hook to set up per-document resources.- Specified by:
startDocumentin interfaceGFFDocumentHandler- Parameters:
locator- A URI for the stream being parsed.
-
endDocument
public void endDocument()
Flushes the PrintWriter to make sure that everything is written.- Specified by:
endDocumentin interfaceGFFDocumentHandler
-
commentLine
public void commentLine(java.lang.String comment)
Prints the comment directly to the PrintWriter after adding a leading '#'.- Specified by:
commentLinein interfaceGFFDocumentHandler- Parameters:
comment- the comment String
-
recordLine
public void recordLine(GFFRecord record)
Prints record to the PrintWriter.- Specified by:
recordLinein interfaceGFFDocumentHandler- Parameters:
record- the GFFRecord containing all the info
-
invalidStart
public void invalidStart(java.lang.String token, java.lang.NumberFormatException nfe) throws BioException- Throws:
BioException
-
invalidEnd
public void invalidEnd(java.lang.String token, java.lang.NumberFormatException nfe) throws BioException- Throws:
BioException
-
invalidScore
public void invalidScore(java.lang.String token, java.lang.NumberFormatException nfe) throws BioException- Throws:
BioException
-
invalidStrand
public void invalidStrand(java.lang.String token) throws BioException- Throws:
BioException
-
invalidFrame
public void invalidFrame(java.lang.String token, java.lang.NumberFormatException nfe) throws BioException- Throws:
BioException
-
-