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