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;
79 public AnnotationElement() {
90 public void deleteColour(
92 this._has_colour= false;
97 public void deletePosition(
99 this._has_position= false;
104 public void deleteValue(
106 this._has_value= false;
110 * Returns the value of field 'colour'.
112 * @return the value of field 'Colour'.
114 public int getColour(
120 * Returns the value of field 'description'.
122 * @return the value of field 'Description'.
124 public java.lang.String getDescription(
126 return this._description;
130 * Returns the value of field 'displayCharacter'.
132 * @return the value of field 'DisplayCharacter'.
134 public java.lang.String getDisplayCharacter(
136 return this._displayCharacter;
140 * Returns the value of field 'position'.
142 * @return the value of field 'Position'.
144 public int getPosition(
146 return this._position;
150 * Returns the value of field 'secondaryStructure'.
152 * @return the value of field 'SecondaryStructure'.
154 public java.lang.String getSecondaryStructure(
156 return this._secondaryStructure;
160 * Returns the value of field 'value'.
162 * @return the value of field 'Value'.
164 public float getValue(
172 * @return true if at least one Colour has been added
174 public boolean hasColour(
176 return this._has_colour;
180 * Method hasPosition.
182 * @return true if at least one Position has been added
184 public boolean hasPosition(
186 return this._has_position;
192 * @return true if at least one Value has been added
194 public boolean hasValue(
196 return this._has_value;
202 * @return true if this object is valid according to the schema
204 public boolean isValid(
208 } catch (org.exolab.castor.xml.ValidationException vex) {
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
224 final java.io.Writer out)
225 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
226 Marshaller.marshal(this, out);
233 * @throws java.io.IOException if an IOException occurs during
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
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);
247 * Sets the value of field 'colour'.
249 * @param colour the value of field 'colour'.
251 public void setColour(
253 this._colour = colour;
254 this._has_colour = true;
258 * Sets the value of field 'description'.
260 * @param description the value of field 'description'.
262 public void setDescription(
263 final java.lang.String description) {
264 this._description = description;
268 * Sets the value of field 'displayCharacter'.
270 * @param displayCharacter the value of field 'displayCharacter'
272 public void setDisplayCharacter(
273 final java.lang.String displayCharacter) {
274 this._displayCharacter = displayCharacter;
278 * Sets the value of field 'position'.
280 * @param position the value of field 'position'.
282 public void setPosition(
283 final int position) {
284 this._position = position;
285 this._has_position = true;
289 * Sets the value of field 'secondaryStructure'.
291 * @param secondaryStructure the value of field
292 * 'secondaryStructure'.
294 public void setSecondaryStructure(
295 final java.lang.String secondaryStructure) {
296 this._secondaryStructure = secondaryStructure;
300 * Sets the value of field 'value'.
302 * @param value the value of field 'value'.
304 public void setValue(
307 this._has_value = true;
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
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);
330 * @throws org.exolab.castor.xml.ValidationException if this
331 * object is an invalid instance according to the schema
333 public void validate(
335 throws org.exolab.castor.xml.ValidationException {
336 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
337 validator.validate(this);