2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
8 package org.vamsas.objects.core;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import java.io.IOException;
15 import java.io.Reader;
16 import java.io.Serializable;
17 import java.io.Writer;
18 import org.exolab.castor.xml.MarshalException;
19 import org.exolab.castor.xml.Marshaller;
20 import org.exolab.castor.xml.Unmarshaller;
21 import org.exolab.castor.xml.ValidationException;
22 import org.xml.sax.ContentHandler;
25 * Class AnnotationElement.
27 * @version $Revision$ $Date$
29 public class AnnotationElement extends org.vamsas.client.object
30 implements java.io.Serializable
34 //--------------------------/
35 //- Class/Member Variables -/
36 //--------------------------/
41 private int _position;
44 * keeps track of state for field: _position
46 private boolean _has_position;
51 private java.lang.String _id;
54 * Field _displayCharacter
56 private java.lang.String _displayCharacter;
61 private java.lang.String _description;
64 * Field _secondaryStructure
66 private java.lang.String _secondaryStructure;
74 * keeps track of state for field: _value
76 private boolean _has_value;
83 public AnnotationElement()
86 } //-- org.vamsas.objects.core.AnnotationElement()
94 * Method deletePosition
97 public void deletePosition()
99 this._has_position= false;
100 } //-- void deletePosition()
106 public void deleteValue()
108 this._has_value= false;
109 } //-- void deleteValue()
112 * Note: hashCode() has not been overriden
117 public boolean equals(java.lang.Object obj)
122 if (super.equals(obj)==false)
125 if (obj instanceof AnnotationElement) {
127 AnnotationElement temp = (AnnotationElement)obj;
128 if (this._position != temp._position)
130 if (this._has_position != temp._has_position)
132 if (this._id != null) {
133 if (temp._id == null) return false;
134 else if (!(this._id.equals(temp._id)))
137 else if (temp._id != null)
139 if (this._displayCharacter != null) {
140 if (temp._displayCharacter == null) return false;
141 else if (!(this._displayCharacter.equals(temp._displayCharacter)))
144 else if (temp._displayCharacter != null)
146 if (this._description != null) {
147 if (temp._description == null) return false;
148 else if (!(this._description.equals(temp._description)))
151 else if (temp._description != null)
153 if (this._secondaryStructure != null) {
154 if (temp._secondaryStructure == null) return false;
155 else if (!(this._secondaryStructure.equals(temp._secondaryStructure)))
158 else if (temp._secondaryStructure != null)
160 if (this._value != temp._value)
162 if (this._has_value != temp._has_value)
167 } //-- boolean equals(java.lang.Object)
170 * Returns the value of field 'description'.
173 * @return the value of field 'description'.
175 public java.lang.String getDescription()
177 return this._description;
178 } //-- java.lang.String getDescription()
181 * Returns the value of field 'displayCharacter'.
184 * @return the value of field 'displayCharacter'.
186 public java.lang.String getDisplayCharacter()
188 return this._displayCharacter;
189 } //-- java.lang.String getDisplayCharacter()
192 * Returns the value of field 'id'.
195 * @return the value of field 'id'.
197 public java.lang.String getId()
200 } //-- java.lang.String getId()
203 * Returns the value of field 'position'.
206 * @return the value of field 'position'.
208 public int getPosition()
210 return this._position;
211 } //-- int getPosition()
214 * Returns the value of field 'secondaryStructure'.
217 * @return the value of field 'secondaryStructure'.
219 public java.lang.String getSecondaryStructure()
221 return this._secondaryStructure;
222 } //-- java.lang.String getSecondaryStructure()
225 * Returns the value of field 'value'.
228 * @return the value of field 'value'.
230 public float getValue()
233 } //-- float getValue()
242 public boolean hasPosition()
244 return this._has_position;
245 } //-- boolean hasPosition()
254 public boolean hasValue()
256 return this._has_value;
257 } //-- boolean hasValue()
266 public boolean isValid()
271 catch (org.exolab.castor.xml.ValidationException vex) {
275 } //-- boolean isValid()
284 public void marshal(java.io.Writer out)
285 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
288 Marshaller.marshal(this, out);
289 } //-- void marshal(java.io.Writer)
298 public void marshal(org.xml.sax.ContentHandler handler)
299 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
302 Marshaller.marshal(this, handler);
303 } //-- void marshal(org.xml.sax.ContentHandler)
306 * Sets the value of field 'description'.
308 * @param description the value of field 'description'.
310 public void setDescription(java.lang.String description)
312 this._description = description;
313 } //-- void setDescription(java.lang.String)
316 * Sets the value of field 'displayCharacter'.
318 * @param displayCharacter the value of field 'displayCharacter'
320 public void setDisplayCharacter(java.lang.String displayCharacter)
322 this._displayCharacter = displayCharacter;
323 } //-- void setDisplayCharacter(java.lang.String)
326 * Sets the value of field 'id'.
328 * @param id the value of field 'id'.
330 public void setId(java.lang.String id)
333 } //-- void setId(java.lang.String)
336 * Sets the value of field 'position'.
338 * @param position the value of field 'position'.
340 public void setPosition(int position)
342 this._position = position;
343 this._has_position = true;
344 } //-- void setPosition(int)
347 * Sets the value of field 'secondaryStructure'.
349 * @param secondaryStructure the value of field
350 * 'secondaryStructure'.
352 public void setSecondaryStructure(java.lang.String secondaryStructure)
354 this._secondaryStructure = secondaryStructure;
355 } //-- void setSecondaryStructure(java.lang.String)
358 * Sets the value of field 'value'.
360 * @param value the value of field 'value'.
362 public void setValue(float value)
365 this._has_value = true;
366 } //-- void setValue(float)
374 * @return AnnotationElement
376 public static org.vamsas.objects.core.AnnotationElement unmarshal(java.io.Reader reader)
377 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
379 return (org.vamsas.objects.core.AnnotationElement) Unmarshaller.unmarshal(org.vamsas.objects.core.AnnotationElement.class, reader);
380 } //-- org.vamsas.objects.core.AnnotationElement unmarshal(java.io.Reader)
386 public void validate()
387 throws org.exolab.castor.xml.ValidationException
389 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
390 validator.validate(this);
391 } //-- void validate()