JAL-1601 JAL-715 allow format to be specified for uploading alignments
authorJames Procter <jprocter@ls30857.local>
Fri, 5 Jun 2015 10:02:25 +0000 (11:02 +0100)
committerJames Procter <jprocter@ls30857.local>
Fri, 5 Jun 2015 10:02:25 +0000 (11:02 +0100)
src/jalview/ws/rest/params/Alignment.java

index 28f2628..a9255a3 100644 (file)
@@ -58,6 +58,19 @@ public class Alignment extends InputType
 
   String format = "FASTA";
 
+  public void setAlignmentFormat(String formatString)
+  {
+    if (jalview.io.FormatAdapter.isValidIOFormat(formatString, true))
+    {
+      format = formatString;
+    }
+    else
+    {
+      throw new Error("Implemementation error: '" + formatString
+              + "' is not a valid format for writing alignment data.");
+    }
+  }
+
   molType type;
 
   boolean jvsuffix = false;