2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.binding;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
18 * Class AnnotationElement.
20 * @version $Revision$ $Date$
22 public class AnnotationElement implements java.io.Serializable {
25 //--------------------------/
26 //- Class/Member Variables -/
27 //--------------------------/
32 private int _position;
35 * keeps track of state for field: _position
37 private boolean _has_position;
40 * Field _displayCharacter.
42 private java.lang.String _displayCharacter;
47 private java.lang.String _description;
50 * Field _secondaryStructure.
52 private java.lang.String _secondaryStructure;
60 * keeps track of state for field: _value
62 private boolean _has_value;
69 public AnnotationElement() {
80 public void deletePosition(
82 this._has_position= false;
87 public void deleteValue(
89 this._has_value= false;
93 * Returns the value of field 'description'.
95 * @return the value of field 'Description'.
97 public java.lang.String getDescription(
99 return this._description;
103 * Returns the value of field 'displayCharacter'.
105 * @return the value of field 'DisplayCharacter'.
107 public java.lang.String getDisplayCharacter(
109 return this._displayCharacter;
113 * Returns the value of field 'position'.
115 * @return the value of field 'Position'.
117 public int getPosition(
119 return this._position;
123 * Returns the value of field 'secondaryStructure'.
125 * @return the value of field 'SecondaryStructure'.
127 public java.lang.String getSecondaryStructure(
129 return this._secondaryStructure;
133 * Returns the value of field 'value'.
135 * @return the value of field 'Value'.
137 public float getValue(
143 * Method hasPosition.
145 * @return true if at least one Position has been added
147 public boolean hasPosition(
149 return this._has_position;
155 * @return true if at least one Value has been added
157 public boolean hasValue(
159 return this._has_value;
165 * @return true if this object is valid according to the schema
167 public boolean isValid(
171 } catch (org.exolab.castor.xml.ValidationException vex) {
181 * @throws org.exolab.castor.xml.MarshalException if object is
182 * null or if any SAXException is thrown during marshaling
183 * @throws org.exolab.castor.xml.ValidationException if this
184 * object is an invalid instance according to the schema
187 final java.io.Writer out)
188 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
189 Marshaller.marshal(this, out);
196 * @throws java.io.IOException if an IOException occurs during
198 * @throws org.exolab.castor.xml.ValidationException if this
199 * object is an invalid instance according to the schema
200 * @throws org.exolab.castor.xml.MarshalException if object is
201 * null or if any SAXException is thrown during marshaling
204 final org.xml.sax.ContentHandler handler)
205 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
206 Marshaller.marshal(this, handler);
210 * Sets the value of field 'description'.
212 * @param description the value of field 'description'.
214 public void setDescription(
215 final java.lang.String description) {
216 this._description = description;
220 * Sets the value of field 'displayCharacter'.
222 * @param displayCharacter the value of field 'displayCharacter'
224 public void setDisplayCharacter(
225 final java.lang.String displayCharacter) {
226 this._displayCharacter = displayCharacter;
230 * Sets the value of field 'position'.
232 * @param position the value of field 'position'.
234 public void setPosition(
235 final int position) {
236 this._position = position;
237 this._has_position = true;
241 * Sets the value of field 'secondaryStructure'.
243 * @param secondaryStructure the value of field
244 * 'secondaryStructure'.
246 public void setSecondaryStructure(
247 final java.lang.String secondaryStructure) {
248 this._secondaryStructure = secondaryStructure;
252 * Sets the value of field 'value'.
254 * @param value the value of field 'value'.
256 public void setValue(
259 this._has_value = true;
266 * @throws org.exolab.castor.xml.MarshalException if object is
267 * null or if any SAXException is thrown during marshaling
268 * @throws org.exolab.castor.xml.ValidationException if this
269 * object is an invalid instance according to the schema
270 * @return the unmarshaled jalview.binding.AnnotationElement
272 public static jalview.binding.AnnotationElement unmarshal(
273 final java.io.Reader reader)
274 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
275 return (jalview.binding.AnnotationElement) Unmarshaller.unmarshal(jalview.binding.AnnotationElement.class, reader);
281 * @throws org.exolab.castor.xml.ValidationException if this
282 * object is an invalid instance according to the schema
284 public void validate(
286 throws org.exolab.castor.xml.ValidationException {
287 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
288 validator.validate(this);