1 /* Jalview - a java multiple alignment editor
\r
2 * Copyright (C) 1998 Michele Clamp
\r
4 * This program is free software; you can redistribute it and/or
\r
5 * modify it under the terms of the GNU General Public License
\r
6 * as published by the Free Software Foundation; either version 2
\r
7 * of the License, or (at your option) any later version.
\r
9 * This program is distributed in the hope that it will be useful,
\r
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 * GNU General Public License for more details.
\r
14 * You should have received a copy of the GNU General Public License
\r
15 * along with this program; if not, write to the Free Software
\r
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
\r
23 public class FormatProperties {
\r
25 static final int FASTA = 0;
\r
26 static final int MSF = 1;
\r
27 static final int CLUSTAL = 2;
\r
28 static final int BLC = 3;
\r
29 static final int PIR = 4;
\r
30 //static final int MSP = 5;
\r
31 static final int PFAM = 5;
\r
32 // static final int POSTAL = 7;
\r
33 // static final int JNET = 8;
\r
35 static FormatPropertyVector formats = new FormatPropertyVector();
\r
38 String prefix = getDefaultClassPrefix();
\r
40 formats.add("FASTA", prefix + "FastaFile");
\r
41 formats.add("MSF", prefix + "MSFfile");
\r
42 formats.add("CLUSTAL",prefix + "ClustalFile");
\r
43 formats.add("BLC", prefix + "BLCFile");
\r
44 formats.add("PIR", prefix + "PIRFile");
\r
45 // formats.add("MSP", prefix + "MSPFile");
\r
46 formats.add("PFAM", prefix + "PfamFile");
\r
47 //formats.add("POSTAL", prefix + "PostalFile");
\r
48 // formats.add("JNET", prefix + "JnetFile");
\r
51 public static String getDefaultClassPrefix() {
\r
52 return "jalview.io.";
\r
55 static int indexOf(String format) {
\r
57 if (format != null) {
\r
58 format.toUpperCase();
\r
59 if (formats.contains(format)) {
\r
60 return formats.indexOf(format);
\r
66 public static String getClassName(int index) {
\r
67 return formats.getClassName(index);
\r
70 public static boolean contains(String format) {
\r
72 if (format != null) {
\r
73 format.toUpperCase();
\r
75 if (formats.contains(format)) {
\r
82 public static Vector getFormatNames() {
\r
83 return formats.getFormatNames();
\r
86 public static Vector getFormats() {
\r
87 return formats.getFormatNames();
\r