X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFileFormatI.java;h=0593d1e3613a78c7ca20b222c3d9a003d476740d;hb=92d5aeaf6d48b15a8122060f7dd32f16d2f552dc;hp=c9d56ae4c0e030a3e9911908278693f7a274225b;hpb=8dd4255a671e95df3fc6d6bc4d5d6b172f682c5d;p=jalview.git diff --git a/src/jalview/io/FileFormatI.java b/src/jalview/io/FileFormatI.java index c9d56ae..0593d1e 100644 --- a/src/jalview/io/FileFormatI.java +++ b/src/jalview/io/FileFormatI.java @@ -1,5 +1,7 @@ package jalview.io; +import jalview.datamodel.AlignmentI; + import java.io.IOException; public interface FileFormatI @@ -8,12 +10,54 @@ public interface FileFormatI 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(); boolean isComplexAlignFile(); - String getShortDescription(); - + /** + * Returns a comma-separated list of file extensions associated with the + * format + * + * @return + */ + String getExtensions(); + + /** + * 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. + * + * @return + */ + boolean isReadable(); + + /** + * 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. + * + * @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 a 3D structure + * + * @return + */ + boolean isStructureFile(); }