+
+ @Override
+ public String getURLtokenPrefix()
+ {
+ return "ALIGNMENT";
+ }
+
+ @Override
+ public boolean configureProperty(String tok, String val,
+ StringBuffer warnings)
+ {
+ if (tok.startsWith("jvsuffix"))
+ {
+ jvsuffix = true;
+ return true;
+ }
+ if (tok.startsWith("writeasfile"))
+ {
+ writeAsFile = true;
+ return true;
+ }
+
+ if (tok.startsWith("format"))
+ {
+ for (String fmt : jalview.io.FormatAdapter.WRITEABLE_FORMATS)
+ {
+ if (val.equalsIgnoreCase(fmt))
+ {
+ format = fmt;
+ return true;
+ }
+ }
+ warnings.append("Invalid alignment format '" + val
+ + "'. Must be one of (");
+ for (String fmt : jalview.io.FormatAdapter.WRITEABLE_FORMATS)
+ {
+ warnings.append(" " + fmt);
+ }
+ warnings.append(")\n");
+ }
+ if (tok.startsWith("type"))
+ {
+ try
+ {
+ type = molType.valueOf(val);
+ return true;
+ } catch (Exception x)
+ {
+ warnings.append("Invalid molecule type '" + val
+ + "'. Must be one of (");
+ for (molType v : molType.values())
+ {
+ warnings.append(" " + v);
+ }
+ warnings.append(")\n");
+ }
+ }
+ return false;
+ }
+ @Override
+ public List<OptionI> getOptions()
+ {
+ List<OptionI> lst = getBaseOptions();
+ lst.add(new BooleanOption("jvsuffix","Append jalview style /start-end suffix to ID", false, false, jvsuffix, null));
+ lst.add(new BooleanOption("writeasfile","Append jalview style /start-end suffix to ID", false, false, writeAsFile, null));
+
+ lst.add(new Option("format",
+ "Alignment upload format", true, "FASTA",
+ format, Arrays.asList(jalview.io.FormatAdapter.WRITEABLE_FORMATS), null));
+ lst.add(createMolTypeOption("type", "Sequence type", false, type,
+ null));
+
+ return lst;
+ }
+