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