X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;h=24085d22be1159a777bfd1cbf88d69c7052f90b7;hb=a7bec763a3e4f17a549115f8f9f19ee4c742c26b;hp=dca2d0c4759d47a67efc24385bc047586f5adac7;hpb=8d3d3b4edf47e543b8b352c1b2c247cfc59122a4;p=jalview.git diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index dca2d0c..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,25 +32,41 @@ 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"); - } + + 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