X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Frest%2Fparams%2FAlignment.java;h=08a242d5a49c38e8e5a35bf55d595e235ca2a5e8;hb=74b531f56bbaad5c5e06a4744980256fe8110923;hp=c78bced9d0944e3e28c0ad1ca3f82050382c2bfa;hpb=8b27085fa7fc5f2877e078421284c2636b85b8c6;p=jalview.git diff --git a/src/jalview/ws/rest/params/Alignment.java b/src/jalview/ws/rest/params/Alignment.java index c78bced..08a242d 100644 --- a/src/jalview/ws/rest/params/Alignment.java +++ b/src/jalview/ws/rest/params/Alignment.java @@ -38,7 +38,6 @@ import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.apache.http.entity.mime.content.ContentBody; @@ -199,13 +198,27 @@ public class Alignment extends InputType writeAsFile, null)); lst.add(new Option("format", "Alignment upload format", true, - FileFormat.Fasta.toString(), - format.toString(), Arrays - .asList(jalview.io.FormatAdapter.WRITEABLE_FORMATS), + FileFormat.Fasta.toString(), format.toString(), getWritableFormats(), null)); lst.add(createMolTypeOption("type", "Sequence type", false, type, null)); return lst; } + /** + * @return + */ + protected List getWritableFormats() + { + List formats = new ArrayList(); + for (FileFormatI ff : FileFormat.values()) + { + if (ff.isWritable()) + { + formats.add(ff.toString()); + } + } + return formats; + } + }