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