JAL-2344 separated AlignmentFileI into AlignmentFileReaderI,
[jalview.git] / src / jalview / io / FileFormatI.java
1 package jalview.io;
2
3 import jalview.datamodel.AlignmentI;
4
5 import java.io.IOException;
6
7 public interface FileFormatI
8 {
9   AlignmentFileReaderI getReader(FileParse source) throws IOException;
10
11   AlignmentFileWriterI getWriter(AlignmentI al);
12
13   boolean isComplexAlignFile();
14
15   /**
16    * Answers the display name of the file format (as for example shown in menu
17    * options). This name should not be locale (language) dependent.
18    */
19   String getName();
20
21   /**
22    * Returns a comma-separated list of file extensions associated with the
23    * format
24    * 
25    * @return
26    */
27   String getExtensions();
28
29   /**
30    * Answers true if the format is one that Jalview can read. This implies that
31    * the format provides an implementation for getReader which can parse a data
32    * source for sequence data. Readable formats are included in the options in
33    * the open file dialogue.
34    * 
35    * @return
36    */
37   boolean isReadable();
38
39   /**
40    * Answers true if the format is one that Jalview can write. This implies that
41    * the object returned by getWriter provides an implementation of the print()
42    * method. Writable formats are included in the options in the Save As file
43    * dialogue, and the 'output to Textbox' option (if text format).
44    * 
45    * @return
46    */
47   boolean isWritable();
48
49   /**
50    * Answers true if the format is one that Jalview can output as text, e.g. to
51    * a text box
52    * 
53    * @return
54    */
55   boolean isTextFormat();
56
57   /**
58    * Answers true if the file format is one that provides 3D structure data
59    * 
60    * @return
61    */
62   boolean isStructureFile();
63 }