Save graph threshold and annotation colours
[jalview.git] / src / jalview / schemabinding / version2 / AnnotationColours.java
1 /*\r
2  * This class was automatically generated with \r
3  * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 package jalview.schemabinding.version2;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import java.io.IOException;\r
15 import java.io.Reader;\r
16 import java.io.Serializable;\r
17 import java.io.Writer;\r
18 import org.exolab.castor.xml.MarshalException;\r
19 import org.exolab.castor.xml.Marshaller;\r
20 import org.exolab.castor.xml.Unmarshaller;\r
21 import org.exolab.castor.xml.ValidationException;\r
22 import org.xml.sax.ContentHandler;\r
23 \r
24 /**\r
25  * Class AnnotationColours.\r
26  * \r
27  * @version $Revision$ $Date$\r
28  */\r
29 public class AnnotationColours implements java.io.Serializable {\r
30 \r
31 \r
32       //--------------------------/\r
33      //- Class/Member Variables -/\r
34     //--------------------------/\r
35 \r
36     /**\r
37      * Field _aboveThreshold\r
38      */\r
39     private int _aboveThreshold;\r
40 \r
41     /**\r
42      * keeps track of state for field: _aboveThreshold\r
43      */\r
44     private boolean _has_aboveThreshold;\r
45 \r
46     /**\r
47      * Field _annotation\r
48      */\r
49     private java.lang.String _annotation;\r
50 \r
51     /**\r
52      * Field _minColour\r
53      */\r
54     private int _minColour;\r
55 \r
56     /**\r
57      * keeps track of state for field: _minColour\r
58      */\r
59     private boolean _has_minColour;\r
60 \r
61     /**\r
62      * Field _maxColour\r
63      */\r
64     private int _maxColour;\r
65 \r
66     /**\r
67      * keeps track of state for field: _maxColour\r
68      */\r
69     private boolean _has_maxColour;\r
70 \r
71     /**\r
72      * Field _colourScheme\r
73      */\r
74     private java.lang.String _colourScheme;\r
75 \r
76     /**\r
77      * Field _threshold\r
78      */\r
79     private float _threshold;\r
80 \r
81     /**\r
82      * keeps track of state for field: _threshold\r
83      */\r
84     private boolean _has_threshold;\r
85 \r
86 \r
87       //----------------/\r
88      //- Constructors -/\r
89     //----------------/\r
90 \r
91     public AnnotationColours() {\r
92         super();\r
93     } //-- jalview.schemabinding.version2.AnnotationColours()\r
94 \r
95 \r
96       //-----------/\r
97      //- Methods -/\r
98     //-----------/\r
99 \r
100     /**\r
101      * Method deleteAboveThreshold\r
102      * \r
103      */\r
104     public void deleteAboveThreshold()\r
105     {\r
106         this._has_aboveThreshold= false;\r
107     } //-- void deleteAboveThreshold() \r
108 \r
109     /**\r
110      * Method deleteMaxColour\r
111      * \r
112      */\r
113     public void deleteMaxColour()\r
114     {\r
115         this._has_maxColour= false;\r
116     } //-- void deleteMaxColour() \r
117 \r
118     /**\r
119      * Method deleteMinColour\r
120      * \r
121      */\r
122     public void deleteMinColour()\r
123     {\r
124         this._has_minColour= false;\r
125     } //-- void deleteMinColour() \r
126 \r
127     /**\r
128      * Method deleteThreshold\r
129      * \r
130      */\r
131     public void deleteThreshold()\r
132     {\r
133         this._has_threshold= false;\r
134     } //-- void deleteThreshold() \r
135 \r
136     /**\r
137      * Returns the value of field 'aboveThreshold'.\r
138      * \r
139      * @return int\r
140      * @return the value of field 'aboveThreshold'.\r
141      */\r
142     public int getAboveThreshold()\r
143     {\r
144         return this._aboveThreshold;\r
145     } //-- int getAboveThreshold() \r
146 \r
147     /**\r
148      * Returns the value of field 'annotation'.\r
149      * \r
150      * @return String\r
151      * @return the value of field 'annotation'.\r
152      */\r
153     public java.lang.String getAnnotation()\r
154     {\r
155         return this._annotation;\r
156     } //-- java.lang.String getAnnotation() \r
157 \r
158     /**\r
159      * Returns the value of field 'colourScheme'.\r
160      * \r
161      * @return String\r
162      * @return the value of field 'colourScheme'.\r
163      */\r
164     public java.lang.String getColourScheme()\r
165     {\r
166         return this._colourScheme;\r
167     } //-- java.lang.String getColourScheme() \r
168 \r
169     /**\r
170      * Returns the value of field 'maxColour'.\r
171      * \r
172      * @return int\r
173      * @return the value of field 'maxColour'.\r
174      */\r
175     public int getMaxColour()\r
176     {\r
177         return this._maxColour;\r
178     } //-- int getMaxColour() \r
179 \r
180     /**\r
181      * Returns the value of field 'minColour'.\r
182      * \r
183      * @return int\r
184      * @return the value of field 'minColour'.\r
185      */\r
186     public int getMinColour()\r
187     {\r
188         return this._minColour;\r
189     } //-- int getMinColour() \r
190 \r
191     /**\r
192      * Returns the value of field 'threshold'.\r
193      * \r
194      * @return float\r
195      * @return the value of field 'threshold'.\r
196      */\r
197     public float getThreshold()\r
198     {\r
199         return this._threshold;\r
200     } //-- float getThreshold() \r
201 \r
202     /**\r
203      * Method hasAboveThreshold\r
204      * \r
205      * \r
206      * \r
207      * @return boolean\r
208      */\r
209     public boolean hasAboveThreshold()\r
210     {\r
211         return this._has_aboveThreshold;\r
212     } //-- boolean hasAboveThreshold() \r
213 \r
214     /**\r
215      * Method hasMaxColour\r
216      * \r
217      * \r
218      * \r
219      * @return boolean\r
220      */\r
221     public boolean hasMaxColour()\r
222     {\r
223         return this._has_maxColour;\r
224     } //-- boolean hasMaxColour() \r
225 \r
226     /**\r
227      * Method hasMinColour\r
228      * \r
229      * \r
230      * \r
231      * @return boolean\r
232      */\r
233     public boolean hasMinColour()\r
234     {\r
235         return this._has_minColour;\r
236     } //-- boolean hasMinColour() \r
237 \r
238     /**\r
239      * Method hasThreshold\r
240      * \r
241      * \r
242      * \r
243      * @return boolean\r
244      */\r
245     public boolean hasThreshold()\r
246     {\r
247         return this._has_threshold;\r
248     } //-- boolean hasThreshold() \r
249 \r
250     /**\r
251      * Method isValid\r
252      * \r
253      * \r
254      * \r
255      * @return boolean\r
256      */\r
257     public boolean isValid()\r
258     {\r
259         try {\r
260             validate();\r
261         }\r
262         catch (org.exolab.castor.xml.ValidationException vex) {\r
263             return false;\r
264         }\r
265         return true;\r
266     } //-- boolean isValid() \r
267 \r
268     /**\r
269      * Method marshal\r
270      * \r
271      * \r
272      * \r
273      * @param out\r
274      */\r
275     public void marshal(java.io.Writer out)\r
276         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
277     {\r
278         \r
279         Marshaller.marshal(this, out);\r
280     } //-- void marshal(java.io.Writer) \r
281 \r
282     /**\r
283      * Method marshal\r
284      * \r
285      * \r
286      * \r
287      * @param handler\r
288      */\r
289     public void marshal(org.xml.sax.ContentHandler handler)\r
290         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
291     {\r
292         \r
293         Marshaller.marshal(this, handler);\r
294     } //-- void marshal(org.xml.sax.ContentHandler) \r
295 \r
296     /**\r
297      * Sets the value of field 'aboveThreshold'.\r
298      * \r
299      * @param aboveThreshold the value of field 'aboveThreshold'.\r
300      */\r
301     public void setAboveThreshold(int aboveThreshold)\r
302     {\r
303         this._aboveThreshold = aboveThreshold;\r
304         this._has_aboveThreshold = true;\r
305     } //-- void setAboveThreshold(int) \r
306 \r
307     /**\r
308      * Sets the value of field 'annotation'.\r
309      * \r
310      * @param annotation the value of field 'annotation'.\r
311      */\r
312     public void setAnnotation(java.lang.String annotation)\r
313     {\r
314         this._annotation = annotation;\r
315     } //-- void setAnnotation(java.lang.String) \r
316 \r
317     /**\r
318      * Sets the value of field 'colourScheme'.\r
319      * \r
320      * @param colourScheme the value of field 'colourScheme'.\r
321      */\r
322     public void setColourScheme(java.lang.String colourScheme)\r
323     {\r
324         this._colourScheme = colourScheme;\r
325     } //-- void setColourScheme(java.lang.String) \r
326 \r
327     /**\r
328      * Sets the value of field 'maxColour'.\r
329      * \r
330      * @param maxColour the value of field 'maxColour'.\r
331      */\r
332     public void setMaxColour(int maxColour)\r
333     {\r
334         this._maxColour = maxColour;\r
335         this._has_maxColour = true;\r
336     } //-- void setMaxColour(int) \r
337 \r
338     /**\r
339      * Sets the value of field 'minColour'.\r
340      * \r
341      * @param minColour the value of field 'minColour'.\r
342      */\r
343     public void setMinColour(int minColour)\r
344     {\r
345         this._minColour = minColour;\r
346         this._has_minColour = true;\r
347     } //-- void setMinColour(int) \r
348 \r
349     /**\r
350      * Sets the value of field 'threshold'.\r
351      * \r
352      * @param threshold the value of field 'threshold'.\r
353      */\r
354     public void setThreshold(float threshold)\r
355     {\r
356         this._threshold = threshold;\r
357         this._has_threshold = true;\r
358     } //-- void setThreshold(float) \r
359 \r
360     /**\r
361      * Method unmarshal\r
362      * \r
363      * \r
364      * \r
365      * @param reader\r
366      * @return Object\r
367      */\r
368     public static java.lang.Object unmarshal(java.io.Reader reader)\r
369         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
370     {\r
371         return (jalview.schemabinding.version2.AnnotationColours) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationColours.class, reader);\r
372     } //-- java.lang.Object unmarshal(java.io.Reader) \r
373 \r
374     /**\r
375      * Method validate\r
376      * \r
377      */\r
378     public void validate()\r
379         throws org.exolab.castor.xml.ValidationException\r
380     {\r
381         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
382         validator.validate(this);\r
383     } //-- void validate() \r
384 \r
385 }\r