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