Binding with descriptors
[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 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 AnnotationElement.\r
26  * \r
27  * @version $Revision$ $Date$\r
28  */\r
29 public class AnnotationElement implements java.io.Serializable {\r
30 \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       //----------------/\r
73      //- Constructors -/\r
74     //----------------/\r
75 \r
76     public AnnotationElement() {\r
77         super();\r
78     } //-- jalview.schemabinding.version2.AnnotationElement()\r
79 \r
80 \r
81       //-----------/\r
82      //- Methods -/\r
83     //-----------/\r
84 \r
85     /**\r
86      * Method deletePosition\r
87      * \r
88      */\r
89     public void deletePosition()\r
90     {\r
91         this._has_position= false;\r
92     } //-- void deletePosition() \r
93 \r
94     /**\r
95      * Method deleteValue\r
96      * \r
97      */\r
98     public void deleteValue()\r
99     {\r
100         this._has_value= false;\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     } //-- java.lang.String getDescription() \r
113 \r
114     /**\r
115      * Returns the value of field 'displayCharacter'.\r
116      * \r
117      * @return String\r
118      * @return the value of field 'displayCharacter'.\r
119      */\r
120     public java.lang.String getDisplayCharacter()\r
121     {\r
122         return this._displayCharacter;\r
123     } //-- java.lang.String getDisplayCharacter() \r
124 \r
125     /**\r
126      * Returns the value of field 'position'.\r
127      * \r
128      * @return int\r
129      * @return the value of field 'position'.\r
130      */\r
131     public int getPosition()\r
132     {\r
133         return this._position;\r
134     } //-- int getPosition() \r
135 \r
136     /**\r
137      * Returns the value of field 'secondaryStructure'.\r
138      * \r
139      * @return String\r
140      * @return the value of field 'secondaryStructure'.\r
141      */\r
142     public java.lang.String getSecondaryStructure()\r
143     {\r
144         return this._secondaryStructure;\r
145     } //-- java.lang.String getSecondaryStructure() \r
146 \r
147     /**\r
148      * Returns the value of field 'value'.\r
149      * \r
150      * @return float\r
151      * @return the value of field 'value'.\r
152      */\r
153     public float getValue()\r
154     {\r
155         return this._value;\r
156     } //-- float getValue() \r
157 \r
158     /**\r
159      * Method hasPosition\r
160      * \r
161      * \r
162      * \r
163      * @return boolean\r
164      */\r
165     public boolean hasPosition()\r
166     {\r
167         return this._has_position;\r
168     } //-- boolean hasPosition() \r
169 \r
170     /**\r
171      * Method hasValue\r
172      * \r
173      * \r
174      * \r
175      * @return boolean\r
176      */\r
177     public boolean hasValue()\r
178     {\r
179         return this._has_value;\r
180     } //-- boolean hasValue() \r
181 \r
182     /**\r
183      * Method isValid\r
184      * \r
185      * \r
186      * \r
187      * @return boolean\r
188      */\r
189     public boolean isValid()\r
190     {\r
191         try {\r
192             validate();\r
193         }\r
194         catch (org.exolab.castor.xml.ValidationException vex) {\r
195             return false;\r
196         }\r
197         return true;\r
198     } //-- boolean isValid() \r
199 \r
200     /**\r
201      * Method marshal\r
202      * \r
203      * \r
204      * \r
205      * @param out\r
206      */\r
207     public void marshal(java.io.Writer out)\r
208         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
209     {\r
210         \r
211         Marshaller.marshal(this, out);\r
212     } //-- void marshal(java.io.Writer) \r
213 \r
214     /**\r
215      * Method marshal\r
216      * \r
217      * \r
218      * \r
219      * @param handler\r
220      */\r
221     public void marshal(org.xml.sax.ContentHandler handler)\r
222         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
223     {\r
224         \r
225         Marshaller.marshal(this, handler);\r
226     } //-- void marshal(org.xml.sax.ContentHandler) \r
227 \r
228     /**\r
229      * Sets the value of field 'description'.\r
230      * \r
231      * @param description the value of field 'description'.\r
232      */\r
233     public void setDescription(java.lang.String description)\r
234     {\r
235         this._description = description;\r
236     } //-- void setDescription(java.lang.String) \r
237 \r
238     /**\r
239      * Sets the value of field 'displayCharacter'.\r
240      * \r
241      * @param displayCharacter the value of field 'displayCharacter'\r
242      */\r
243     public void setDisplayCharacter(java.lang.String displayCharacter)\r
244     {\r
245         this._displayCharacter = displayCharacter;\r
246     } //-- void setDisplayCharacter(java.lang.String) \r
247 \r
248     /**\r
249      * Sets the value of field 'position'.\r
250      * \r
251      * @param position the value of field 'position'.\r
252      */\r
253     public void setPosition(int position)\r
254     {\r
255         this._position = position;\r
256         this._has_position = true;\r
257     } //-- void setPosition(int) \r
258 \r
259     /**\r
260      * Sets the value of field 'secondaryStructure'.\r
261      * \r
262      * @param secondaryStructure the value of field\r
263      * 'secondaryStructure'.\r
264      */\r
265     public void setSecondaryStructure(java.lang.String secondaryStructure)\r
266     {\r
267         this._secondaryStructure = secondaryStructure;\r
268     } //-- void setSecondaryStructure(java.lang.String) \r
269 \r
270     /**\r
271      * Sets the value of field 'value'.\r
272      * \r
273      * @param value the value of field 'value'.\r
274      */\r
275     public void setValue(float value)\r
276     {\r
277         this._value = value;\r
278         this._has_value = true;\r
279     } //-- void setValue(float) \r
280 \r
281     /**\r
282      * Method unmarshal\r
283      * \r
284      * \r
285      * \r
286      * @param reader\r
287      * @return Object\r
288      */\r
289     public static java.lang.Object unmarshal(java.io.Reader reader)\r
290         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
291     {\r
292         return (jalview.schemabinding.version2.AnnotationElement) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationElement.class, reader);\r
293     } //-- java.lang.Object unmarshal(java.io.Reader) \r
294 \r
295     /**\r
296      * Method validate\r
297      * \r
298      */\r
299     public void validate()\r
300         throws org.exolab.castor.xml.ValidationException\r
301     {\r
302         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
303         validator.validate(this);\r
304     } //-- void validate() \r
305 \r
306 }\r