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