2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 import jalview.datamodel.AlignmentI;
25 import java.io.IOException;
27 public interface FileFormatI
29 AlignmentFileReaderI getReader(FileParse source) throws IOException;
31 AlignmentFileWriterI getWriter(AlignmentI al);
33 boolean isComplexAlignFile();
36 * Answers the display name of the file format (as for example shown in menu
37 * options). This name should not be locale (language) dependent.
42 * Returns a comma-separated list of file extensions associated with the
47 String getExtensions();
50 * Answers true if the format is one that Jalview can read. This implies that
51 * the format provides an implementation for getReader which can parse a data
52 * source for sequence data. Readable formats are included in the options in
53 * the open file dialogue.
60 * Answers true if the format is one that Jalview can write. This implies that
61 * the object returned by getWriter provides an implementation of the print()
62 * method. Writable formats are included in the options in the Save As file
63 * dialogue, and the 'output to Textbox' option (if text format).
70 * Answers true if the format is one that Jalview can output as text, e.g. to
75 boolean isTextFormat();
78 * Answers true if the file format is one that provides 3D structure data
82 boolean isStructureFile();