X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileFormatI.java;h=e6f390dd58f7696f607c42f67eacb1689bbffb5e;hb=ede54837349adde8f7265c6d8fa58d14165ee215;hp=0593d1e3613a78c7ca20b222c3d9a003d476740d;hpb=70f62620b5f6158be5cd42560d549b2ea4e20c52;p=jalview.git diff --git a/src/jalview/io/FileFormatI.java b/src/jalview/io/FileFormatI.java index 0593d1e..e6f390d 100644 --- a/src/jalview/io/FileFormatI.java +++ b/src/jalview/io/FileFormatI.java @@ -6,20 +6,19 @@ import java.io.IOException; public interface FileFormatI { + AlignmentFileReaderI getReader(FileParse source) throws IOException; - AlignmentFileI getAlignmentFile(String inFile, DataSourceType sourceType) - throws IOException; - - // TODO can we get rid of one of these methods? - AlignmentFileI getAlignmentFile(FileParse source) throws IOException; - - AlignmentFileI getAlignmentFile(AlignmentI al); - - AlignmentFileI getAlignmentFile(); + AlignmentFileWriterI getWriter(AlignmentI al); boolean isComplexAlignFile(); /** + * Answers the display name of the file format (as for example shown in menu + * options). This name should not be locale (language) dependent. + */ + String getName(); + + /** * Returns a comma-separated list of file extensions associated with the * format * @@ -29,9 +28,9 @@ public interface FileFormatI /** * Answers true if the format is one that Jalview can read. This implies that - * the format provides implementations for getAlignmentFile(FileParse) and - * getAlignmentFile(String, DataSourceType) which parse the data source for - * sequence data. + * the format provides an implementation for getReader which can parse a data + * source for sequence data. Readable formats are included in the options in + * the open file dialogue. * * @return */ @@ -39,8 +38,9 @@ public interface FileFormatI /** * Answers true if the format is one that Jalview can write. This implies that - * the object returned by getAlignmentFile provides an implementation of the - * print() method. + * the object returned by getWriter provides an implementation of the print() + * method. Writable formats are included in the options in the Save As file + * dialogue, and the 'output to Textbox' option (if text format). * * @return */ @@ -55,7 +55,7 @@ public interface FileFormatI boolean isTextFormat(); /** - * Answers true if the file format is one that provides a 3D structure + * Answers true if the file format is one that provides 3D structure data * * @return */