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