JAL-961 JAL-976 abstracted container for dynamic calculation parameters
[jalview.git] / src / jalview / ws / params / AutoCalcSetting.java
diff --git a/src/jalview/ws/params/AutoCalcSetting.java b/src/jalview/ws/params/AutoCalcSetting.java
new file mode 100644 (file)
index 0000000..49134ae
--- /dev/null
@@ -0,0 +1,73 @@
+package jalview.ws.params;
+
+import java.util.List;
+
+public abstract class AutoCalcSetting
+{
+
+  protected boolean autoUpdate;
+
+  protected WsParamSetI preset;
+
+  protected List<ArgumentI> jobArgset;
+
+  public AutoCalcSetting(WsParamSetI preset2, List<ArgumentI> jobArgset2,
+          boolean autoUpdate2)
+  {
+    autoUpdate = autoUpdate2;
+    preset = preset2;
+    jobArgset = jobArgset2;
+  }
+
+  public boolean isAutoUpdate()
+  {
+    return autoUpdate;
+  }
+
+  public void setAutoUpdate(boolean autoUpdate)
+  {
+    this.autoUpdate = autoUpdate;
+  }
+
+  public WsParamSetI getPreset()
+  {
+    return preset;
+  }
+
+  public void setPreset(WsParamSetI preset)
+  {
+    // TODO: test if service URL is in presets
+    this.preset = preset;
+  }
+
+  public List<ArgumentI> getArgumentSet()
+  {
+    return jobArgset;
+  }
+
+  /**
+   * 
+   * @return characteristic URI for this service. The URI should reflect the
+   *         type and version of this service, enabling the service client code
+   *         to recover the correct client for this calculation.
+   */
+  public abstract String getServiceURI();
+
+  /**
+   * return any concrete service endpoints associated with this calculation.
+   * built in services should return a zero length array
+   * 
+   * @return
+   */
+  public String[] getServiceURLs()
+  {
+    return new String[0];
+  }
+
+  /**
+   * 
+   * @return stringified representation of the parameters for this setting
+   */
+  public abstract String getWsParamFile();
+
+}