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