1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $(date) The Jalview Authors
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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
20 *******************************************************************************/
22 * This class was automatically generated with
23 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
28 package jalview.binding;
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
38 * Class AnnotationElement.
40 * @version $Revision$ $Date$
42 public class AnnotationElement implements java.io.Serializable
45 // --------------------------/
46 // - Class/Member Variables -/
47 // --------------------------/
52 private int _position;
55 * keeps track of state for field: _position
57 private boolean _has_position;
60 * Field _displayCharacter.
62 private java.lang.String _displayCharacter;
67 private java.lang.String _description;
70 * Field _secondaryStructure.
72 private java.lang.String _secondaryStructure;
80 * keeps track of state for field: _value
82 private boolean _has_value;
88 public AnnotationElement()
99 public void deletePosition()
101 this._has_position = false;
106 public void deleteValue()
108 this._has_value = false;
112 * Returns the value of field 'description'.
114 * @return the value of field 'Description'.
116 public java.lang.String getDescription()
118 return this._description;
122 * Returns the value of field 'displayCharacter'.
124 * @return the value of field 'DisplayCharacter'.
126 public java.lang.String getDisplayCharacter()
128 return this._displayCharacter;
132 * Returns the value of field 'position'.
134 * @return the value of field 'Position'.
136 public int getPosition()
138 return this._position;
142 * Returns the value of field 'secondaryStructure'.
144 * @return the value of field 'SecondaryStructure'.
146 public java.lang.String getSecondaryStructure()
148 return this._secondaryStructure;
152 * Returns the value of field 'value'.
154 * @return the value of field 'Value'.
156 public float getValue()
162 * Method hasPosition.
164 * @return true if at least one Position has been added
166 public boolean hasPosition()
168 return this._has_position;
174 * @return true if at least one Value has been added
176 public boolean hasValue()
178 return this._has_value;
184 * @return true if this object is valid according to the schema
186 public boolean isValid()
191 } catch (org.exolab.castor.xml.ValidationException vex)
202 * @throws org.exolab.castor.xml.MarshalException
203 * if object is null or if any SAXException is thrown during
205 * @throws org.exolab.castor.xml.ValidationException
206 * if this object is an invalid instance according to the schema
208 public void marshal(final java.io.Writer out)
209 throws org.exolab.castor.xml.MarshalException,
210 org.exolab.castor.xml.ValidationException
212 Marshaller.marshal(this, out);
219 * @throws java.io.IOException
220 * if an IOException occurs during marshaling
221 * @throws org.exolab.castor.xml.ValidationException
222 * if this object is an invalid instance according to the schema
223 * @throws org.exolab.castor.xml.MarshalException
224 * if object is null or if any SAXException is thrown during
227 public void marshal(final org.xml.sax.ContentHandler handler)
228 throws java.io.IOException,
229 org.exolab.castor.xml.MarshalException,
230 org.exolab.castor.xml.ValidationException
232 Marshaller.marshal(this, handler);
236 * Sets the value of field 'description'.
239 * the value of field 'description'.
241 public void setDescription(final java.lang.String description)
243 this._description = description;
247 * Sets the value of field 'displayCharacter'.
249 * @param displayCharacter
250 * the value of field 'displayCharacter'
252 public void setDisplayCharacter(final java.lang.String displayCharacter)
254 this._displayCharacter = displayCharacter;
258 * Sets the value of field 'position'.
261 * the value of field 'position'.
263 public void setPosition(final int position)
265 this._position = position;
266 this._has_position = true;
270 * Sets the value of field 'secondaryStructure'.
272 * @param secondaryStructure
273 * the value of field 'secondaryStructure'.
275 public void setSecondaryStructure(
276 final java.lang.String secondaryStructure)
278 this._secondaryStructure = secondaryStructure;
282 * Sets the value of field 'value'.
285 * the value of field 'value'.
287 public void setValue(final float value)
290 this._has_value = true;
297 * @throws org.exolab.castor.xml.MarshalException
298 * if object is null or if any SAXException is thrown during
300 * @throws org.exolab.castor.xml.ValidationException
301 * if this object is an invalid instance according to the schema
302 * @return the unmarshaled jalview.binding.AnnotationElement
304 public static jalview.binding.AnnotationElement unmarshal(
305 final java.io.Reader reader)
306 throws org.exolab.castor.xml.MarshalException,
307 org.exolab.castor.xml.ValidationException
309 return (jalview.binding.AnnotationElement) Unmarshaller
310 .unmarshal(jalview.binding.AnnotationElement.class, reader);
316 * @throws org.exolab.castor.xml.ValidationException
317 * if this object is an invalid instance according to the schema
319 public void validate() throws org.exolab.castor.xml.ValidationException
321 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
322 validator.validate(this);