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