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