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