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