2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML
\r
8 * Jalview - A Sequence Alignment Editor and Viewer
\r
9 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
11 * This program is free software; you can redistribute it and/or
\r
12 * modify it under the terms of the GNU General Public License
\r
13 * as published by the Free Software Foundation; either version 2
\r
14 * of the License, or (at your option) any later version.
\r
16 * This program is distributed in the hope that it will be useful,
\r
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
19 * GNU General Public License for more details.
\r
21 * You should have received a copy of the GNU General Public License
\r
22 * along with this program; if not, write to the Free Software
\r
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
25 package jalview.binding;
\r
27 import org.exolab.castor.xml.MarshalException;
\r
28 import org.exolab.castor.xml.Marshaller;
\r
29 import org.exolab.castor.xml.Unmarshaller;
\r
30 import org.exolab.castor.xml.ValidationException;
\r
32 import org.xml.sax.ContentHandler;
\r
34 //---------------------------------/
\r
35 //- Imported classes and packages -/
\r
36 //---------------------------------/
\r
37 import java.io.IOException;
\r
38 import java.io.Reader;
\r
39 import java.io.Serializable;
\r
40 import java.io.Writer;
\r
44 * Class AnnotationElement.
\r
46 * @version $Revision$ $Date$
\r
48 public class AnnotationElement implements java.io.Serializable {
\r
49 //--------------------------/
\r
50 //- Class/Member Variables -/
\r
51 //--------------------------/
\r
56 private int _position;
\r
59 * keeps track of state for field: _position
\r
61 private boolean _has_position;
\r
64 * Field _displayCharacter
\r
66 private java.lang.String _displayCharacter;
\r
69 * Field _description
\r
71 private java.lang.String _description;
\r
74 * Field _secondaryStructure
\r
76 private java.lang.String _secondaryStructure;
\r
81 private float _value;
\r
84 * keeps track of state for field: _value
\r
86 private boolean _has_value;
\r
91 public AnnotationElement() {
\r
94 //-- jalview.binding.AnnotationElement()
\r
97 public void deletePosition() {
\r
98 this._has_position = false;
\r
100 //-- void deletePosition()
\r
103 * Method deleteValue
\r
106 public void deleteValue() {
\r
107 this._has_value = false;
\r
109 //-- void deleteValue()
\r
112 * Returns the value of field 'description'.
\r
115 * @return the value of field 'description'.
\r
117 public java.lang.String getDescription() {
\r
118 return this._description;
\r
120 //-- java.lang.String getDescription()
\r
123 * Returns the value of field 'displayCharacter'.
\r
126 * @return the value of field 'displayCharacter'.
\r
128 public java.lang.String getDisplayCharacter() {
\r
129 return this._displayCharacter;
\r
131 //-- java.lang.String getDisplayCharacter()
\r
134 * Returns the value of field 'position'.
\r
137 * @return the value of field 'position'.
\r
139 public int getPosition() {
\r
140 return this._position;
\r
142 //-- int getPosition()
\r
145 * Returns the value of field 'secondaryStructure'.
\r
148 * @return the value of field 'secondaryStructure'.
\r
150 public java.lang.String getSecondaryStructure() {
\r
151 return this._secondaryStructure;
\r
153 //-- java.lang.String getSecondaryStructure()
\r
156 * Returns the value of field 'value'.
\r
159 * @return the value of field 'value'.
\r
161 public float getValue() {
\r
162 return this._value;
\r
164 //-- float getValue()
\r
167 * Method hasPosition
\r
173 public boolean hasPosition() {
\r
174 return this._has_position;
\r
176 //-- boolean hasPosition()
\r
185 public boolean hasValue() {
\r
186 return this._has_value;
\r
188 //-- boolean hasValue()
\r
197 public boolean isValid() {
\r
200 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
206 //-- boolean isValid()
\r
215 public void marshal(java.io.Writer out)
\r
216 throws org.exolab.castor.xml.MarshalException,
\r
217 org.exolab.castor.xml.ValidationException {
\r
218 Marshaller.marshal(this, out);
\r
220 //-- void marshal(java.io.Writer)
\r
229 public void marshal(org.xml.sax.ContentHandler handler)
\r
230 throws java.io.IOException, org.exolab.castor.xml.MarshalException,
\r
231 org.exolab.castor.xml.ValidationException {
\r
232 Marshaller.marshal(this, handler);
\r
234 //-- void marshal(org.xml.sax.ContentHandler)
\r
237 * Sets the value of field 'description'.
\r
239 * @param description the value of field 'description'.
\r
241 public void setDescription(java.lang.String description) {
\r
242 this._description = description;
\r
244 //-- void setDescription(java.lang.String)
\r
247 * Sets the value of field 'displayCharacter'.
\r
249 * @param displayCharacter the value of field 'displayCharacter'
\r
251 public void setDisplayCharacter(java.lang.String displayCharacter) {
\r
252 this._displayCharacter = displayCharacter;
\r
254 //-- void setDisplayCharacter(java.lang.String)
\r
257 * Sets the value of field 'position'.
\r
259 * @param position the value of field 'position'.
\r
261 public void setPosition(int position) {
\r
262 this._position = position;
\r
263 this._has_position = true;
\r
265 //-- void setPosition(int)
\r
268 * Sets the value of field 'secondaryStructure'.
\r
270 * @param secondaryStructure the value of field
\r
271 * 'secondaryStructure'.
\r
273 public void setSecondaryStructure(java.lang.String secondaryStructure) {
\r
274 this._secondaryStructure = secondaryStructure;
\r
276 //-- void setSecondaryStructure(java.lang.String)
\r
279 * Sets the value of field 'value'.
\r
281 * @param value the value of field 'value'.
\r
283 public void setValue(float value) {
\r
284 this._value = value;
\r
285 this._has_value = true;
\r
287 //-- void setValue(float)
\r
297 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
298 throws org.exolab.castor.xml.MarshalException,
\r
299 org.exolab.castor.xml.ValidationException {
\r
300 return (jalview.binding.AnnotationElement) Unmarshaller.unmarshal(jalview.binding.AnnotationElement.class,
\r
303 //-- java.lang.Object unmarshal(java.io.Reader)
\r
309 public void validate() throws org.exolab.castor.xml.ValidationException {
\r
310 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
311 validator.validate(this);
\r
313 //-- void validate()
\r