X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;h=24085d22be1159a777bfd1cbf88d69c7052f90b7;hb=3e5323394ec75b802624d4a7040f7550cf31fdbf;hp=8d2d796ae98cff03a278d8d13c64b99e2b9a73e5;hpb=a6afc82877599e6ad2c52f01249c36338f251983;p=jalview.git diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index 8d2d796..24085d2 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -32,34 +32,42 @@ public class AppletFormatAdapter { /** DOCUMENT ME!! */ - public static final Vector formats = new Vector(); + public static final String [] READABLE_FORMATS = new String[] + { + "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "STH", "PDB" + }; + + public static final String [] WRITEABLE_FORMATS = new String[] + { + "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM" + }; + public static String INVALID_CHARACTERS = "Contains invalid characters"; public static String SUPPORTED_FORMATS = "Formats currently supported are\n" + "Fasta, MSF, Clustal, BLC, PIR, MSP, and PFAM"; - static - { - formats.addElement("BLC"); - formats.addElement("CLUSTAL"); - formats.addElement("FASTA"); - formats.addElement("MSF"); - formats.addElement("PileUp"); - formats.addElement("PIR"); - formats.addElement("PFAM"); - formats.addElement("PDB"); - } - public static String FILE = "File"; public static String URL = "URL"; public static String PASTE = "Paste"; public static String CLASSLOADER = "ClassLoader"; + AlignFile afile = null; String inFile; + public static final boolean isValidFormat(String format) + { + boolean valid = false; + for(int i=0; i