2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
18 * Class AnnotationElement.
20 * @version $Revision$ $Date$
22 public class AnnotationElement implements java.io.Serializable
25 // --------------------------/
26 // - Class/Member Variables -/
27 // --------------------------/
32 private int _position;
35 * keeps track of state for field: _position
37 private boolean _has_position;
45 * keeps track of state for field: _colour
47 private boolean _has_colour;
50 * Field _displayCharacter.
52 private java.lang.String _displayCharacter;
57 private java.lang.String _description;
60 * Field _secondaryStructure.
62 private java.lang.String _secondaryStructure;
70 * keeps track of state for field: _value
72 private boolean _has_value;
78 public AnnotationElement()
89 public void deleteColour()
91 this._has_colour = false;
96 public void deletePosition()
98 this._has_position = false;
103 public void deleteValue()
105 this._has_value = false;
109 * Returns the value of field 'colour'.
111 * @return the value of field 'Colour'.
113 public int getColour()
119 * Returns the value of field 'description'.
121 * @return the value of field 'Description'.
123 public java.lang.String getDescription()
125 return this._description;
129 * Returns the value of field 'displayCharacter'.
131 * @return the value of field 'DisplayCharacter'.
133 public java.lang.String getDisplayCharacter()
135 return this._displayCharacter;
139 * Returns the value of field 'position'.
141 * @return the value of field 'Position'.
143 public int getPosition()
145 return this._position;
149 * Returns the value of field 'secondaryStructure'.
151 * @return the value of field 'SecondaryStructure'.
153 public java.lang.String getSecondaryStructure()
155 return this._secondaryStructure;
159 * Returns the value of field 'value'.
161 * @return the value of field 'Value'.
163 public float getValue()
171 * @return true if at least one Colour has been added
173 public boolean hasColour()
175 return this._has_colour;
179 * Method hasPosition.
181 * @return true if at least one Position has been added
183 public boolean hasPosition()
185 return this._has_position;
191 * @return true if at least one Value has been added
193 public boolean hasValue()
195 return this._has_value;
201 * @return true if this object is valid according to the schema
203 public boolean isValid()
208 } catch (org.exolab.castor.xml.ValidationException vex)
219 * @throws org.exolab.castor.xml.MarshalException
220 * if object is null or if any SAXException is thrown during
222 * @throws org.exolab.castor.xml.ValidationException
223 * if this object is an invalid instance according to the schema
225 public void marshal(final java.io.Writer out)
226 throws org.exolab.castor.xml.MarshalException,
227 org.exolab.castor.xml.ValidationException
229 Marshaller.marshal(this, out);
236 * @throws java.io.IOException
237 * if an IOException occurs during marshaling
238 * @throws org.exolab.castor.xml.ValidationException
239 * if this object is an invalid instance according to the schema
240 * @throws org.exolab.castor.xml.MarshalException
241 * if object is null or if any SAXException is thrown during
244 public void marshal(final org.xml.sax.ContentHandler handler)
245 throws java.io.IOException,
246 org.exolab.castor.xml.MarshalException,
247 org.exolab.castor.xml.ValidationException
249 Marshaller.marshal(this, handler);
253 * Sets the value of field 'colour'.
256 * the value of field 'colour'.
258 public void setColour(final int colour)
260 this._colour = colour;
261 this._has_colour = true;
265 * Sets the value of field 'description'.
268 * the value of field 'description'.
270 public void setDescription(final java.lang.String description)
272 this._description = description;
276 * Sets the value of field 'displayCharacter'.
278 * @param displayCharacter
279 * the value of field 'displayCharacter'
281 public void setDisplayCharacter(final java.lang.String displayCharacter)
283 this._displayCharacter = displayCharacter;
287 * Sets the value of field 'position'.
290 * the value of field 'position'.
292 public void setPosition(final int position)
294 this._position = position;
295 this._has_position = true;
299 * Sets the value of field 'secondaryStructure'.
301 * @param secondaryStructure
302 * the value of field 'secondaryStructure'.
304 public void setSecondaryStructure(
305 final java.lang.String secondaryStructure)
307 this._secondaryStructure = secondaryStructure;
311 * Sets the value of field 'value'.
314 * the value of field 'value'.
316 public void setValue(final float value)
319 this._has_value = true;
326 * @throws org.exolab.castor.xml.MarshalException
327 * if object is null or if any SAXException is thrown during
329 * @throws org.exolab.castor.xml.ValidationException
330 * if this object is an invalid instance according to the schema
331 * @return the unmarshaled jalview.schemabinding.version2.AnnotationElement
333 public static jalview.schemabinding.version2.AnnotationElement unmarshal(
334 final java.io.Reader reader)
335 throws org.exolab.castor.xml.MarshalException,
336 org.exolab.castor.xml.ValidationException
338 return (jalview.schemabinding.version2.AnnotationElement) Unmarshaller
340 jalview.schemabinding.version2.AnnotationElement.class,
347 * @throws org.exolab.castor.xml.ValidationException
348 * if this object is an invalid instance according to the schema
350 public void validate() throws org.exolab.castor.xml.ValidationException
352 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
353 validator.validate(this);