package jalview.io;
+import jalview.datamodel.AlignmentI;
+
import java.io.IOException;
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();
}