JAL-633, JAL-591 - refactored ArgumentI.getValue from jabaws .getDefaultValue
[jalview.git] / src / jalview / ws / jws2 / dm / JabaValueConstrain.java
index d9a2968..611aa59 100644 (file)
@@ -25,17 +25,23 @@ import jalview.ws.params.ValueConstrainI;
 public class JabaValueConstrain implements ValueConstrainI
 {
 
-  ValueConstrain vc=null;
+  ValueConstrain vc = null;
+
   public JabaValueConstrain(ValueConstrain vc)
   {
     this.vc = vc;
   }
 
   @Override
-  public Type getType()
+  public ValueType getType()
   {
-    // TODO: refactor to local Jalview parameter type system.
-    return vc.getType();
+    if (vc.getType()==ValueConstrain.Type.Float) {
+      return ValueType.Float;
+    }
+    if (vc.getType()==ValueConstrain.Type.Integer) {
+      return ValueType.Integer;
+    }
+    throw new Error("IMPLEMENTATION ERROR: jalview.ws.params.ValueConstrainI.ValueType does not support the JABAWS type :"+vc.toString());
   }
 
   @Override