X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileFormat.java;h=389925e04f0237a1eb3880e2ff09532adee91916;hb=d4a6a8430fa8d954b0fc5ecdcc6a7bda424224ad;hp=21fadd2fe91de4e41fe2ec244f8d2f27a361ef99;hpb=70f98ab214fefd664892e8c8ec44811d820a802d;p=jalview.git diff --git a/src/jalview/io/FileFormat.java b/src/jalview/io/FileFormat.java index 21fadd2..389925e 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 @@ -306,7 +338,7 @@ public enum FileFormat implements FileFormatI else { StructureImportSettings.setShowSeqFeatures(true); - return new MCview.PDBfile( + return new mc_view.PDBfile( StructureImportSettings.isVisibleChainAnnotation(), StructureImportSettings.isProcessSecondaryStructure(), StructureImportSettings.isExternalSecondaryStructure(), @@ -368,7 +400,7 @@ public enum FileFormat implements FileFormatI return false; } }, - Jalview("Jalview", "jar,jvp", true, true) + Jalview("Jalview", "jvp, jar", true, true) { @Override public AlignmentFileReaderI getReader(FileParse source) @@ -392,7 +424,7 @@ public enum FileFormat implements FileFormatI @Override public boolean isIdentifiable() { - return false; + return true; } }; @@ -428,8 +460,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)