Merge branch 'alpha/JAL-3066_Jalview_212_slivka-integration' into alpha/JAL-3362_Jalv...
[jalview.git] / src / jalview / ws / params / simple / Option.java
index ce5d669..40e3804 100644 (file)
@@ -30,6 +30,8 @@ public class Option implements OptionI
 {
   String name;
 
+  String label;
+
   /*
    * current value in string format, or "null" if undefined
    */
@@ -61,6 +63,7 @@ public class Option implements OptionI
   public Option(Option opt)
   {
     name = opt.name;
+    label = opt.label;
     value = opt.value;
     defvalue = opt.defvalue;
     description = opt.description;
@@ -77,6 +80,13 @@ public class Option implements OptionI
   {
   }
 
+  public Option(String name, String description, String label, boolean isrequired,
+      String defValue, String val, List<String> possibleVals, URL fdetails)
+  {
+    this(name, description, isrequired, defValue, val, possibleVals, fdetails);
+    this.label = label;
+  }
+
   /**
    * Constructor including display names for possible values
    * 
@@ -150,6 +160,12 @@ public class Option implements OptionI
   }
 
   @Override
+  public String getLabel()
+  {
+    return label != null ? label : name;
+  }
+
+  @Override
   public String getValue()
   {
     return value == null ? defvalue : value;