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.binding;
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;
57 * Field _displayCharacter.
59 private java.lang.String _displayCharacter;
64 private java.lang.String _description;
67 * Field _secondaryStructure.
69 private java.lang.String _secondaryStructure;
77 * keeps track of state for field: _value
79 private boolean _has_value;
86 public AnnotationElement() {
97 public void deletePosition(
99 this._has_position= false;
104 public void deleteValue(
106 this._has_value= false;
110 * Returns the value of field 'description'.
112 * @return the value of field 'Description'.
114 public java.lang.String getDescription(
116 return this._description;
120 * Returns the value of field 'displayCharacter'.
122 * @return the value of field 'DisplayCharacter'.
124 public java.lang.String getDisplayCharacter(
126 return this._displayCharacter;
130 * Returns the value of field 'position'.
132 * @return the value of field 'Position'.
134 public int getPosition(
136 return this._position;
140 * Returns the value of field 'secondaryStructure'.
142 * @return the value of field 'SecondaryStructure'.
144 public java.lang.String getSecondaryStructure(
146 return this._secondaryStructure;
150 * Returns the value of field 'value'.
152 * @return the value of field 'Value'.
154 public float getValue(
160 * Method hasPosition.
162 * @return true if at least one Position has been added
164 public boolean hasPosition(
166 return this._has_position;
172 * @return true if at least one Value has been added
174 public boolean hasValue(
176 return this._has_value;
182 * @return true if this object is valid according to the schema
184 public boolean isValid(
188 } catch (org.exolab.castor.xml.ValidationException vex) {
198 * @throws org.exolab.castor.xml.MarshalException if object is
199 * null or if any SAXException is thrown during marshaling
200 * @throws org.exolab.castor.xml.ValidationException if this
201 * object is an invalid instance according to the schema
204 final java.io.Writer out)
205 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
206 Marshaller.marshal(this, out);
213 * @throws java.io.IOException if an IOException occurs during
215 * @throws org.exolab.castor.xml.ValidationException if this
216 * object is an invalid instance according to the schema
217 * @throws org.exolab.castor.xml.MarshalException if object is
218 * null or if any SAXException is thrown during marshaling
221 final org.xml.sax.ContentHandler handler)
222 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
223 Marshaller.marshal(this, handler);
227 * Sets the value of field 'description'.
229 * @param description the value of field 'description'.
231 public void setDescription(
232 final java.lang.String description) {
233 this._description = description;
237 * Sets the value of field 'displayCharacter'.
239 * @param displayCharacter the value of field 'displayCharacter'
241 public void setDisplayCharacter(
242 final java.lang.String displayCharacter) {
243 this._displayCharacter = displayCharacter;
247 * Sets the value of field 'position'.
249 * @param position the value of field 'position'.
251 public void setPosition(
252 final int position) {
253 this._position = position;
254 this._has_position = true;
258 * Sets the value of field 'secondaryStructure'.
260 * @param secondaryStructure the value of field
261 * 'secondaryStructure'.
263 public void setSecondaryStructure(
264 final java.lang.String secondaryStructure) {
265 this._secondaryStructure = secondaryStructure;
269 * Sets the value of field 'value'.
271 * @param value the value of field 'value'.
273 public void setValue(
276 this._has_value = true;
283 * @throws org.exolab.castor.xml.MarshalException if object is
284 * null or if any SAXException is thrown during marshaling
285 * @throws org.exolab.castor.xml.ValidationException if this
286 * object is an invalid instance according to the schema
287 * @return the unmarshaled jalview.binding.AnnotationElement
289 public static jalview.binding.AnnotationElement unmarshal(
290 final java.io.Reader reader)
291 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
292 return (jalview.binding.AnnotationElement) Unmarshaller.unmarshal(jalview.binding.AnnotationElement.class, reader);
298 * @throws org.exolab.castor.xml.ValidationException if this
299 * object is an invalid instance according to the schema
301 public void validate(
303 throws org.exolab.castor.xml.ValidationException {
304 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
305 validator.validate(this);