96ab9d81428e2511a83d8124853b5977996d8a5e
[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       //----------------/
81      //- Constructors -/
82     //----------------/
83
84     public AnnotationColours() {
85         super();
86     }
87
88
89       //-----------/
90      //- Methods -/
91     //-----------/
92
93     /**
94      */
95     public void deleteAboveThreshold(
96     ) {
97         this._has_aboveThreshold= false;
98     }
99
100     /**
101      */
102     public void deleteMaxColour(
103     ) {
104         this._has_maxColour= false;
105     }
106
107     /**
108      */
109     public void deleteMinColour(
110     ) {
111         this._has_minColour= false;
112     }
113
114     /**
115      */
116     public void deleteThreshold(
117     ) {
118         this._has_threshold= false;
119     }
120
121     /**
122      * Returns the value of field 'aboveThreshold'.
123      * 
124      * @return the value of field 'AboveThreshold'.
125      */
126     public int getAboveThreshold(
127     ) {
128         return this._aboveThreshold;
129     }
130
131     /**
132      * Returns the value of field 'annotation'.
133      * 
134      * @return the value of field 'Annotation'.
135      */
136     public java.lang.String getAnnotation(
137     ) {
138         return this._annotation;
139     }
140
141     /**
142      * Returns the value of field 'colourScheme'.
143      * 
144      * @return the value of field 'ColourScheme'.
145      */
146     public java.lang.String getColourScheme(
147     ) {
148         return this._colourScheme;
149     }
150
151     /**
152      * Returns the value of field 'maxColour'.
153      * 
154      * @return the value of field 'MaxColour'.
155      */
156     public int getMaxColour(
157     ) {
158         return this._maxColour;
159     }
160
161     /**
162      * Returns the value of field 'minColour'.
163      * 
164      * @return the value of field 'MinColour'.
165      */
166     public int getMinColour(
167     ) {
168         return this._minColour;
169     }
170
171     /**
172      * Returns the value of field 'threshold'.
173      * 
174      * @return the value of field 'Threshold'.
175      */
176     public float getThreshold(
177     ) {
178         return this._threshold;
179     }
180
181     /**
182      * Method hasAboveThreshold.
183      * 
184      * @return true if at least one AboveThreshold has been added
185      */
186     public boolean hasAboveThreshold(
187     ) {
188         return this._has_aboveThreshold;
189     }
190
191     /**
192      * Method hasMaxColour.
193      * 
194      * @return true if at least one MaxColour has been added
195      */
196     public boolean hasMaxColour(
197     ) {
198         return this._has_maxColour;
199     }
200
201     /**
202      * Method hasMinColour.
203      * 
204      * @return true if at least one MinColour has been added
205      */
206     public boolean hasMinColour(
207     ) {
208         return this._has_minColour;
209     }
210
211     /**
212      * Method hasThreshold.
213      * 
214      * @return true if at least one Threshold has been added
215      */
216     public boolean hasThreshold(
217     ) {
218         return this._has_threshold;
219     }
220
221     /**
222      * Method isValid.
223      * 
224      * @return true if this object is valid according to the schema
225      */
226     public boolean isValid(
227     ) {
228         try {
229             validate();
230         } catch (org.exolab.castor.xml.ValidationException vex) {
231             return false;
232         }
233         return true;
234     }
235
236     /**
237      * 
238      * 
239      * @param out
240      * @throws org.exolab.castor.xml.MarshalException if object is
241      * null or if any SAXException is thrown during marshaling
242      * @throws org.exolab.castor.xml.ValidationException if this
243      * object is an invalid instance according to the schema
244      */
245     public void marshal(
246             final java.io.Writer out)
247     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
248         Marshaller.marshal(this, out);
249     }
250
251     /**
252      * 
253      * 
254      * @param handler
255      * @throws java.io.IOException if an IOException occurs during
256      * marshaling
257      * @throws org.exolab.castor.xml.ValidationException if this
258      * object is an invalid instance according to the schema
259      * @throws org.exolab.castor.xml.MarshalException if object is
260      * null or if any SAXException is thrown during marshaling
261      */
262     public void marshal(
263             final org.xml.sax.ContentHandler handler)
264     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
265         Marshaller.marshal(this, handler);
266     }
267
268     /**
269      * Sets the value of field 'aboveThreshold'.
270      * 
271      * @param aboveThreshold the value of field 'aboveThreshold'.
272      */
273     public void setAboveThreshold(
274             final int aboveThreshold) {
275         this._aboveThreshold = aboveThreshold;
276         this._has_aboveThreshold = true;
277     }
278
279     /**
280      * Sets the value of field 'annotation'.
281      * 
282      * @param annotation the value of field 'annotation'.
283      */
284     public void setAnnotation(
285             final java.lang.String annotation) {
286         this._annotation = annotation;
287     }
288
289     /**
290      * Sets the value of field 'colourScheme'.
291      * 
292      * @param colourScheme the value of field 'colourScheme'.
293      */
294     public void setColourScheme(
295             final java.lang.String colourScheme) {
296         this._colourScheme = colourScheme;
297     }
298
299     /**
300      * Sets the value of field 'maxColour'.
301      * 
302      * @param maxColour the value of field 'maxColour'.
303      */
304     public void setMaxColour(
305             final int maxColour) {
306         this._maxColour = maxColour;
307         this._has_maxColour = true;
308     }
309
310     /**
311      * Sets the value of field 'minColour'.
312      * 
313      * @param minColour the value of field 'minColour'.
314      */
315     public void setMinColour(
316             final int minColour) {
317         this._minColour = minColour;
318         this._has_minColour = true;
319     }
320
321     /**
322      * Sets the value of field 'threshold'.
323      * 
324      * @param threshold the value of field 'threshold'.
325      */
326     public void setThreshold(
327             final float threshold) {
328         this._threshold = threshold;
329         this._has_threshold = true;
330     }
331
332     /**
333      * Method unmarshal.
334      * 
335      * @param reader
336      * @throws org.exolab.castor.xml.MarshalException if object is
337      * null or if any SAXException is thrown during marshaling
338      * @throws org.exolab.castor.xml.ValidationException if this
339      * object is an invalid instance according to the schema
340      * @return the unmarshaled
341      * jalview.schemabinding.version2.AnnotationColours
342      */
343     public static jalview.schemabinding.version2.AnnotationColours unmarshal(
344             final java.io.Reader reader)
345     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
346         return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationColours.class, reader);
347     }
348
349     /**
350      * 
351      * 
352      * @throws org.exolab.castor.xml.ValidationException if this
353      * object is an invalid instance according to the schema
354      */
355     public void validate(
356     )
357     throws org.exolab.castor.xml.ValidationException {
358         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
359         validator.validate(this);
360     }
361
362 }