2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML
\r
9 * Jalview - A Sequence Alignment Editor and Viewer
\r
10 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
12 * This program is free software; you can redistribute it and/or
\r
13 * modify it under the terms of the GNU General Public License
\r
14 * as published by the Free Software Foundation; either version 2
\r
15 * of the License, or (at your option) any later version.
\r
17 * This program is distributed in the hope that it will be useful,
\r
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
20 * GNU General Public License for more details.
\r
22 * You should have received a copy of the GNU General Public License
\r
23 * along with this program; if not, write to the Free Software
\r
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
27 package jalview.binding;
\r
29 //---------------------------------/
\r
30 //- Imported classes and packages -/
\r
31 //---------------------------------/
\r
33 import java.io.IOException;
\r
34 import java.io.Reader;
\r
35 import java.io.Serializable;
\r
36 import java.io.Writer;
\r
37 import org.exolab.castor.xml.MarshalException;
\r
38 import org.exolab.castor.xml.Marshaller;
\r
39 import org.exolab.castor.xml.Unmarshaller;
\r
40 import org.exolab.castor.xml.ValidationException;
\r
41 import org.xml.sax.ContentHandler;
\r
44 * Class AnnotationElement.
\r
46 * @version $Revision$ $Date$
\r
48 public class AnnotationElement implements java.io.Serializable {
\r
51 //--------------------------/
\r
52 //- Class/Member Variables -/
\r
53 //--------------------------/
\r
58 private int _position;
\r
61 * keeps track of state for field: _position
\r
63 private boolean _has_position;
\r
66 * Field _displayCharacter
\r
68 private java.lang.String _displayCharacter;
\r
71 * Field _description
\r
73 private java.lang.String _description;
\r
76 * Field _secondaryStructure
\r
78 private java.lang.String _secondaryStructure;
\r
83 private float _value;
\r
86 * keeps track of state for field: _value
\r
88 private boolean _has_value;
\r
95 public AnnotationElement() {
\r
97 } //-- jalview.binding.AnnotationElement()
\r
105 * Method deletePosition
\r
108 public void deletePosition()
\r
110 this._has_position= false;
\r
111 } //-- void deletePosition()
\r
114 * Method deleteValue
\r
117 public void deleteValue()
\r
119 this._has_value= false;
\r
120 } //-- void deleteValue()
\r
123 * Returns the value of field 'description'.
\r
126 * @return the value of field 'description'.
\r
128 public java.lang.String getDescription()
\r
130 return this._description;
\r
131 } //-- java.lang.String getDescription()
\r
134 * Returns the value of field 'displayCharacter'.
\r
137 * @return the value of field 'displayCharacter'.
\r
139 public java.lang.String getDisplayCharacter()
\r
141 return this._displayCharacter;
\r
142 } //-- java.lang.String getDisplayCharacter()
\r
145 * Returns the value of field 'position'.
\r
148 * @return the value of field 'position'.
\r
150 public int getPosition()
\r
152 return this._position;
\r
153 } //-- int getPosition()
\r
156 * Returns the value of field 'secondaryStructure'.
\r
159 * @return the value of field 'secondaryStructure'.
\r
161 public java.lang.String getSecondaryStructure()
\r
163 return this._secondaryStructure;
\r
164 } //-- java.lang.String getSecondaryStructure()
\r
167 * Returns the value of field 'value'.
\r
170 * @return the value of field 'value'.
\r
172 public float getValue()
\r
174 return this._value;
\r
175 } //-- float getValue()
\r
178 * Method hasPosition
\r
184 public boolean hasPosition()
\r
186 return this._has_position;
\r
187 } //-- boolean hasPosition()
\r
196 public boolean hasValue()
\r
198 return this._has_value;
\r
199 } //-- boolean hasValue()
\r
208 public boolean isValid()
\r
213 catch (org.exolab.castor.xml.ValidationException vex) {
\r
217 } //-- boolean isValid()
\r
226 public void marshal(java.io.Writer out)
\r
227 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
230 Marshaller.marshal(this, out);
\r
231 } //-- void marshal(java.io.Writer)
\r
240 public void marshal(org.xml.sax.ContentHandler handler)
\r
241 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
244 Marshaller.marshal(this, handler);
\r
245 } //-- void marshal(org.xml.sax.ContentHandler)
\r
248 * Sets the value of field 'description'.
\r
250 * @param description the value of field 'description'.
\r
252 public void setDescription(java.lang.String description)
\r
254 this._description = description;
\r
255 } //-- void setDescription(java.lang.String)
\r
258 * Sets the value of field 'displayCharacter'.
\r
260 * @param displayCharacter the value of field 'displayCharacter'
\r
262 public void setDisplayCharacter(java.lang.String displayCharacter)
\r
264 this._displayCharacter = displayCharacter;
\r
265 } //-- void setDisplayCharacter(java.lang.String)
\r
268 * Sets the value of field 'position'.
\r
270 * @param position the value of field 'position'.
\r
272 public void setPosition(int position)
\r
274 this._position = position;
\r
275 this._has_position = true;
\r
276 } //-- void setPosition(int)
\r
279 * Sets the value of field 'secondaryStructure'.
\r
281 * @param secondaryStructure the value of field
\r
282 * 'secondaryStructure'.
\r
284 public void setSecondaryStructure(java.lang.String secondaryStructure)
\r
286 this._secondaryStructure = secondaryStructure;
\r
287 } //-- void setSecondaryStructure(java.lang.String)
\r
290 * Sets the value of field 'value'.
\r
292 * @param value the value of field 'value'.
\r
294 public void setValue(float value)
\r
296 this._value = value;
\r
297 this._has_value = true;
\r
298 } //-- void setValue(float)
\r
308 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
309 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
311 return (jalview.binding.AnnotationElement) Unmarshaller.unmarshal(jalview.binding.AnnotationElement.class, reader);
\r
312 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
318 public void validate()
\r
319 throws org.exolab.castor.xml.ValidationException
\r
321 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
322 validator.validate(this);
\r
323 } //-- void validate()
\r