2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML
\r
8 package jalview.schemabinding.version2;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\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
25 * Class AnnotationElement.
\r
27 * @version $Revision$ $Date$
\r
29 public class AnnotationElement implements java.io.Serializable {
\r
32 //--------------------------/
\r
33 //- Class/Member Variables -/
\r
34 //--------------------------/
\r
39 private int _position;
\r
42 * keeps track of state for field: _position
\r
44 private boolean _has_position;
\r
49 private int _colour;
\r
52 * keeps track of state for field: _colour
\r
54 private boolean _has_colour;
\r
57 * Field _displayCharacter
\r
59 private java.lang.String _displayCharacter;
\r
62 * Field _description
\r
64 private java.lang.String _description;
\r
67 * Field _secondaryStructure
\r
69 private java.lang.String _secondaryStructure;
\r
74 private float _value;
\r
77 * keeps track of state for field: _value
\r
79 private boolean _has_value;
\r
86 public AnnotationElement() {
\r
88 } //-- jalview.schemabinding.version2.AnnotationElement()
\r
96 * Method deleteColour
\r
99 public void deleteColour()
\r
101 this._has_colour= false;
\r
102 } //-- void deleteColour()
\r
105 * Method deletePosition
\r
108 public void deletePosition()
\r
110 this._has_position= false;
\r
111 } //-- void deletePosition()
\r
114 * Method deleteValue
\r
117 public void deleteValue()
\r
119 this._has_value= false;
\r
120 } //-- void deleteValue()
\r
123 * Returns the value of field 'colour'.
\r
126 * @return the value of field 'colour'.
\r
128 public int getColour()
\r
130 return this._colour;
\r
131 } //-- int getColour()
\r
134 * Returns the value of field 'description'.
\r
137 * @return the value of field 'description'.
\r
139 public java.lang.String getDescription()
\r
141 return this._description;
\r
142 } //-- java.lang.String getDescription()
\r
145 * Returns the value of field 'displayCharacter'.
\r
148 * @return the value of field 'displayCharacter'.
\r
150 public java.lang.String getDisplayCharacter()
\r
152 return this._displayCharacter;
\r
153 } //-- java.lang.String getDisplayCharacter()
\r
156 * Returns the value of field 'position'.
\r
159 * @return the value of field 'position'.
\r
161 public int getPosition()
\r
163 return this._position;
\r
164 } //-- int getPosition()
\r
167 * Returns the value of field 'secondaryStructure'.
\r
170 * @return the value of field 'secondaryStructure'.
\r
172 public java.lang.String getSecondaryStructure()
\r
174 return this._secondaryStructure;
\r
175 } //-- java.lang.String getSecondaryStructure()
\r
178 * Returns the value of field 'value'.
\r
181 * @return the value of field 'value'.
\r
183 public float getValue()
\r
185 return this._value;
\r
186 } //-- float getValue()
\r
195 public boolean hasColour()
\r
197 return this._has_colour;
\r
198 } //-- boolean hasColour()
\r
201 * Method hasPosition
\r
207 public boolean hasPosition()
\r
209 return this._has_position;
\r
210 } //-- boolean hasPosition()
\r
219 public boolean hasValue()
\r
221 return this._has_value;
\r
222 } //-- boolean hasValue()
\r
231 public boolean isValid()
\r
236 catch (org.exolab.castor.xml.ValidationException vex) {
\r
240 } //-- boolean isValid()
\r
249 public void marshal(java.io.Writer out)
\r
250 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
253 Marshaller.marshal(this, out);
\r
254 } //-- void marshal(java.io.Writer)
\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
267 Marshaller.marshal(this, handler);
\r
268 } //-- void marshal(org.xml.sax.ContentHandler)
\r
271 * Sets the value of field 'colour'.
\r
273 * @param colour the value of field 'colour'.
\r
275 public void setColour(int colour)
\r
277 this._colour = colour;
\r
278 this._has_colour = true;
\r
279 } //-- void setColour(int)
\r
282 * Sets the value of field 'description'.
\r
284 * @param description the value of field 'description'.
\r
286 public void setDescription(java.lang.String description)
\r
288 this._description = description;
\r
289 } //-- void setDescription(java.lang.String)
\r
292 * Sets the value of field 'displayCharacter'.
\r
294 * @param displayCharacter the value of field 'displayCharacter'
\r
296 public void setDisplayCharacter(java.lang.String displayCharacter)
\r
298 this._displayCharacter = displayCharacter;
\r
299 } //-- void setDisplayCharacter(java.lang.String)
\r
302 * Sets the value of field 'position'.
\r
304 * @param position the value of field 'position'.
\r
306 public void setPosition(int position)
\r
308 this._position = position;
\r
309 this._has_position = true;
\r
310 } //-- void setPosition(int)
\r
313 * Sets the value of field 'secondaryStructure'.
\r
315 * @param secondaryStructure the value of field
\r
316 * 'secondaryStructure'.
\r
318 public void setSecondaryStructure(java.lang.String secondaryStructure)
\r
320 this._secondaryStructure = secondaryStructure;
\r
321 } //-- void setSecondaryStructure(java.lang.String)
\r
324 * Sets the value of field 'value'.
\r
326 * @param value the value of field 'value'.
\r
328 public void setValue(float value)
\r
330 this._value = value;
\r
331 this._has_value = true;
\r
332 } //-- void setValue(float)
\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
345 return (jalview.schemabinding.version2.AnnotationElement) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationElement.class, reader);
\r
346 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
352 public void validate()
\r
353 throws org.exolab.castor.xml.ValidationException
\r
355 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
356 validator.validate(this);
\r
357 } //-- void validate()
\r