Save graph threshold and annotation colours
[jalview.git] / src / jalview / schemabinding / version2 / ThresholdLine.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 ThresholdLine.\r
26  * \r
27  * @version $Revision$ $Date$\r
28  */\r
29 public class ThresholdLine implements java.io.Serializable {\r
30 \r
31 \r
32       //--------------------------/\r
33      //- Class/Member Variables -/\r
34     //--------------------------/\r
35 \r
36     /**\r
37      * Field _label\r
38      */\r
39     private java.lang.String _label;\r
40 \r
41     /**\r
42      * Field _value\r
43      */\r
44     private float _value;\r
45 \r
46     /**\r
47      * keeps track of state for field: _value\r
48      */\r
49     private boolean _has_value;\r
50 \r
51     /**\r
52      * Field _colour\r
53      */\r
54     private int _colour;\r
55 \r
56     /**\r
57      * keeps track of state for field: _colour\r
58      */\r
59     private boolean _has_colour;\r
60 \r
61 \r
62       //----------------/\r
63      //- Constructors -/\r
64     //----------------/\r
65 \r
66     public ThresholdLine() {\r
67         super();\r
68     } //-- jalview.schemabinding.version2.ThresholdLine()\r
69 \r
70 \r
71       //-----------/\r
72      //- Methods -/\r
73     //-----------/\r
74 \r
75     /**\r
76      * Method deleteColour\r
77      * \r
78      */\r
79     public void deleteColour()\r
80     {\r
81         this._has_colour= false;\r
82     } //-- void deleteColour() \r
83 \r
84     /**\r
85      * Method deleteValue\r
86      * \r
87      */\r
88     public void deleteValue()\r
89     {\r
90         this._has_value= false;\r
91     } //-- void deleteValue() \r
92 \r
93     /**\r
94      * Returns the value of field 'colour'.\r
95      * \r
96      * @return int\r
97      * @return the value of field 'colour'.\r
98      */\r
99     public int getColour()\r
100     {\r
101         return this._colour;\r
102     } //-- int getColour() \r
103 \r
104     /**\r
105      * Returns the value of field 'label'.\r
106      * \r
107      * @return String\r
108      * @return the value of field 'label'.\r
109      */\r
110     public java.lang.String getLabel()\r
111     {\r
112         return this._label;\r
113     } //-- java.lang.String getLabel() \r
114 \r
115     /**\r
116      * Returns the value of field 'value'.\r
117      * \r
118      * @return float\r
119      * @return the value of field 'value'.\r
120      */\r
121     public float getValue()\r
122     {\r
123         return this._value;\r
124     } //-- float getValue() \r
125 \r
126     /**\r
127      * Method hasColour\r
128      * \r
129      * \r
130      * \r
131      * @return boolean\r
132      */\r
133     public boolean hasColour()\r
134     {\r
135         return this._has_colour;\r
136     } //-- boolean hasColour() \r
137 \r
138     /**\r
139      * Method hasValue\r
140      * \r
141      * \r
142      * \r
143      * @return boolean\r
144      */\r
145     public boolean hasValue()\r
146     {\r
147         return this._has_value;\r
148     } //-- boolean hasValue() \r
149 \r
150     /**\r
151      * Method isValid\r
152      * \r
153      * \r
154      * \r
155      * @return boolean\r
156      */\r
157     public boolean isValid()\r
158     {\r
159         try {\r
160             validate();\r
161         }\r
162         catch (org.exolab.castor.xml.ValidationException vex) {\r
163             return false;\r
164         }\r
165         return true;\r
166     } //-- boolean isValid() \r
167 \r
168     /**\r
169      * Method marshal\r
170      * \r
171      * \r
172      * \r
173      * @param out\r
174      */\r
175     public void marshal(java.io.Writer out)\r
176         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
177     {\r
178         \r
179         Marshaller.marshal(this, out);\r
180     } //-- void marshal(java.io.Writer) \r
181 \r
182     /**\r
183      * Method marshal\r
184      * \r
185      * \r
186      * \r
187      * @param handler\r
188      */\r
189     public void marshal(org.xml.sax.ContentHandler handler)\r
190         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
191     {\r
192         \r
193         Marshaller.marshal(this, handler);\r
194     } //-- void marshal(org.xml.sax.ContentHandler) \r
195 \r
196     /**\r
197      * Sets the value of field 'colour'.\r
198      * \r
199      * @param colour the value of field 'colour'.\r
200      */\r
201     public void setColour(int colour)\r
202     {\r
203         this._colour = colour;\r
204         this._has_colour = true;\r
205     } //-- void setColour(int) \r
206 \r
207     /**\r
208      * Sets the value of field 'label'.\r
209      * \r
210      * @param label the value of field 'label'.\r
211      */\r
212     public void setLabel(java.lang.String label)\r
213     {\r
214         this._label = label;\r
215     } //-- void setLabel(java.lang.String) \r
216 \r
217     /**\r
218      * Sets the value of field 'value'.\r
219      * \r
220      * @param value the value of field 'value'.\r
221      */\r
222     public void setValue(float value)\r
223     {\r
224         this._value = value;\r
225         this._has_value = true;\r
226     } //-- void setValue(float) \r
227 \r
228     /**\r
229      * Method unmarshal\r
230      * \r
231      * \r
232      * \r
233      * @param reader\r
234      * @return Object\r
235      */\r
236     public static java.lang.Object unmarshal(java.io.Reader reader)\r
237         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
238     {\r
239         return (jalview.schemabinding.version2.ThresholdLine) Unmarshaller.unmarshal(jalview.schemabinding.version2.ThresholdLine.class, reader);\r
240     } //-- java.lang.Object unmarshal(java.io.Reader) \r
241 \r
242     /**\r
243      * Method validate\r
244      * \r
245      */\r
246     public void validate()\r
247         throws org.exolab.castor.xml.ValidationException\r
248     {\r
249         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
250         validator.validate(this);\r
251     } //-- void validate() \r
252 \r
253 }\r