|
BioLegato 0.7.5 GDE plugin | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
org.biolegato.gdesupport.files.DataFormat
public abstract class DataFormat
Class to represent reading of data formats.
| Field Summary | |
|---|---|
static DataFormat |
FASTA
|
static DataFormat[] |
FORMAT_LIST
The list of available file formats |
static DataFormat |
GDEFILE
|
static DataFormat |
GDEFLAT
|
static DataFormat |
GENBANK
|
| Constructor Summary | |
|---|---|
DataFormat()
Creates a new instance of DataFormat |
|
| Method Summary | |
|---|---|
static DataFormat |
autodetect(java.io.BufferedReader data)
Used to auto-detect file formats. |
static DataFormat |
getFormat(java.lang.String hashname)
/** Finds the filetype that corresponds to the given hashname (null if not successful). |
java.lang.String |
getName()
Obtains the name of the file format for File Chooser purposes |
abstract boolean |
isFormat(java.io.Reader test)
Used to auto-detect Bio Legato formats |
static void |
readFile(Dataset datamodel,
DataFormat format,
java.io.File file)
Reads a file into the canvas |
static void |
readFile(Dataset datamodel,
java.io.File file)
Reads a file into the canvas |
abstract void |
translateFrom(Dataset datamodel,
java.io.BufferedReader data)
Translates a string from the given file format into the BioLegato internal format. |
abstract void |
translateTo(java.lang.Appendable destination,
Seq data,
int offset,
int length)
Translates a string from the BioLegato internal format to the given file format. |
static void |
writeAll(Dataset datamodel,
DataFormat format,
java.io.File file)
Writes a list of sequences to a file. |
| Methods inherited from class javax.swing.filechooser.FileFilter |
|---|
accept, getDescription |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final DataFormat GENBANK
public static final DataFormat GDEFILE
public static final DataFormat GDEFLAT
public static final DataFormat FASTA
public static final DataFormat[] FORMAT_LIST
| Constructor Detail |
|---|
public DataFormat()
| Method Detail |
|---|
public java.lang.String getName()
public abstract void translateTo(java.lang.Appendable destination,
Seq data,
int offset,
int length)
throws java.io.IOException
data - the string to convert
java.io.IOException
public abstract void translateFrom(Dataset datamodel,
java.io.BufferedReader data)
throws java.io.IOException
data - the string to convert.
java.io.IOException - any exeptions that occur while reading the stream are passed.public abstract boolean isFormat(java.io.Reader test)
test - the string to test
public static DataFormat autodetect(java.io.BufferedReader data)
data - the string to convert
public static DataFormat getFormat(java.lang.String hashname)
hashname - the hashname to search for.
public static void readFile(Dataset datamodel,
java.io.File file)
throws java.io.IOException
format - the file format to use for parsing the file.currentFile - the file to read in.
java.io.IOException
public static void readFile(Dataset datamodel,
DataFormat format,
java.io.File file)
format - the file format to use for parsing the file.currentFile - the file to read in.
public static void writeAll(Dataset datamodel,
DataFormat format,
java.io.File file)
throws java.io.IOException
file - the file to writer to.data - the contents to writer.
java.io.IOException - throws any exceptions that occur while writing to the file
|
BioLegato 0.7.5 GDE plugin | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||