X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileFormat.java;h=00f2e5c73dff09cf10c616d6ac6c82bc199844a1;hb=c1e71094304dcd2b975c485416ec5e25cca30815;hp=4b33dbfba7d87f49d5932fa56286c81d870f78ac;hpb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;p=jalview.git diff --git a/src/jalview/io/FileFormat.java b/src/jalview/io/FileFormat.java index 4b33dbf..00f2e5c 100644 --- a/src/jalview/io/FileFormat.java +++ b/src/jalview/io/FileFormat.java @@ -20,16 +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) @@ -91,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) @@ -243,6 +244,37 @@ public enum FileFormat implements FileFormatI return new PhylipFile(); } }, + 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) + 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 @@ -276,6 +308,21 @@ public enum FileFormat implements FileFormatI return new FeaturesFile(); } }, + FeatureSettings("Jalview Feature Settings File", "fc", false, false) + { + @Override + public AlignmentFileReaderI getReader(FileParse source) + throws IOException + { + return null; + } + + @Override + public AlignmentFileWriterI getWriter(AlignmentI al) + { + return null; + } + }, ScoreMatrix("Substitution matrix", "", false, false) { @Override @@ -306,7 +353,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(), @@ -347,7 +394,7 @@ public enum FileFormat implements FileFormatI return true; } }, - Jalview("Jalview", "jar,jvp", true, true) + Jalview("Jalview", "jvp,jar", true, true) { @Override public AlignmentFileReaderI getReader(FileParse source) @@ -371,7 +418,7 @@ public enum FileFormat implements FileFormatI @Override public boolean isIdentifiable() { - return false; + return true; } }; @@ -408,7 +455,10 @@ public enum FileFormat implements FileFormatI * @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 */ private FileFormat(String shortName, String extensions, boolean isReadable, boolean isWritable)