1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.schemabinding.version2;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
35 * Class AnnotationElement.
37 * @version $Revision$ $Date$
39 public class AnnotationElement implements java.io.Serializable {
42 //--------------------------/
43 //- Class/Member Variables -/
44 //--------------------------/
49 private int _position;
52 * keeps track of state for field: _position
54 private boolean _has_position;
62 * keeps track of state for field: _colour
64 private boolean _has_colour;
67 * Field _displayCharacter.
69 private java.lang.String _displayCharacter;
74 private java.lang.String _description;
77 * Field _secondaryStructure.
79 private java.lang.String _secondaryStructure;
87 * keeps track of state for field: _value
89 private boolean _has_value;
96 public AnnotationElement() {
107 public void deleteColour(
109 this._has_colour= false;
114 public void deletePosition(
116 this._has_position= false;
121 public void deleteValue(
123 this._has_value= false;
127 * Returns the value of field 'colour'.
129 * @return the value of field 'Colour'.
131 public int getColour(
137 * Returns the value of field 'description'.
139 * @return the value of field 'Description'.
141 public java.lang.String getDescription(
143 return this._description;
147 * Returns the value of field 'displayCharacter'.
149 * @return the value of field 'DisplayCharacter'.
151 public java.lang.String getDisplayCharacter(
153 return this._displayCharacter;
157 * Returns the value of field 'position'.
159 * @return the value of field 'Position'.
161 public int getPosition(
163 return this._position;
167 * Returns the value of field 'secondaryStructure'.
169 * @return the value of field 'SecondaryStructure'.
171 public java.lang.String getSecondaryStructure(
173 return this._secondaryStructure;
177 * Returns the value of field 'value'.
179 * @return the value of field 'Value'.
181 public float getValue(
189 * @return true if at least one Colour has been added
191 public boolean hasColour(
193 return this._has_colour;
197 * Method hasPosition.
199 * @return true if at least one Position has been added
201 public boolean hasPosition(
203 return this._has_position;
209 * @return true if at least one Value has been added
211 public boolean hasValue(
213 return this._has_value;
219 * @return true if this object is valid according to the schema
221 public boolean isValid(
225 } catch (org.exolab.castor.xml.ValidationException vex) {
235 * @throws org.exolab.castor.xml.MarshalException if object is
236 * null or if any SAXException is thrown during marshaling
237 * @throws org.exolab.castor.xml.ValidationException if this
238 * object is an invalid instance according to the schema
241 final java.io.Writer out)
242 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
243 Marshaller.marshal(this, out);
250 * @throws java.io.IOException if an IOException occurs during
252 * @throws org.exolab.castor.xml.ValidationException if this
253 * object is an invalid instance according to the schema
254 * @throws org.exolab.castor.xml.MarshalException if object is
255 * null or if any SAXException is thrown during marshaling
258 final org.xml.sax.ContentHandler handler)
259 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
260 Marshaller.marshal(this, handler);
264 * Sets the value of field 'colour'.
266 * @param colour the value of field 'colour'.
268 public void setColour(
270 this._colour = colour;
271 this._has_colour = true;
275 * Sets the value of field 'description'.
277 * @param description the value of field 'description'.
279 public void setDescription(
280 final java.lang.String description) {
281 this._description = description;
285 * Sets the value of field 'displayCharacter'.
287 * @param displayCharacter the value of field 'displayCharacter'
289 public void setDisplayCharacter(
290 final java.lang.String displayCharacter) {
291 this._displayCharacter = displayCharacter;
295 * Sets the value of field 'position'.
297 * @param position the value of field 'position'.
299 public void setPosition(
300 final int position) {
301 this._position = position;
302 this._has_position = true;
306 * Sets the value of field 'secondaryStructure'.
308 * @param secondaryStructure the value of field
309 * 'secondaryStructure'.
311 public void setSecondaryStructure(
312 final java.lang.String secondaryStructure) {
313 this._secondaryStructure = secondaryStructure;
317 * Sets the value of field 'value'.
319 * @param value the value of field 'value'.
321 public void setValue(
324 this._has_value = true;
331 * @throws org.exolab.castor.xml.MarshalException if object is
332 * null or if any SAXException is thrown during marshaling
333 * @throws org.exolab.castor.xml.ValidationException if this
334 * object is an invalid instance according to the schema
335 * @return the unmarshaled
336 * jalview.schemabinding.version2.AnnotationElement
338 public static jalview.schemabinding.version2.AnnotationElement unmarshal(
339 final java.io.Reader reader)
340 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
341 return (jalview.schemabinding.version2.AnnotationElement) Unmarshaller.unmarshal(jalview.schemabinding.version2.AnnotationElement.class, reader);
347 * @throws org.exolab.castor.xml.ValidationException if this
348 * object is an invalid instance according to the schema
350 public void validate(
352 throws org.exolab.castor.xml.ValidationException {
353 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
354 validator.validate(this);