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