public class GenBankFile2008 extends DataFormat
FASTA, FORMAT_LIST, GDEFILE, GDEFLAT, GENBANK
Constructor and Description |
---|
GenBankFile2008()
Creates a new instance of GenBankFile2008
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File file)
Determines whether a specified file is of type GenBank file
(based on extension).
|
boolean |
convertSequence(Dataset datamodel,
java.util.Scanner source,
int x,
int y,
boolean addonly)
Converts a single sequence from a scanner into BioLegato
|
void |
convertTo(java.lang.Appendable result,
Seq seq,
int offset,
int length)
Converts data from the BioLegato's sequence canvas internal format to
the given file format.
|
java.lang.String |
getDescription()
Returns a description of the file format that can be displayed to the
user.
|
boolean |
isFormat(java.util.Scanner test)
Used as part of the DataFormat auto-detection algorithm.
|
autodetect, convertFrom, convertTo, convertTo, getFormat
public GenBankFile2008()
public void convertTo(java.lang.Appendable result, Seq seq, int offset, int length) throws java.io.IOException
convertTo
in class DataFormat
result
- the destination Appendable to write the data to.seq
- the sequence object to convert.offset
- the offset in the sequence to start the conversion.length
- the number of characters to convert.java.io.IOException
- if an error occurs while writing to the destination.public boolean convertSequence(Dataset datamodel, java.util.Scanner source, int x, int y, boolean addonly) throws java.io.IOException
convertSequence
in class DataFormat
datamodel
- the destination data model to store the converted
sequence data.source
- the data source to parse data from.x
- the X-coordinate (character offset) in the data
model to insert the converted sequence data.y
- the Y-coordinate (line) in the data model to insert
the converted sequence data.addonly
- whether to not overwrite any data in the data model,
by only adding sequence data after the end of the
data model object.java.io.IOException
- any exceptions that occur while reading the stream.public boolean isFormat(java.util.Scanner test) throws java.io.IOException
isFormat
in class DataFormat
test
- the Scanner object to parse and determine if it contains
data which can be parsed by this DataFormat object.java.io.IOException
- returns any possible I/O exceptions
(such as mark not supported)public boolean accept(java.io.File file)
accept
in class javax.swing.filechooser.FileFilter
file
- the file to testFileFilter.accept(java.io.File)
public java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter
FileFilter.getDescription()
Copyright © 2008-2022 University of Manitoba.