JAL-1432 updated copyright notices
[jalview.git] / src / jalview / schemabinding / version2 / CalcIdParam.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package jalview.schemabinding.version2;
20
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
24
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
27
28 /**
29  * Class CalcIdParam.
30  * 
31  * @version $Revision$ $Date$
32  */
33 public class CalcIdParam extends WebServiceParameterSet implements
34         java.io.Serializable
35 {
36
37   // --------------------------/
38   // - Class/Member Variables -/
39   // --------------------------/
40
41   /**
42    * handle for the calculation which uses this parameter set
43    */
44   private java.lang.String _calcId;
45
46   /**
47    * should the calculation be performed immediately after loading in order to
48    * refresh results
49    */
50   private boolean _needsUpdate = false;
51
52   /**
53    * keeps track of state for field: _needsUpdate
54    */
55   private boolean _has_needsUpdate;
56
57   /**
58    * should the calculation be automatically performed on edits
59    */
60   private boolean _autoUpdate;
61
62   /**
63    * keeps track of state for field: _autoUpdate
64    */
65   private boolean _has_autoUpdate;
66
67   // ----------------/
68   // - Constructors -/
69   // ----------------/
70
71   public CalcIdParam()
72   {
73     super();
74   }
75
76   // -----------/
77   // - Methods -/
78   // -----------/
79
80   /**
81      */
82   public void deleteAutoUpdate()
83   {
84     this._has_autoUpdate = false;
85   }
86
87   /**
88      */
89   public void deleteNeedsUpdate()
90   {
91     this._has_needsUpdate = false;
92   }
93
94   /**
95    * Returns the value of field 'autoUpdate'. The field 'autoUpdate' has the
96    * following description: should the calculation be automatically performed on
97    * edits
98    * 
99    * @return the value of field 'AutoUpdate'.
100    */
101   public boolean getAutoUpdate()
102   {
103     return this._autoUpdate;
104   }
105
106   /**
107    * Returns the value of field 'calcId'. The field 'calcId' has the following
108    * description: handle for the calculation which uses this parameter set
109    * 
110    * @return the value of field 'CalcId'.
111    */
112   public java.lang.String getCalcId()
113   {
114     return this._calcId;
115   }
116
117   /**
118    * Returns the value of field 'needsUpdate'. The field 'needsUpdate' has the
119    * following description: should the calculation be performed immediately
120    * after loading in order to refresh results
121    * 
122    * @return the value of field 'NeedsUpdate'.
123    */
124   public boolean getNeedsUpdate()
125   {
126     return this._needsUpdate;
127   }
128
129   /**
130    * Method hasAutoUpdate.
131    * 
132    * @return true if at least one AutoUpdate has been added
133    */
134   public boolean hasAutoUpdate()
135   {
136     return this._has_autoUpdate;
137   }
138
139   /**
140    * Method hasNeedsUpdate.
141    * 
142    * @return true if at least one NeedsUpdate has been added
143    */
144   public boolean hasNeedsUpdate()
145   {
146     return this._has_needsUpdate;
147   }
148
149   /**
150    * Returns the value of field 'autoUpdate'. The field 'autoUpdate' has the
151    * following description: should the calculation be automatically performed on
152    * edits
153    * 
154    * @return the value of field 'AutoUpdate'.
155    */
156   public boolean isAutoUpdate()
157   {
158     return this._autoUpdate;
159   }
160
161   /**
162    * Returns the value of field 'needsUpdate'. The field 'needsUpdate' has the
163    * following description: should the calculation be performed immediately
164    * after loading in order to refresh results
165    * 
166    * @return the value of field 'NeedsUpdate'.
167    */
168   public boolean isNeedsUpdate()
169   {
170     return this._needsUpdate;
171   }
172
173   /**
174    * Method isValid.
175    * 
176    * @return true if this object is valid according to the schema
177    */
178   public boolean isValid()
179   {
180     try
181     {
182       validate();
183     } catch (org.exolab.castor.xml.ValidationException vex)
184     {
185       return false;
186     }
187     return true;
188   }
189
190   /**
191    * 
192    * 
193    * @param out
194    * @throws org.exolab.castor.xml.MarshalException
195    *           if object is null or if any SAXException is thrown during
196    *           marshaling
197    * @throws org.exolab.castor.xml.ValidationException
198    *           if this object is an invalid instance according to the schema
199    */
200   public void marshal(final java.io.Writer out)
201           throws org.exolab.castor.xml.MarshalException,
202           org.exolab.castor.xml.ValidationException
203   {
204     Marshaller.marshal(this, out);
205   }
206
207   /**
208    * 
209    * 
210    * @param handler
211    * @throws java.io.IOException
212    *           if an IOException occurs during marshaling
213    * @throws org.exolab.castor.xml.ValidationException
214    *           if this object is an invalid instance according to the schema
215    * @throws org.exolab.castor.xml.MarshalException
216    *           if object is null or if any SAXException is thrown during
217    *           marshaling
218    */
219   public void marshal(final org.xml.sax.ContentHandler handler)
220           throws java.io.IOException,
221           org.exolab.castor.xml.MarshalException,
222           org.exolab.castor.xml.ValidationException
223   {
224     Marshaller.marshal(this, handler);
225   }
226
227   /**
228    * Sets the value of field 'autoUpdate'. The field 'autoUpdate' has the
229    * following description: should the calculation be automatically performed on
230    * edits
231    * 
232    * @param autoUpdate
233    *          the value of field 'autoUpdate'.
234    */
235   public void setAutoUpdate(final boolean autoUpdate)
236   {
237     this._autoUpdate = autoUpdate;
238     this._has_autoUpdate = true;
239   }
240
241   /**
242    * Sets the value of field 'calcId'. The field 'calcId' has the following
243    * description: handle for the calculation which uses this parameter set
244    * 
245    * @param calcId
246    *          the value of field 'calcId'.
247    */
248   public void setCalcId(final java.lang.String calcId)
249   {
250     this._calcId = calcId;
251   }
252
253   /**
254    * Sets the value of field 'needsUpdate'. The field 'needsUpdate' has the
255    * following description: should the calculation be performed immediately
256    * after loading in order to refresh results
257    * 
258    * @param needsUpdate
259    *          the value of field 'needsUpdate'.
260    */
261   public void setNeedsUpdate(final boolean needsUpdate)
262   {
263     this._needsUpdate = needsUpdate;
264     this._has_needsUpdate = true;
265   }
266
267   /**
268    * Method unmarshal.
269    * 
270    * @param reader
271    * @throws org.exolab.castor.xml.MarshalException
272    *           if object is null or if any SAXException is thrown during
273    *           marshaling
274    * @throws org.exolab.castor.xml.ValidationException
275    *           if this object is an invalid instance according to the schema
276    * @return the unmarshaled jalview.schemabinding.version2.CalcIdParam
277    */
278   public static jalview.schemabinding.version2.CalcIdParam unmarshal(
279           final java.io.Reader reader)
280           throws org.exolab.castor.xml.MarshalException,
281           org.exolab.castor.xml.ValidationException
282   {
283     return (jalview.schemabinding.version2.CalcIdParam) Unmarshaller
284             .unmarshal(jalview.schemabinding.version2.CalcIdParam.class,
285                     reader);
286   }
287
288   /**
289    * 
290    * 
291    * @throws org.exolab.castor.xml.ValidationException
292    *           if this object is an invalid instance according to the schema
293    */
294   public void validate() throws org.exolab.castor.xml.ValidationException
295   {
296     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
297     validator.validate(this);
298   }
299
300 }