- /**
- * List of valid format strings used in the isValidFormat method
- */
- public static final String[] READABLE_FORMATS = new String[]
- { "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "STH",
- "PDB", "JnetFile", "RNAML", PhylipFile.FILE_DESC, "HTML" }; // ,
- // "SimpleBLAST"
- // };
-
- /**
- * List of valid format strings for use by callers of the formatSequences
- * method
- */
- public static final String[] WRITEABLE_FORMATS = new String[]
- { "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "AMSA",
- "STH", PhylipFile.FILE_DESC };
-
- /**
- * List of extensions corresponding to file format types in WRITABLE_FNAMES
- * that are writable by the application.
- */
- public static final String[] WRITABLE_EXTENSIONS = new String[]
- { "fa, fasta, mfa, fastq", "aln", "pfam", "msf", "pir", "blc", "amsa",
- "jvp", "sto,stk", "jar", PhylipFile.FILE_EXT };
-
- /**
- * List of writable formats by the application. Order must correspond with the
- * WRITABLE_EXTENSIONS list of formats.
- */
- public static final String[] WRITABLE_FNAMES = new String[]
- { "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "AMSA", "Jalview",
- "STH", "Jalview", PhylipFile.FILE_DESC };
-
- /**
- * List of readable format file extensions by application in order
- * corresponding to READABLE_FNAMES
- */
- public static final String[] READABLE_EXTENSIONS = new String[]
- { "fa, fasta, mfa, fastq", "aln", "pfam", "msf", "pir", "blc", "amsa",
- "jar,jvp", "sto,stk", "xml,rnaml", PhylipFile.FILE_EXT,
- "html" }; // ".blast"
-
- /**
- * List of readable formats by application in order corresponding to
- * READABLE_EXTENSIONS
- */
- public static final String[] READABLE_FNAMES = new String[]
- { "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "AMSA", "Jalview",
- "Stockholm", "RNAML", PhylipFile.FILE_DESC, "HTML" };// ,
-
- // "SimpleBLAST"
- // };
-
- public static String INVALID_CHARACTERS = "Contains invalid characters";
-
- // TODO: make these messages dynamic
- public static String SUPPORTED_FORMATS = "Formats currently supported are\n"
- + prettyPrint(READABLE_FORMATS);
-
- /**
- *
- * @param els
- * @return grammatically correct(ish) list consisting of els elements.
- */
- public static String prettyPrint(String[] els)
- {
- StringBuffer list = new StringBuffer();
- for (int i = 0, iSize = els.length - 1; i < iSize; i++)
- {
- list.append(els[i]);
- list.append(", ");
- }
- list.append(" and " + els[els.length - 1] + ".");
- return list.toString();
- }
-
- public static String FILE = "File";
-
- public static String URL = "URL";
-
- public static String PASTE = "Paste";
-
- public static String CLASSLOADER = "ClassLoader";