Distinguish text-only output formats and others (.jar/.jvp)
[jalview.git] / src / jalview / io / FileFormatI.java
index 082d9f1..319df9f 100644 (file)
@@ -10,6 +10,7 @@ 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);
@@ -26,7 +27,30 @@ public interface FileFormatI
    */
   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();
 }