JAL-1136 - fix abstraction for parameter container class
[jalview.git] / src / jalview / ws / params / AutoCalcSetting.java
1 package jalview.ws.params;
2
3 import java.util.List;
4
5 public abstract class AutoCalcSetting
6 {
7
8   protected boolean autoUpdate;
9
10   protected WsParamSetI preset;
11
12   protected List<ArgumentI> jobArgset;
13
14   public AutoCalcSetting(WsParamSetI preset2, List<ArgumentI> jobArgset2,
15           boolean autoUpdate2)
16   {
17     autoUpdate = autoUpdate2;
18     preset = preset2;
19     jobArgset = jobArgset2;
20   }
21
22   public boolean isAutoUpdate()
23   {
24     return autoUpdate;
25   }
26
27   public void setAutoUpdate(boolean autoUpdate)
28   {
29     this.autoUpdate = autoUpdate;
30   }
31
32   public WsParamSetI getPreset()
33   {
34     return preset;
35   }
36
37   public void setPreset(WsParamSetI preset)
38   {
39     // TODO: test if service URL is in presets
40     this.preset = preset;
41   }
42
43   public List<ArgumentI> getArgumentSet()
44   {
45     return jobArgset;
46   }
47
48   /**
49    * 
50    * @return characteristic URI for this service. The URI should reflect the
51    *         type and version of this service, enabling the service client code
52    *         to recover the correct client for this calculation.
53    */
54   public abstract String getServiceURI();
55
56   /**
57    * return any concrete service endpoints associated with this calculation.
58    * built in services should return a zero length array
59    * 
60    * @return
61    */
62   public abstract String[] getServiceURLs();
63
64   /**
65    * 
66    * @return stringified representation of the parameters for this setting
67    */
68   public abstract String getWsParamFile();
69
70 }