Formatting
[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 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 org.exolab.castor.xml.*;\r
15 \r
16 /**\r
17  * Class AnnotationElement.\r
18  *\r
19  * @version $Revision$ $Date$\r
20  */\r
21 public class AnnotationElement\r
22     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   //- Constructors -/\r
76   //----------------/\r
77 \r
78   public AnnotationElement()\r
79   {\r
80     super();\r
81   } //-- jalview.schemabinding.version2.AnnotationElement()\r
82 \r
83   //-----------/\r
84   //- Methods -/\r
85   //-----------/\r
86 \r
87   /**\r
88    * Method deleteColour\r
89    *\r
90    */\r
91   public void deleteColour()\r
92   {\r
93     this._has_colour = false;\r
94   } //-- void deleteColour()\r
95 \r
96   /**\r
97    * Method deletePosition\r
98    *\r
99    */\r
100   public void deletePosition()\r
101   {\r
102     this._has_position = false;\r
103   } //-- void deletePosition()\r
104 \r
105   /**\r
106    * Method deleteValue\r
107    *\r
108    */\r
109   public void deleteValue()\r
110   {\r
111     this._has_value = false;\r
112   } //-- void deleteValue()\r
113 \r
114   /**\r
115    * Returns the value of field 'colour'.\r
116    *\r
117    * @return int\r
118    * @return the value of field 'colour'.\r
119    */\r
120   public int getColour()\r
121   {\r
122     return this._colour;\r
123   } //-- int getColour()\r
124 \r
125   /**\r
126    * Returns the value of field 'description'.\r
127    *\r
128    * @return String\r
129    * @return the value of field 'description'.\r
130    */\r
131   public java.lang.String getDescription()\r
132   {\r
133     return this._description;\r
134   } //-- java.lang.String getDescription()\r
135 \r
136   /**\r
137    * Returns the value of field 'displayCharacter'.\r
138    *\r
139    * @return String\r
140    * @return the value of field 'displayCharacter'.\r
141    */\r
142   public java.lang.String getDisplayCharacter()\r
143   {\r
144     return this._displayCharacter;\r
145   } //-- java.lang.String getDisplayCharacter()\r
146 \r
147   /**\r
148    * Returns the value of field 'position'.\r
149    *\r
150    * @return int\r
151    * @return the value of field 'position'.\r
152    */\r
153   public int getPosition()\r
154   {\r
155     return this._position;\r
156   } //-- int getPosition()\r
157 \r
158   /**\r
159    * Returns the value of field 'secondaryStructure'.\r
160    *\r
161    * @return String\r
162    * @return the value of field 'secondaryStructure'.\r
163    */\r
164   public java.lang.String getSecondaryStructure()\r
165   {\r
166     return this._secondaryStructure;\r
167   } //-- java.lang.String getSecondaryStructure()\r
168 \r
169   /**\r
170    * Returns the value of field 'value'.\r
171    *\r
172    * @return float\r
173    * @return the value of field 'value'.\r
174    */\r
175   public float getValue()\r
176   {\r
177     return this._value;\r
178   } //-- float getValue()\r
179 \r
180   /**\r
181    * Method hasColour\r
182    *\r
183    *\r
184    *\r
185    * @return boolean\r
186    */\r
187   public boolean hasColour()\r
188   {\r
189     return this._has_colour;\r
190   } //-- boolean hasColour()\r
191 \r
192   /**\r
193    * Method hasPosition\r
194    *\r
195    *\r
196    *\r
197    * @return boolean\r
198    */\r
199   public boolean hasPosition()\r
200   {\r
201     return this._has_position;\r
202   } //-- boolean hasPosition()\r
203 \r
204   /**\r
205    * Method hasValue\r
206    *\r
207    *\r
208    *\r
209    * @return boolean\r
210    */\r
211   public boolean hasValue()\r
212   {\r
213     return this._has_value;\r
214   } //-- boolean hasValue()\r
215 \r
216   /**\r
217    * Method isValid\r
218    *\r
219    *\r
220    *\r
221    * @return boolean\r
222    */\r
223   public boolean isValid()\r
224   {\r
225     try\r
226     {\r
227       validate();\r
228     }\r
229     catch (org.exolab.castor.xml.ValidationException vex)\r
230     {\r
231       return false;\r
232     }\r
233     return true;\r
234   } //-- boolean isValid()\r
235 \r
236   /**\r
237    * Method marshal\r
238    *\r
239    *\r
240    *\r
241    * @param out\r
242    */\r
243   public void marshal(java.io.Writer out)\r
244       throws org.exolab.castor.xml.MarshalException,\r
245       org.exolab.castor.xml.ValidationException\r
246   {\r
247 \r
248     Marshaller.marshal(this, out);\r
249   } //-- void marshal(java.io.Writer)\r
250 \r
251   /**\r
252    * Method marshal\r
253    *\r
254    *\r
255    *\r
256    * @param handler\r
257    */\r
258   public void marshal(org.xml.sax.ContentHandler handler)\r
259       throws java.io.IOException, org.exolab.castor.xml.MarshalException,\r
260       org.exolab.castor.xml.ValidationException\r
261   {\r
262 \r
263     Marshaller.marshal(this, handler);\r
264   } //-- void marshal(org.xml.sax.ContentHandler)\r
265 \r
266   /**\r
267    * Sets the value of field 'colour'.\r
268    *\r
269    * @param colour the value of field 'colour'.\r
270    */\r
271   public void setColour(int colour)\r
272   {\r
273     this._colour = colour;\r
274     this._has_colour = true;\r
275   } //-- void setColour(int)\r
276 \r
277   /**\r
278    * Sets the value of field 'description'.\r
279    *\r
280    * @param description the value of field 'description'.\r
281    */\r
282   public void setDescription(java.lang.String description)\r
283   {\r
284     this._description = description;\r
285   } //-- void setDescription(java.lang.String)\r
286 \r
287   /**\r
288    * Sets the value of field 'displayCharacter'.\r
289    *\r
290    * @param displayCharacter the value of field 'displayCharacter'\r
291    */\r
292   public void setDisplayCharacter(java.lang.String displayCharacter)\r
293   {\r
294     this._displayCharacter = displayCharacter;\r
295   } //-- void setDisplayCharacter(java.lang.String)\r
296 \r
297   /**\r
298    * Sets the value of field 'position'.\r
299    *\r
300    * @param position the value of field 'position'.\r
301    */\r
302   public void setPosition(int position)\r
303   {\r
304     this._position = position;\r
305     this._has_position = true;\r
306   } //-- void setPosition(int)\r
307 \r
308   /**\r
309    * Sets the value of field 'secondaryStructure'.\r
310    *\r
311    * @param secondaryStructure the value of field\r
312    * 'secondaryStructure'.\r
313    */\r
314   public void setSecondaryStructure(java.lang.String secondaryStructure)\r
315   {\r
316     this._secondaryStructure = secondaryStructure;\r
317   } //-- void setSecondaryStructure(java.lang.String)\r
318 \r
319   /**\r
320    * Sets the value of field 'value'.\r
321    *\r
322    * @param value the value of field 'value'.\r
323    */\r
324   public void setValue(float value)\r
325   {\r
326     this._value = value;\r
327     this._has_value = true;\r
328   } //-- void setValue(float)\r
329 \r
330   /**\r
331    * Method unmarshal\r
332    *\r
333    *\r
334    *\r
335    * @param reader\r
336    * @return Object\r
337    */\r
338   public static java.lang.Object unmarshal(java.io.Reader reader)\r
339       throws org.exolab.castor.xml.MarshalException,\r
340       org.exolab.castor.xml.ValidationException\r
341   {\r
342     return (jalview.schemabinding.version2.AnnotationElement) Unmarshaller.\r
343         unmarshal(jalview.schemabinding.version2.AnnotationElement.class,\r
344                   reader);\r
345   } //-- java.lang.Object unmarshal(java.io.Reader)\r
346 \r
347   /**\r
348    * Method validate\r
349    *\r
350    */\r
351   public void validate()\r
352       throws org.exolab.castor.xml.ValidationException\r
353   {\r
354     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.\r
355         Validator();\r
356     validator.validate(this);\r
357   } //-- void validate()\r
358 \r
359 }\r