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