X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileFormatI.java;h=47b9103cecb36bbaeb3ba19b2f166f463a80495c;hb=95ebbef7b78bf266a8252bd479510be3c80cd234;hp=082d9f11efe94a372370b426426de0f94b6a7d17;hpb=4815037f13748676b04b91dc761b73cf6f2d6ecd;p=jalview.git diff --git a/src/jalview/io/FileFormatI.java b/src/jalview/io/FileFormatI.java index 082d9f1..47b9103 100644 --- a/src/jalview/io/FileFormatI.java +++ b/src/jalview/io/FileFormatI.java @@ -6,19 +6,19 @@ import java.io.IOException; public interface FileFormatI { + AlignmentFileI getReader(FileParse source) throws IOException; - AlignmentFileI getAlignmentFile(String inFile, DataSourceType sourceType) - throws IOException; - - AlignmentFileI getAlignmentFile(FileParse source) throws IOException; - - AlignmentFileI getAlignmentFile(AlignmentI al); - - AlignmentFileI getAlignmentFile(); + AlignmentFileI 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 * @@ -26,7 +26,38 @@ public interface FileFormatI */ String getExtensions(); + /** + * Answers true if the format is one that Jalview can read. This implies that + * 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 + */ boolean isReadable(); + /** + * Answers true if the format is one that Jalview can write. This implies that + * 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 + */ boolean isWritable(); + + /** + * Answers true if the format is one that Jalview can output as text, e.g. to + * a text box + * + * @return + */ + boolean isTextFormat(); + + /** + * Answers true if the file format is one that provides 3D structure data + * + * @return + */ + boolean isStructureFile(); }