update author list in license for (JAL-826)
[jalview.git] / src / jalview / binding / 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.binding;
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 _displayCharacter.
58      */
59     private java.lang.String _displayCharacter;
60
61     /**
62      * Field _description.
63      */
64     private java.lang.String _description;
65
66     /**
67      * Field _secondaryStructure.
68      */
69     private java.lang.String _secondaryStructure;
70
71     /**
72      * Field _value.
73      */
74     private float _value;
75
76     /**
77      * keeps track of state for field: _value
78      */
79     private boolean _has_value;
80
81
82       //----------------/
83      //- Constructors -/
84     //----------------/
85
86     public AnnotationElement() {
87         super();
88     }
89
90
91       //-----------/
92      //- Methods -/
93     //-----------/
94
95     /**
96      */
97     public void deletePosition(
98     ) {
99         this._has_position= false;
100     }
101
102     /**
103      */
104     public void deleteValue(
105     ) {
106         this._has_value= false;
107     }
108
109     /**
110      * Returns the value of field 'description'.
111      * 
112      * @return the value of field 'Description'.
113      */
114     public java.lang.String getDescription(
115     ) {
116         return this._description;
117     }
118
119     /**
120      * Returns the value of field 'displayCharacter'.
121      * 
122      * @return the value of field 'DisplayCharacter'.
123      */
124     public java.lang.String getDisplayCharacter(
125     ) {
126         return this._displayCharacter;
127     }
128
129     /**
130      * Returns the value of field 'position'.
131      * 
132      * @return the value of field 'Position'.
133      */
134     public int getPosition(
135     ) {
136         return this._position;
137     }
138
139     /**
140      * Returns the value of field 'secondaryStructure'.
141      * 
142      * @return the value of field 'SecondaryStructure'.
143      */
144     public java.lang.String getSecondaryStructure(
145     ) {
146         return this._secondaryStructure;
147     }
148
149     /**
150      * Returns the value of field 'value'.
151      * 
152      * @return the value of field 'Value'.
153      */
154     public float getValue(
155     ) {
156         return this._value;
157     }
158
159     /**
160      * Method hasPosition.
161      * 
162      * @return true if at least one Position has been added
163      */
164     public boolean hasPosition(
165     ) {
166         return this._has_position;
167     }
168
169     /**
170      * Method hasValue.
171      * 
172      * @return true if at least one Value has been added
173      */
174     public boolean hasValue(
175     ) {
176         return this._has_value;
177     }
178
179     /**
180      * Method isValid.
181      * 
182      * @return true if this object is valid according to the schema
183      */
184     public boolean isValid(
185     ) {
186         try {
187             validate();
188         } catch (org.exolab.castor.xml.ValidationException vex) {
189             return false;
190         }
191         return true;
192     }
193
194     /**
195      * 
196      * 
197      * @param out
198      * @throws org.exolab.castor.xml.MarshalException if object is
199      * null or if any SAXException is thrown during marshaling
200      * @throws org.exolab.castor.xml.ValidationException if this
201      * object is an invalid instance according to the schema
202      */
203     public void marshal(
204             final java.io.Writer out)
205     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
206         Marshaller.marshal(this, out);
207     }
208
209     /**
210      * 
211      * 
212      * @param handler
213      * @throws java.io.IOException if an IOException occurs during
214      * marshaling
215      * @throws org.exolab.castor.xml.ValidationException if this
216      * object is an invalid instance according to the schema
217      * @throws org.exolab.castor.xml.MarshalException if object is
218      * null or if any SAXException is thrown during marshaling
219      */
220     public void marshal(
221             final org.xml.sax.ContentHandler handler)
222     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
223         Marshaller.marshal(this, handler);
224     }
225
226     /**
227      * Sets the value of field 'description'.
228      * 
229      * @param description the value of field 'description'.
230      */
231     public void setDescription(
232             final java.lang.String description) {
233         this._description = description;
234     }
235
236     /**
237      * Sets the value of field 'displayCharacter'.
238      * 
239      * @param displayCharacter the value of field 'displayCharacter'
240      */
241     public void setDisplayCharacter(
242             final java.lang.String displayCharacter) {
243         this._displayCharacter = displayCharacter;
244     }
245
246     /**
247      * Sets the value of field 'position'.
248      * 
249      * @param position the value of field 'position'.
250      */
251     public void setPosition(
252             final int position) {
253         this._position = position;
254         this._has_position = true;
255     }
256
257     /**
258      * Sets the value of field 'secondaryStructure'.
259      * 
260      * @param secondaryStructure the value of field
261      * 'secondaryStructure'.
262      */
263     public void setSecondaryStructure(
264             final java.lang.String secondaryStructure) {
265         this._secondaryStructure = secondaryStructure;
266     }
267
268     /**
269      * Sets the value of field 'value'.
270      * 
271      * @param value the value of field 'value'.
272      */
273     public void setValue(
274             final float value) {
275         this._value = value;
276         this._has_value = true;
277     }
278
279     /**
280      * Method unmarshal.
281      * 
282      * @param reader
283      * @throws org.exolab.castor.xml.MarshalException if object is
284      * null or if any SAXException is thrown during marshaling
285      * @throws org.exolab.castor.xml.ValidationException if this
286      * object is an invalid instance according to the schema
287      * @return the unmarshaled jalview.binding.AnnotationElement
288      */
289     public static jalview.binding.AnnotationElement unmarshal(
290             final java.io.Reader reader)
291     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
292         return (jalview.binding.AnnotationElement) Unmarshaller.unmarshal(jalview.binding.AnnotationElement.class, reader);
293     }
294
295     /**
296      * 
297      * 
298      * @throws org.exolab.castor.xml.ValidationException if this
299      * object is an invalid instance according to the schema
300      */
301     public void validate(
302     )
303     throws org.exolab.castor.xml.ValidationException {
304         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
305         validator.validate(this);
306     }
307
308 }