import jalview.ws.params.simple.BooleanOption;
import jalview.ws.params.simple.DoubleParameter;
import jalview.ws.params.simple.IntegerParameter;
-import jalview.ws.params.simple.RadioChoiceParameter;
import jalview.ws.params.simple.StringParameter;
import java.io.IOException;
import uk.ac.dundee.compbio.slivkaclient.BooleanField;
import uk.ac.dundee.compbio.slivkaclient.ChoiceField;
import uk.ac.dundee.compbio.slivkaclient.DecimalField;
-import uk.ac.dundee.compbio.slivkaclient.Form;
import uk.ac.dundee.compbio.slivkaclient.FormField;
import uk.ac.dundee.compbio.slivkaclient.IntegerField;
import uk.ac.dundee.compbio.slivkaclient.SlivkaForm;
case BOOLEAN:
BooleanField boolField = (BooleanField) field;
arg = new BooleanOption(
- field.getName(), field.getDescription(), field.isRequired(), boolField.getDefault(),
- boolField.getDefault(), null
+ field.getName(), field.getDescription(), field.isRequired(),
+ boolField.getDefault(), boolField.getDefault(), null
);
break;
case TEXT:
TextField textField = (TextField) field;
arg = new StringParameter(
- field.getName(), field.getDescription(), field.isRequired(), textField.getDefault(),
- textField.getDefault()
+ field.getName(), field.getDescription(), field.isRequired(),
+ textField.getDefault(), textField.getDefault()
);
break;
case INTEGER:
IntegerField intField = (IntegerField) field;
arg = new IntegerParameter(
- field.getName(), field.getDescription(), field.isRequired(), intField.getDefault(),
- intField.getMin(), intField.getMax()
+ field.getName(), field.getDescription(), field.isRequired(),
+ intField.getDefault(), intField.getMin(), intField.getMax()
);
break;
case DECIMAL:
DecimalField doubleField = (DecimalField) field;
arg = new DoubleParameter(
- field.getName(), field.getDescription(), field.isRequired(), doubleField.getDefault(),
- doubleField.getMin(), doubleField.getMax()
+ field.getName(), field.getDescription(), field.isRequired(),
+ doubleField.getDefault(), doubleField.getMin(),
+ doubleField.getMax()
);
break;
case CHOICE:
ChoiceField choiceField = (ChoiceField) field;
- arg = new RadioChoiceParameter(
- field.getName(), field.getDescription(), new ArrayList<>(choiceField.getChoices()), choiceField.getDefault()
+ List<String> choices = new ArrayList<>(choiceField.getChoices());
+ arg = new StringParameter(field.getName(), field.getDescription(),
+ field.isRequired(), choiceField.getDefault(), choices.get(0),
+ choices, choices
);
break;
case FILE: