X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileFormat.java;fp=src%2Fjalview%2Fio%2FFileFormat.java;h=1d240b26b28b00d7d3d2bb91ec8c6feea90af282;hb=0dbc8179e319d38df5e5e6904f6d2d6e833852bc;hp=cb6174015d13e2d9ebefac6736b0ad09e9d9a65a;hpb=968f580cc3b1d0ccd16cc00bacce27829b3d694b;p=jalview.git diff --git a/src/jalview/io/FileFormat.java b/src/jalview/io/FileFormat.java index cb61740..1d240b2 100644 --- a/src/jalview/io/FileFormat.java +++ b/src/jalview/io/FileFormat.java @@ -20,13 +20,14 @@ */ package jalview.io; +import java.io.IOException; + import jalview.datamodel.AlignmentI; +import jalview.datamodel.DBRefSource; import jalview.datamodel.PDBEntry; import jalview.ext.jmol.JmolParser; import jalview.structure.StructureImportSettings; -import java.io.IOException; - public enum FileFormat implements FileFormatI { Fasta("Fasta", "fa, fasta, mfa, fastq", true, true) @@ -243,6 +244,37 @@ public enum FileFormat implements FileFormatI return new PhylipFile(); } }, + GenBank("GenBank Flatfile", "gb", true, false) + { + @Override + public AlignmentFileReaderI getReader(FileParse source) + throws IOException + { + return new GenBankFile(source, "GenBank"); + } + + @Override + public AlignmentFileWriterI getWriter(AlignmentI al) + { + return null; + } + }, + Embl("ENA Flatfile", "txt", true, false) + { + @Override + public AlignmentFileReaderI getReader(FileParse source) + throws IOException + { + // Always assume we import from EMBL for now + return new EmblFlatFile(source, DBRefSource.EMBL); + } + + @Override + public AlignmentFileWriterI getWriter(AlignmentI al) + { + return null; + } + }, Jnet("JnetFile", "", false, false) { @Override @@ -407,8 +439,8 @@ public enum FileFormat implements FileFormatI * @param shortName * @param extensions * comma-separated list of file extensions associated with the format - * @param isReadable - * @param isWritable + * @param isReadable - can be recognised by IdentifyFile and imported with the given reader + * @param isWritable - can be exported with the returned writer */ private FileFormat(String shortName, String extensions, boolean isReadable, boolean isWritable)