eca3e6a3838fe47a1552ff5dffa079ae0aebd7ec
[jalview.git] / src / jalview / schemabinding / version2 / AnnotationElement.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 AnnotationElement.\r
19  * \r
20  * @version $Revision$ $Date$\r
21  */\r
22 public class AnnotationElement implements java.io.Serializable {\r
23 \r
24 \r
25       //--------------------------/\r
26      //- Class/Member Variables -/\r
27     //--------------------------/\r
28 \r
29     /**\r
30      * Field _position.\r
31      */\r
32     private int _position;\r
33 \r
34     /**\r
35      * keeps track of state for field: _position\r
36      */\r
37     private boolean _has_position;\r
38 \r
39     /**\r
40      * Field _colour.\r
41      */\r
42     private int _colour;\r
43 \r
44     /**\r
45      * keeps track of state for field: _colour\r
46      */\r
47     private boolean _has_colour;\r
48 \r
49     /**\r
50      * Field _displayCharacter.\r
51      */\r
52     private java.lang.String _displayCharacter;\r
53 \r
54     /**\r
55      * Field _description.\r
56      */\r
57     private java.lang.String _description;\r
58 \r
59     /**\r
60      * Field _secondaryStructure.\r
61      */\r
62     private java.lang.String _secondaryStructure;\r
63 \r
64     /**\r
65      * Field _value.\r
66      */\r
67     private float _value;\r
68 \r
69     /**\r
70      * keeps track of state for field: _value\r
71      */\r
72     private boolean _has_value;\r
73 \r
74 \r
75       //----------------/\r
76      //- Constructors -/\r
77     //----------------/\r
78 \r
79     public AnnotationElement() {\r
80         super();\r
81     }\r
82 \r
83 \r
84       //-----------/\r
85      //- Methods -/\r
86     //-----------/\r
87 \r
88     /**\r
89      */\r
90     public void deleteColour(\r
91     ) {\r
92         this._has_colour= false;\r
93     }\r
94 \r
95     /**\r
96      */\r
97     public void deletePosition(\r
98     ) {\r
99         this._has_position= false;\r
100     }\r
101 \r
102     /**\r
103      */\r
104     public void deleteValue(\r
105     ) {\r
106         this._has_value= false;\r
107     }\r
108 \r
109     /**\r
110      * Returns the value of field 'colour'.\r
111      * \r
112      * @return the value of field 'Colour'.\r
113      */\r
114     public int getColour(\r
115     ) {\r
116         return this._colour;\r
117     }\r
118 \r
119     /**\r
120      * Returns the value of field 'description'.\r
121      * \r
122      * @return the value of field 'Description'.\r
123      */\r
124     public java.lang.String getDescription(\r
125     ) {\r
126         return this._description;\r
127     }\r
128 \r
129     /**\r
130      * Returns the value of field 'displayCharacter'.\r
131      * \r
132      * @return the value of field 'DisplayCharacter'.\r
133      */\r
134     public java.lang.String getDisplayCharacter(\r
135     ) {\r
136         return this._displayCharacter;\r
137     }\r
138 \r
139     /**\r
140      * Returns the value of field 'position'.\r
141      * \r
142      * @return the value of field 'Position'.\r
143      */\r
144     public int getPosition(\r
145     ) {\r
146         return this._position;\r
147     }\r
148 \r
149     /**\r
150      * Returns the value of field 'secondaryStructure'.\r
151      * \r
152      * @return the value of field 'SecondaryStructure'.\r
153      */\r
154     public java.lang.String getSecondaryStructure(\r
155     ) {\r
156         return this._secondaryStructure;\r
157     }\r
158 \r
159     /**\r
160      * Returns the value of field 'value'.\r
161      * \r
162      * @return the value of field 'Value'.\r
163      */\r
164     public float getValue(\r
165     ) {\r
166         return this._value;\r
167     }\r
168 \r
169     /**\r
170      * Method hasColour.\r
171      * \r
172      * @return true if at least one Colour has been added\r
173      */\r
174     public boolean hasColour(\r
175     ) {\r
176         return this._has_colour;\r
177     }\r
178 \r
179     /**\r
180      * Method hasPosition.\r
181      * \r
182      * @return true if at least one Position has been added\r
183      */\r
184     public boolean hasPosition(\r
185     ) {\r
186         return this._has_position;\r
187     }\r
188 \r
189     /**\r
190      * Method hasValue.\r
191      * \r
192      * @return true if at least one Value has been added\r
193      */\r
194     public boolean hasValue(\r
195     ) {\r
196         return this._has_value;\r
197     }\r
198 \r
199     /**\r
200      * Method isValid.\r
201      * \r
202      * @return true if this object is valid according to the schema\r
203      */\r
204     public boolean isValid(\r
205     ) {\r
206         try {\r
207             validate();\r
208         } catch (org.exolab.castor.xml.ValidationException vex) {\r
209             return false;\r
210         }\r
211         return true;\r
212     }\r
213 \r
214     /**\r
215      * \r
216      * \r
217      * @param out\r
218      * @throws org.exolab.castor.xml.MarshalException if object is\r
219      * null or if any SAXException is thrown during marshaling\r
220      * @throws org.exolab.castor.xml.ValidationException if this\r
221      * object is an invalid instance according to the schema\r
222      */\r
223     public void marshal(\r
224             final java.io.Writer out)\r
225     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
226         Marshaller.marshal(this, out);\r
227     }\r
228 \r
229     /**\r
230      * \r
231      * \r
232      * @param handler\r
233      * @throws java.io.IOException if an IOException occurs during\r
234      * marshaling\r
235      * @throws org.exolab.castor.xml.ValidationException if this\r
236      * object is an invalid instance according to the schema\r
237      * @throws org.exolab.castor.xml.MarshalException if object is\r
238      * null or if any SAXException is thrown during marshaling\r
239      */\r
240     public void marshal(\r
241             final org.xml.sax.ContentHandler handler)\r
242     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
243         Marshaller.marshal(this, handler);\r
244     }\r
245 \r
246     /**\r
247      * Sets the value of field 'colour'.\r
248      * \r
249      * @param colour the value of field 'colour'.\r
250      */\r
251     public void setColour(\r
252             final int colour) {\r
253         this._colour = colour;\r
254         this._has_colour = true;\r
255     }\r
256 \r
257     /**\r
258      * Sets the value of field 'description'.\r
259      * \r
260      * @param description the value of field 'description'.\r
261      */\r
262     public void setDescription(\r
263             final java.lang.String description) {\r
264         this._description = description;\r
265     }\r
266 \r
267     /**\r
268      * Sets the value of field 'displayCharacter'.\r
269      * \r
270      * @param displayCharacter the value of field 'displayCharacter'\r
271      */\r
272     public void setDisplayCharacter(\r
273             final java.lang.String displayCharacter) {\r
274         this._displayCharacter = displayCharacter;\r
275     }\r
276 \r
277     /**\r
278      * Sets the value of field 'position'.\r
279      * \r
280      * @param position the value of field 'position'.\r
281      */\r
282     public void setPosition(\r
283             final int position) {\r
284         this._position = position;\r
285         this._has_position = true;\r
286     }\r
287 \r
288     /**\r
289      * Sets the value of field 'secondaryStructure'.\r
290      * \r
291      * @param secondaryStructure the value of field\r
292      * 'secondaryStructure'.\r
293      */\r
294     public void setSecondaryStructure(\r
295             final java.lang.String secondaryStructure) {\r
296         this._secondaryStructure = secondaryStructure;\r
297     }\r
298 \r
299     /**\r
300      * Sets the value of field 'value'.\r
301      * \r
302      * @param value the value of field 'value'.\r
303      */\r
304     public void setValue(\r
305             final float value) {\r
306         this._value = value;\r
307         this._has_value = true;\r
308     }\r
309 \r
310     /**\r
311      * Method unmarshal.\r
312      * \r
313      * @param reader\r
314      * @throws org.exolab.castor.xml.MarshalException if object is\r
315      * null or if any SAXException is thrown during marshaling\r
316      * @throws org.exolab.castor.xml.ValidationException if this\r
317      * object is an invalid instance according to the schema\r
318      * @return the unmarshaled\r
319      * jalview.schemabinding.version2.AnnotationElement\r
320      */\r
321     public static jalview.schemabinding.version2.AnnotationElement unmarshal(\r
322             final java.io.Reader reader)\r
323     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
324         return (jalview.schemabinding.version2.AnnotationElement) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationElement.class, reader);\r
325     }\r
326 \r
327     /**\r
328      * \r
329      * \r
330      * @throws org.exolab.castor.xml.ValidationException if this\r
331      * object is an invalid instance according to the schema\r
332      */\r
333     public void validate(\r
334     )\r
335     throws org.exolab.castor.xml.ValidationException {\r
336         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
337         validator.validate(this);\r
338     }\r
339 \r
340 }\r