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