update author list in license for (JAL-826)
[jalview.git] / src / jalview / schemabinding / version2 / AnnotationElement.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
4  *
5  * This file is part of Jalview.
6  *
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  *******************************************************************************/
18 /*
19  * This class was automatically generated with 
20  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
21  * Schema.
22  * $Id$
23  */
24
25 package jalview.schemabinding.version2;
26
27   //---------------------------------/
28  //- Imported classes and packages -/
29 //---------------------------------/
30
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
33
34 /**
35  * Class AnnotationElement.
36  * 
37  * @version $Revision$ $Date$
38  */
39 public class AnnotationElement implements java.io.Serializable {
40
41
42       //--------------------------/
43      //- Class/Member Variables -/
44     //--------------------------/
45
46     /**
47      * Field _position.
48      */
49     private int _position;
50
51     /**
52      * keeps track of state for field: _position
53      */
54     private boolean _has_position;
55
56     /**
57      * Field _colour.
58      */
59     private int _colour;
60
61     /**
62      * keeps track of state for field: _colour
63      */
64     private boolean _has_colour;
65
66     /**
67      * Field _displayCharacter.
68      */
69     private java.lang.String _displayCharacter;
70
71     /**
72      * Field _description.
73      */
74     private java.lang.String _description;
75
76     /**
77      * Field _secondaryStructure.
78      */
79     private java.lang.String _secondaryStructure;
80
81     /**
82      * Field _value.
83      */
84     private float _value;
85
86     /**
87      * keeps track of state for field: _value
88      */
89     private boolean _has_value;
90
91
92       //----------------/
93      //- Constructors -/
94     //----------------/
95
96     public AnnotationElement() {
97         super();
98     }
99
100
101       //-----------/
102      //- Methods -/
103     //-----------/
104
105     /**
106      */
107     public void deleteColour(
108     ) {
109         this._has_colour= false;
110     }
111
112     /**
113      */
114     public void deletePosition(
115     ) {
116         this._has_position= false;
117     }
118
119     /**
120      */
121     public void deleteValue(
122     ) {
123         this._has_value= false;
124     }
125
126     /**
127      * Returns the value of field 'colour'.
128      * 
129      * @return the value of field 'Colour'.
130      */
131     public int getColour(
132     ) {
133         return this._colour;
134     }
135
136     /**
137      * Returns the value of field 'description'.
138      * 
139      * @return the value of field 'Description'.
140      */
141     public java.lang.String getDescription(
142     ) {
143         return this._description;
144     }
145
146     /**
147      * Returns the value of field 'displayCharacter'.
148      * 
149      * @return the value of field 'DisplayCharacter'.
150      */
151     public java.lang.String getDisplayCharacter(
152     ) {
153         return this._displayCharacter;
154     }
155
156     /**
157      * Returns the value of field 'position'.
158      * 
159      * @return the value of field 'Position'.
160      */
161     public int getPosition(
162     ) {
163         return this._position;
164     }
165
166     /**
167      * Returns the value of field 'secondaryStructure'.
168      * 
169      * @return the value of field 'SecondaryStructure'.
170      */
171     public java.lang.String getSecondaryStructure(
172     ) {
173         return this._secondaryStructure;
174     }
175
176     /**
177      * Returns the value of field 'value'.
178      * 
179      * @return the value of field 'Value'.
180      */
181     public float getValue(
182     ) {
183         return this._value;
184     }
185
186     /**
187      * Method hasColour.
188      * 
189      * @return true if at least one Colour has been added
190      */
191     public boolean hasColour(
192     ) {
193         return this._has_colour;
194     }
195
196     /**
197      * Method hasPosition.
198      * 
199      * @return true if at least one Position has been added
200      */
201     public boolean hasPosition(
202     ) {
203         return this._has_position;
204     }
205
206     /**
207      * Method hasValue.
208      * 
209      * @return true if at least one Value has been added
210      */
211     public boolean hasValue(
212     ) {
213         return this._has_value;
214     }
215
216     /**
217      * Method isValid.
218      * 
219      * @return true if this object is valid according to the schema
220      */
221     public boolean isValid(
222     ) {
223         try {
224             validate();
225         } catch (org.exolab.castor.xml.ValidationException vex) {
226             return false;
227         }
228         return true;
229     }
230
231     /**
232      * 
233      * 
234      * @param out
235      * @throws org.exolab.castor.xml.MarshalException if object is
236      * null or if any SAXException is thrown during marshaling
237      * @throws org.exolab.castor.xml.ValidationException if this
238      * object is an invalid instance according to the schema
239      */
240     public void marshal(
241             final java.io.Writer out)
242     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
243         Marshaller.marshal(this, out);
244     }
245
246     /**
247      * 
248      * 
249      * @param handler
250      * @throws java.io.IOException if an IOException occurs during
251      * marshaling
252      * @throws org.exolab.castor.xml.ValidationException if this
253      * object is an invalid instance according to the schema
254      * @throws org.exolab.castor.xml.MarshalException if object is
255      * null or if any SAXException is thrown during marshaling
256      */
257     public void marshal(
258             final org.xml.sax.ContentHandler handler)
259     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
260         Marshaller.marshal(this, handler);
261     }
262
263     /**
264      * Sets the value of field 'colour'.
265      * 
266      * @param colour the value of field 'colour'.
267      */
268     public void setColour(
269             final int colour) {
270         this._colour = colour;
271         this._has_colour = true;
272     }
273
274     /**
275      * Sets the value of field 'description'.
276      * 
277      * @param description the value of field 'description'.
278      */
279     public void setDescription(
280             final java.lang.String description) {
281         this._description = description;
282     }
283
284     /**
285      * Sets the value of field 'displayCharacter'.
286      * 
287      * @param displayCharacter the value of field 'displayCharacter'
288      */
289     public void setDisplayCharacter(
290             final java.lang.String displayCharacter) {
291         this._displayCharacter = displayCharacter;
292     }
293
294     /**
295      * Sets the value of field 'position'.
296      * 
297      * @param position the value of field 'position'.
298      */
299     public void setPosition(
300             final int position) {
301         this._position = position;
302         this._has_position = true;
303     }
304
305     /**
306      * Sets the value of field 'secondaryStructure'.
307      * 
308      * @param secondaryStructure the value of field
309      * 'secondaryStructure'.
310      */
311     public void setSecondaryStructure(
312             final java.lang.String secondaryStructure) {
313         this._secondaryStructure = secondaryStructure;
314     }
315
316     /**
317      * Sets the value of field 'value'.
318      * 
319      * @param value the value of field 'value'.
320      */
321     public void setValue(
322             final float value) {
323         this._value = value;
324         this._has_value = true;
325     }
326
327     /**
328      * Method unmarshal.
329      * 
330      * @param reader
331      * @throws org.exolab.castor.xml.MarshalException if object is
332      * null or if any SAXException is thrown during marshaling
333      * @throws org.exolab.castor.xml.ValidationException if this
334      * object is an invalid instance according to the schema
335      * @return the unmarshaled
336      * jalview.schemabinding.version2.AnnotationElement
337      */
338     public static jalview.schemabinding.version2.AnnotationElement unmarshal(
339             final java.io.Reader reader)
340     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
341         return (jalview.schemabinding.version2.AnnotationElement) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationElement.class, reader);
342     }
343
344     /**
345      * 
346      * 
347      * @throws org.exolab.castor.xml.ValidationException if this
348      * object is an invalid instance according to the schema
349      */
350     public void validate(
351     )
352     throws org.exolab.castor.xml.ValidationException {
353         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
354         validator.validate(this);
355     }
356
357 }