X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FFileFormat.java;h=43c6dcf93a33192ebd6a3c7c776b4b00b9685f98;hb=e5b3e83f7ee6bc1d0a5867d9fd68a6c0098d51f0;hp=4f0480dcb30a9b90574c598cb4de540df26732c6;hpb=8550acbddfcf94dbacaae9738a4b6d4f68b16b02;p=jalview.git diff --git a/src/jalview/io/FileFormat.java b/src/jalview/io/FileFormat.java index 4f0480d..43c6dcf 100644 --- a/src/jalview/io/FileFormat.java +++ b/src/jalview/io/FileFormat.java @@ -20,17 +20,17 @@ */ 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) + Fasta("Fasta", "fa,fasta,mfa,fastq", true, true) { @Override public AlignmentFileReaderI getReader(FileParse source) @@ -92,7 +92,7 @@ public enum FileFormat implements FileFormatI return new PIRFile(); } }, - BLC("BLC", "BLC", true, true) + BLC("BLC", "blc", true, true) { @Override public AlignmentFileReaderI getReader(FileParse source) @@ -244,7 +244,22 @@ public enum FileFormat implements FileFormatI return new PhylipFile(); } }, - GenBank("GenBank/ENA Flatfile","gb",false,false) + GenBank("GenBank Flatfile", "gb,gbk", 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) @@ -253,13 +268,13 @@ public enum FileFormat implements FileFormatI // 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 @@ -364,7 +379,7 @@ public enum FileFormat implements FileFormatI return true; } }, - Jalview("Jalview", "jvp, jar", true, true) + Jalview("Jalview", "jvp,jar", true, true) { @Override public AlignmentFileReaderI getReader(FileParse source) @@ -424,8 +439,11 @@ public enum FileFormat implements FileFormatI * @param shortName * @param extensions * comma-separated list of file extensions associated with the format - * @param isReadable - can be recognised by IdentifyFile and imported with the given reader - * @param isWritable - can be exported with the returned writer + * @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)