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;
68 public AnnotationElement()
79 public void deletePosition()
81 this._has_position = false;
86 public void deleteValue()
88 this._has_value = false;
92 * Returns the value of field 'description'.
94 * @return the value of field 'Description'.
96 public java.lang.String getDescription()
98 return this._description;
102 * Returns the value of field 'displayCharacter'.
104 * @return the value of field 'DisplayCharacter'.
106 public java.lang.String getDisplayCharacter()
108 return this._displayCharacter;
112 * Returns the value of field 'position'.
114 * @return the value of field 'Position'.
116 public int getPosition()
118 return this._position;
122 * Returns the value of field 'secondaryStructure'.
124 * @return the value of field 'SecondaryStructure'.
126 public java.lang.String getSecondaryStructure()
128 return this._secondaryStructure;
132 * Returns the value of field 'value'.
134 * @return the value of field 'Value'.
136 public float getValue()
142 * Method hasPosition.
144 * @return true if at least one Position has been added
146 public boolean hasPosition()
148 return this._has_position;
154 * @return true if at least one Value has been added
156 public boolean hasValue()
158 return this._has_value;
164 * @return true if this object is valid according to the schema
166 public boolean isValid()
171 } catch (org.exolab.castor.xml.ValidationException vex)
182 * @throws org.exolab.castor.xml.MarshalException
183 * if object is null or if any SAXException is thrown during
185 * @throws org.exolab.castor.xml.ValidationException
186 * if this object is an invalid instance according to the schema
188 public void marshal(final java.io.Writer out)
189 throws org.exolab.castor.xml.MarshalException,
190 org.exolab.castor.xml.ValidationException
192 Marshaller.marshal(this, out);
199 * @throws java.io.IOException
200 * if an IOException occurs during marshaling
201 * @throws org.exolab.castor.xml.ValidationException
202 * if this object is an invalid instance according to the schema
203 * @throws org.exolab.castor.xml.MarshalException
204 * if object is null or if any SAXException is thrown during
207 public void marshal(final org.xml.sax.ContentHandler handler)
208 throws java.io.IOException,
209 org.exolab.castor.xml.MarshalException,
210 org.exolab.castor.xml.ValidationException
212 Marshaller.marshal(this, handler);
216 * Sets the value of field 'description'.
219 * the value of field 'description'.
221 public void setDescription(final java.lang.String description)
223 this._description = description;
227 * Sets the value of field 'displayCharacter'.
229 * @param displayCharacter
230 * the value of field 'displayCharacter'
232 public void setDisplayCharacter(final java.lang.String displayCharacter)
234 this._displayCharacter = displayCharacter;
238 * Sets the value of field 'position'.
241 * the value of field 'position'.
243 public void setPosition(final int position)
245 this._position = position;
246 this._has_position = true;
250 * Sets the value of field 'secondaryStructure'.
252 * @param secondaryStructure
253 * the value of field 'secondaryStructure'.
255 public void setSecondaryStructure(
256 final java.lang.String secondaryStructure)
258 this._secondaryStructure = secondaryStructure;
262 * Sets the value of field 'value'.
265 * the value of field 'value'.
267 public void setValue(final float value)
270 this._has_value = true;
277 * @throws org.exolab.castor.xml.MarshalException
278 * if object is null or if any SAXException is thrown during
280 * @throws org.exolab.castor.xml.ValidationException
281 * if this object is an invalid instance according to the schema
282 * @return the unmarshaled jalview.binding.AnnotationElement
284 public static jalview.binding.AnnotationElement unmarshal(
285 final java.io.Reader reader)
286 throws org.exolab.castor.xml.MarshalException,
287 org.exolab.castor.xml.ValidationException
289 return (jalview.binding.AnnotationElement) Unmarshaller.unmarshal(
290 jalview.binding.AnnotationElement.class, reader);
296 * @throws org.exolab.castor.xml.ValidationException
297 * if this object is an invalid instance according to the schema
299 public void validate() throws org.exolab.castor.xml.ValidationException
301 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
302 validator.validate(this);