Merge branch 'develop' into features/JAL-2446NCList
[jalview.git] / src / jalview / ws / rest / params / Alignment.java
index b85073f..4426c5f 100644 (file)
@@ -79,11 +79,11 @@ public class Alignment extends InputType
       try
       {
         File fa = File.createTempFile("jvmime", ".fa");
-        PrintWriter pw = new PrintWriter(
-                new OutputStreamWriter(new BufferedOutputStream(
-                        new FileOutputStream(fa)), "UTF-8"));
-        pw.append(new FormatAdapter().formatSequences(format,
-                alignment, jvsuffix));
+        PrintWriter pw = new PrintWriter(new OutputStreamWriter(
+                new BufferedOutputStream(new FileOutputStream(fa)),
+                "UTF-8"));
+        pw.append(new FormatAdapter().formatSequences(format, alignment,
+                jvsuffix));
         pw.close();
         return new FileBody(fa, "text/plain");
       } catch (Exception ex)
@@ -156,8 +156,8 @@ public class Alignment extends InputType
           return true;
         }
       }
-      warnings.append("Invalid alignment format '" + val
-              + "'. Must be one of (");
+      warnings.append(
+              "Invalid alignment format '" + val + "'. Must be one of (");
       for (String fmt : FileFormats.getInstance().getWritableFormats(true))
       {
         warnings.append(" ").append(fmt);
@@ -172,8 +172,8 @@ public class Alignment extends InputType
         return true;
       } catch (Exception x)
       {
-        warnings.append("Invalid molecule type '" + val
-                + "'. Must be one of (");
+        warnings.append(
+                "Invalid molecule type '" + val + "'. Must be one of (");
         for (molType v : molType.values())
         {
           warnings.append(" " + v);
@@ -195,12 +195,12 @@ public class Alignment extends InputType
             "Append jalview style /start-end suffix to ID", false, false,
             writeAsFile, null));
 
-    List<String> writable = FileFormats
-            .getInstance().getWritableFormats(true);
+    List<String> writable = FileFormats.getInstance()
+            .getWritableFormats(true);
     lst.add(new Option("format", "Alignment upload format", true,
-            FileFormat.Fasta.toString(), format.getName(), writable,
+            FileFormat.Fasta.toString(), format.getName(), writable, null));
+    lst.add(createMolTypeOption("type", "Sequence type", false, type,
             null));
-    lst.add(createMolTypeOption("type", "Sequence type", false, type, null));
 
     return lst;
   }