prototype for store/restore of feature colour gradient settings
[jalview.git] / src / jalview / schemabinding / version2 / Setting.java
1 /*\r
2  * This class was automatically generated with \r
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 package jalview.schemabinding.version2;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import org.exolab.castor.xml.Marshaller;\r
15 import org.exolab.castor.xml.Unmarshaller;\r
16 \r
17 /**\r
18  * Class Setting.\r
19  * \r
20  * @version $Revision$ $Date$\r
21  */\r
22 public class Setting implements java.io.Serializable {\r
23 \r
24 \r
25       //--------------------------/\r
26      //- Class/Member Variables -/\r
27     //--------------------------/\r
28 \r
29     /**\r
30      * Field _type.\r
31      */\r
32     private java.lang.String _type;\r
33 \r
34     /**\r
35      * Field _colour.\r
36      */\r
37     private int _colour;\r
38 \r
39     /**\r
40      * keeps track of state for field: _colour\r
41      */\r
42     private boolean _has_colour;\r
43 \r
44     /**\r
45      * Field _display.\r
46      */\r
47     private boolean _display;\r
48 \r
49     /**\r
50      * keeps track of state for field: _display\r
51      */\r
52     private boolean _has_display;\r
53 \r
54     /**\r
55      * Field _order.\r
56      */\r
57     private float _order;\r
58 \r
59     /**\r
60      * keeps track of state for field: _order\r
61      */\r
62     private boolean _has_order;\r
63 \r
64     /**\r
65      * Optional minimum colour for graduated feature colour\r
66      */\r
67     private int _mincolour;\r
68 \r
69     /**\r
70      * keeps track of state for field: _mincolour\r
71      */\r
72     private boolean _has_mincolour;\r
73 \r
74     /**\r
75      * threshold value for graduated feature colour\r
76      */\r
77     private float _threshold;\r
78 \r
79     /**\r
80      * keeps track of state for field: _threshold\r
81      */\r
82     private boolean _has_threshold;\r
83 \r
84     /**\r
85      * threshold type for graduated feature colour\r
86      */\r
87     private int _threshstate;\r
88 \r
89     /**\r
90      * keeps track of state for field: _threshstate\r
91      */\r
92     private boolean _has_threshstate;\r
93 \r
94 \r
95       //----------------/\r
96      //- Constructors -/\r
97     //----------------/\r
98 \r
99     public Setting() {\r
100         super();\r
101     }\r
102 \r
103 \r
104       //-----------/\r
105      //- Methods -/\r
106     //-----------/\r
107 \r
108     /**\r
109      */\r
110     public void deleteColour(\r
111     ) {\r
112         this._has_colour= false;\r
113     }\r
114 \r
115     /**\r
116      */\r
117     public void deleteDisplay(\r
118     ) {\r
119         this._has_display= false;\r
120     }\r
121 \r
122     /**\r
123      */\r
124     public void deleteMincolour(\r
125     ) {\r
126         this._has_mincolour= false;\r
127     }\r
128 \r
129     /**\r
130      */\r
131     public void deleteOrder(\r
132     ) {\r
133         this._has_order= false;\r
134     }\r
135 \r
136     /**\r
137      */\r
138     public void deleteThreshold(\r
139     ) {\r
140         this._has_threshold= false;\r
141     }\r
142 \r
143     /**\r
144      */\r
145     public void deleteThreshstate(\r
146     ) {\r
147         this._has_threshstate= false;\r
148     }\r
149 \r
150     /**\r
151      * Returns the value of field 'colour'.\r
152      * \r
153      * @return the value of field 'Colour'.\r
154      */\r
155     public int getColour(\r
156     ) {\r
157         return this._colour;\r
158     }\r
159 \r
160     /**\r
161      * Returns the value of field 'display'.\r
162      * \r
163      * @return the value of field 'Display'.\r
164      */\r
165     public boolean getDisplay(\r
166     ) {\r
167         return this._display;\r
168     }\r
169 \r
170     /**\r
171      * Returns the value of field 'mincolour'. The field\r
172      * 'mincolour' has the following description: Optional minimum\r
173      * colour for graduated feature colour\r
174      * \r
175      * @return the value of field 'Mincolour'.\r
176      */\r
177     public int getMincolour(\r
178     ) {\r
179         return this._mincolour;\r
180     }\r
181 \r
182     /**\r
183      * Returns the value of field 'order'.\r
184      * \r
185      * @return the value of field 'Order'.\r
186      */\r
187     public float getOrder(\r
188     ) {\r
189         return this._order;\r
190     }\r
191 \r
192     /**\r
193      * Returns the value of field 'threshold'. The field\r
194      * 'threshold' has the following description: threshold value\r
195      * for graduated feature colour\r
196      * \r
197      * @return the value of field 'Threshold'.\r
198      */\r
199     public float getThreshold(\r
200     ) {\r
201         return this._threshold;\r
202     }\r
203 \r
204     /**\r
205      * Returns the value of field 'threshstate'. The field\r
206      * 'threshstate' has the following description: threshold type\r
207      * for graduated feature colour\r
208      * \r
209      * @return the value of field 'Threshstate'.\r
210      */\r
211     public int getThreshstate(\r
212     ) {\r
213         return this._threshstate;\r
214     }\r
215 \r
216     /**\r
217      * Returns the value of field 'type'.\r
218      * \r
219      * @return the value of field 'Type'.\r
220      */\r
221     public java.lang.String getType(\r
222     ) {\r
223         return this._type;\r
224     }\r
225 \r
226     /**\r
227      * Method hasColour.\r
228      * \r
229      * @return true if at least one Colour has been added\r
230      */\r
231     public boolean hasColour(\r
232     ) {\r
233         return this._has_colour;\r
234     }\r
235 \r
236     /**\r
237      * Method hasDisplay.\r
238      * \r
239      * @return true if at least one Display has been added\r
240      */\r
241     public boolean hasDisplay(\r
242     ) {\r
243         return this._has_display;\r
244     }\r
245 \r
246     /**\r
247      * Method hasMincolour.\r
248      * \r
249      * @return true if at least one Mincolour has been added\r
250      */\r
251     public boolean hasMincolour(\r
252     ) {\r
253         return this._has_mincolour;\r
254     }\r
255 \r
256     /**\r
257      * Method hasOrder.\r
258      * \r
259      * @return true if at least one Order has been added\r
260      */\r
261     public boolean hasOrder(\r
262     ) {\r
263         return this._has_order;\r
264     }\r
265 \r
266     /**\r
267      * Method hasThreshold.\r
268      * \r
269      * @return true if at least one Threshold has been added\r
270      */\r
271     public boolean hasThreshold(\r
272     ) {\r
273         return this._has_threshold;\r
274     }\r
275 \r
276     /**\r
277      * Method hasThreshstate.\r
278      * \r
279      * @return true if at least one Threshstate has been added\r
280      */\r
281     public boolean hasThreshstate(\r
282     ) {\r
283         return this._has_threshstate;\r
284     }\r
285 \r
286     /**\r
287      * Returns the value of field 'display'.\r
288      * \r
289      * @return the value of field 'Display'.\r
290      */\r
291     public boolean isDisplay(\r
292     ) {\r
293         return this._display;\r
294     }\r
295 \r
296     /**\r
297      * Method isValid.\r
298      * \r
299      * @return true if this object is valid according to the schema\r
300      */\r
301     public boolean isValid(\r
302     ) {\r
303         try {\r
304             validate();\r
305         } catch (org.exolab.castor.xml.ValidationException vex) {\r
306             return false;\r
307         }\r
308         return true;\r
309     }\r
310 \r
311     /**\r
312      * \r
313      * \r
314      * @param out\r
315      * @throws org.exolab.castor.xml.MarshalException if object is\r
316      * null or if any SAXException is thrown during marshaling\r
317      * @throws org.exolab.castor.xml.ValidationException if this\r
318      * object is an invalid instance according to the schema\r
319      */\r
320     public void marshal(\r
321             final java.io.Writer out)\r
322     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
323         Marshaller.marshal(this, out);\r
324     }\r
325 \r
326     /**\r
327      * \r
328      * \r
329      * @param handler\r
330      * @throws java.io.IOException if an IOException occurs during\r
331      * marshaling\r
332      * @throws org.exolab.castor.xml.ValidationException if this\r
333      * object is an invalid instance according to the schema\r
334      * @throws org.exolab.castor.xml.MarshalException if object is\r
335      * null or if any SAXException is thrown during marshaling\r
336      */\r
337     public void marshal(\r
338             final org.xml.sax.ContentHandler handler)\r
339     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
340         Marshaller.marshal(this, handler);\r
341     }\r
342 \r
343     /**\r
344      * Sets the value of field 'colour'.\r
345      * \r
346      * @param colour the value of field 'colour'.\r
347      */\r
348     public void setColour(\r
349             final int colour) {\r
350         this._colour = colour;\r
351         this._has_colour = true;\r
352     }\r
353 \r
354     /**\r
355      * Sets the value of field 'display'.\r
356      * \r
357      * @param display the value of field 'display'.\r
358      */\r
359     public void setDisplay(\r
360             final boolean display) {\r
361         this._display = display;\r
362         this._has_display = true;\r
363     }\r
364 \r
365     /**\r
366      * Sets the value of field 'mincolour'. The field 'mincolour'\r
367      * has the following description: Optional minimum colour for\r
368      * graduated feature colour\r
369      * \r
370      * @param mincolour the value of field 'mincolour'.\r
371      */\r
372     public void setMincolour(\r
373             final int mincolour) {\r
374         this._mincolour = mincolour;\r
375         this._has_mincolour = true;\r
376     }\r
377 \r
378     /**\r
379      * Sets the value of field 'order'.\r
380      * \r
381      * @param order the value of field 'order'.\r
382      */\r
383     public void setOrder(\r
384             final float order) {\r
385         this._order = order;\r
386         this._has_order = true;\r
387     }\r
388 \r
389     /**\r
390      * Sets the value of field 'threshold'. The field 'threshold'\r
391      * has the following description: threshold value for graduated\r
392      * feature colour\r
393      * \r
394      * @param threshold the value of field 'threshold'.\r
395      */\r
396     public void setThreshold(\r
397             final float threshold) {\r
398         this._threshold = threshold;\r
399         this._has_threshold = true;\r
400     }\r
401 \r
402     /**\r
403      * Sets the value of field 'threshstate'. The field\r
404      * 'threshstate' has the following description: threshold type\r
405      * for graduated feature colour\r
406      * \r
407      * @param threshstate the value of field 'threshstate'.\r
408      */\r
409     public void setThreshstate(\r
410             final int threshstate) {\r
411         this._threshstate = threshstate;\r
412         this._has_threshstate = true;\r
413     }\r
414 \r
415     /**\r
416      * Sets the value of field 'type'.\r
417      * \r
418      * @param type the value of field 'type'.\r
419      */\r
420     public void setType(\r
421             final java.lang.String type) {\r
422         this._type = type;\r
423     }\r
424 \r
425     /**\r
426      * Method unmarshal.\r
427      * \r
428      * @param reader\r
429      * @throws org.exolab.castor.xml.MarshalException if object is\r
430      * null or if any SAXException is thrown during marshaling\r
431      * @throws org.exolab.castor.xml.ValidationException if this\r
432      * object is an invalid instance according to the schema\r
433      * @return the unmarshaled jalview.schemabinding.version2.Settin\r
434      */\r
435     public static jalview.schemabinding.version2.Setting unmarshal(\r
436             final java.io.Reader reader)\r
437     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
438         return (jalview.schemabinding.version2.Setting) Unmarshaller.unmarshal(jalview.schemabinding.version2.Setting.class, reader);\r
439     }\r
440 \r
441     /**\r
442      * \r
443      * \r
444      * @throws org.exolab.castor.xml.ValidationException if this\r
445      * object is an invalid instance according to the schema\r
446      */\r
447     public void validate(\r
448     )\r
449     throws org.exolab.castor.xml.ValidationException {\r
450         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
451         validator.validate(this);\r
452     }\r
453 \r
454 }\r