2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
\r
8 package jalview.schemabinding.version2;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import org.exolab.castor.xml.Marshaller;
\r
15 import org.exolab.castor.xml.Unmarshaller;
\r
18 * Class AnnotationElement.
\r
20 * @version $Revision$ $Date$
\r
22 public class AnnotationElement implements java.io.Serializable {
\r
25 //--------------------------/
\r
26 //- Class/Member Variables -/
\r
27 //--------------------------/
\r
32 private int _position;
\r
35 * keeps track of state for field: _position
\r
37 private boolean _has_position;
\r
42 private int _colour;
\r
45 * keeps track of state for field: _colour
\r
47 private boolean _has_colour;
\r
50 * Field _displayCharacter.
\r
52 private java.lang.String _displayCharacter;
\r
55 * Field _description.
\r
57 private java.lang.String _description;
\r
60 * Field _secondaryStructure.
\r
62 private java.lang.String _secondaryStructure;
\r
67 private float _value;
\r
70 * keeps track of state for field: _value
\r
72 private boolean _has_value;
\r
79 public AnnotationElement() {
\r
90 public void deleteColour(
\r
92 this._has_colour= false;
\r
97 public void deletePosition(
\r
99 this._has_position= false;
\r
104 public void deleteValue(
\r
106 this._has_value= false;
\r
110 * Returns the value of field 'colour'.
\r
112 * @return the value of field 'Colour'.
\r
114 public int getColour(
\r
116 return this._colour;
\r
120 * Returns the value of field 'description'.
\r
122 * @return the value of field 'Description'.
\r
124 public java.lang.String getDescription(
\r
126 return this._description;
\r
130 * Returns the value of field 'displayCharacter'.
\r
132 * @return the value of field 'DisplayCharacter'.
\r
134 public java.lang.String getDisplayCharacter(
\r
136 return this._displayCharacter;
\r
140 * Returns the value of field 'position'.
\r
142 * @return the value of field 'Position'.
\r
144 public int getPosition(
\r
146 return this._position;
\r
150 * Returns the value of field 'secondaryStructure'.
\r
152 * @return the value of field 'SecondaryStructure'.
\r
154 public java.lang.String getSecondaryStructure(
\r
156 return this._secondaryStructure;
\r
160 * Returns the value of field 'value'.
\r
162 * @return the value of field 'Value'.
\r
164 public float getValue(
\r
166 return this._value;
\r
170 * Method hasColour.
\r
172 * @return true if at least one Colour has been added
\r
174 public boolean hasColour(
\r
176 return this._has_colour;
\r
180 * Method hasPosition.
\r
182 * @return true if at least one Position has been added
\r
184 public boolean hasPosition(
\r
186 return this._has_position;
\r
192 * @return true if at least one Value has been added
\r
194 public boolean hasValue(
\r
196 return this._has_value;
\r
202 * @return true if this object is valid according to the schema
\r
204 public boolean isValid(
\r
208 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
218 * @throws org.exolab.castor.xml.MarshalException if object is
\r
219 * null or if any SAXException is thrown during marshaling
\r
220 * @throws org.exolab.castor.xml.ValidationException if this
\r
221 * object is an invalid instance according to the schema
\r
223 public void marshal(
\r
224 final java.io.Writer out)
\r
225 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
226 Marshaller.marshal(this, out);
\r
233 * @throws java.io.IOException if an IOException occurs during
\r
235 * @throws org.exolab.castor.xml.ValidationException if this
\r
236 * object is an invalid instance according to the schema
\r
237 * @throws org.exolab.castor.xml.MarshalException if object is
\r
238 * null or if any SAXException is thrown during marshaling
\r
240 public void marshal(
\r
241 final org.xml.sax.ContentHandler handler)
\r
242 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
243 Marshaller.marshal(this, handler);
\r
247 * Sets the value of field 'colour'.
\r
249 * @param colour the value of field 'colour'.
\r
251 public void setColour(
\r
252 final int colour) {
\r
253 this._colour = colour;
\r
254 this._has_colour = true;
\r
258 * Sets the value of field 'description'.
\r
260 * @param description the value of field 'description'.
\r
262 public void setDescription(
\r
263 final java.lang.String description) {
\r
264 this._description = description;
\r
268 * Sets the value of field 'displayCharacter'.
\r
270 * @param displayCharacter the value of field 'displayCharacter'
\r
272 public void setDisplayCharacter(
\r
273 final java.lang.String displayCharacter) {
\r
274 this._displayCharacter = displayCharacter;
\r
278 * Sets the value of field 'position'.
\r
280 * @param position the value of field 'position'.
\r
282 public void setPosition(
\r
283 final int position) {
\r
284 this._position = position;
\r
285 this._has_position = true;
\r
289 * Sets the value of field 'secondaryStructure'.
\r
291 * @param secondaryStructure the value of field
\r
292 * 'secondaryStructure'.
\r
294 public void setSecondaryStructure(
\r
295 final java.lang.String secondaryStructure) {
\r
296 this._secondaryStructure = secondaryStructure;
\r
300 * Sets the value of field 'value'.
\r
302 * @param value the value of field 'value'.
\r
304 public void setValue(
\r
305 final float value) {
\r
306 this._value = value;
\r
307 this._has_value = true;
\r
311 * Method unmarshal.
\r
314 * @throws org.exolab.castor.xml.MarshalException if object is
\r
315 * null or if any SAXException is thrown during marshaling
\r
316 * @throws org.exolab.castor.xml.ValidationException if this
\r
317 * object is an invalid instance according to the schema
\r
318 * @return the unmarshaled
\r
319 * jalview.schemabinding.version2.AnnotationElement
\r
321 public static jalview.schemabinding.version2.AnnotationElement unmarshal(
\r
322 final java.io.Reader reader)
\r
323 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
324 return (jalview.schemabinding.version2.AnnotationElement) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationElement.class, reader);
\r
330 * @throws org.exolab.castor.xml.ValidationException if this
\r
331 * object is an invalid instance according to the schema
\r
333 public void validate(
\r
335 throws org.exolab.castor.xml.ValidationException {
\r
336 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
337 validator.validate(this);
\r