2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 0.9.9M1</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;
49 * Field _displayCharacter
51 private java.lang.String _displayCharacter;
56 private java.lang.String _description;
59 * Field _secondaryStructure
61 private java.lang.String _secondaryStructure;
69 * keeps track of state for field: _value
71 private boolean _has_value;
78 public AnnotationElement()
81 } //-- org.vamsas.objects.core.AnnotationElement()
89 * Method deletePosition
92 public void deletePosition()
94 this._has_position= false;
95 } //-- void deletePosition()
101 public void deleteValue()
103 this._has_value= false;
104 } //-- void deleteValue()
107 * Note: hashCode() has not been overriden
112 public boolean equals(java.lang.Object obj)
117 if (super.equals(obj)==false)
120 if (obj instanceof AnnotationElement) {
122 AnnotationElement temp = (AnnotationElement)obj;
123 if (this._position != temp._position)
125 if (this._has_position != temp._has_position)
127 if (this._displayCharacter != null) {
128 if (temp._displayCharacter == null) return false;
129 else if (!(this._displayCharacter.equals(temp._displayCharacter)))
132 else if (temp._displayCharacter != null)
134 if (this._description != null) {
135 if (temp._description == null) return false;
136 else if (!(this._description.equals(temp._description)))
139 else if (temp._description != null)
141 if (this._secondaryStructure != null) {
142 if (temp._secondaryStructure == null) return false;
143 else if (!(this._secondaryStructure.equals(temp._secondaryStructure)))
146 else if (temp._secondaryStructure != null)
148 if (this._value != temp._value)
150 if (this._has_value != temp._has_value)
155 } //-- boolean equals(java.lang.Object)
158 * Returns the value of field 'description'.
161 * @return the value of field 'description'.
163 public java.lang.String getDescription()
165 return this._description;
166 } //-- java.lang.String getDescription()
169 * Returns the value of field 'displayCharacter'.
172 * @return the value of field 'displayCharacter'.
174 public java.lang.String getDisplayCharacter()
176 return this._displayCharacter;
177 } //-- java.lang.String getDisplayCharacter()
180 * Returns the value of field 'position'.
183 * @return the value of field 'position'.
185 public int getPosition()
187 return this._position;
188 } //-- int getPosition()
191 * Returns the value of field 'secondaryStructure'.
194 * @return the value of field 'secondaryStructure'.
196 public java.lang.String getSecondaryStructure()
198 return this._secondaryStructure;
199 } //-- java.lang.String getSecondaryStructure()
202 * Returns the value of field 'value'.
205 * @return the value of field 'value'.
207 public float getValue()
210 } //-- float getValue()
219 public boolean hasPosition()
221 return this._has_position;
222 } //-- boolean hasPosition()
231 public boolean hasValue()
233 return this._has_value;
234 } //-- boolean hasValue()
243 public boolean isValid()
248 catch (org.exolab.castor.xml.ValidationException vex) {
252 } //-- boolean isValid()
261 public void marshal(java.io.Writer out)
262 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
265 Marshaller.marshal(this, out);
266 } //-- void marshal(java.io.Writer)
275 public void marshal(org.xml.sax.ContentHandler handler)
276 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
279 Marshaller.marshal(this, handler);
280 } //-- void marshal(org.xml.sax.ContentHandler)
283 * Sets the value of field 'description'.
285 * @param description the value of field 'description'.
287 public void setDescription(java.lang.String description)
289 this._description = description;
290 } //-- void setDescription(java.lang.String)
293 * Sets the value of field 'displayCharacter'.
295 * @param displayCharacter the value of field 'displayCharacter'
297 public void setDisplayCharacter(java.lang.String displayCharacter)
299 this._displayCharacter = displayCharacter;
300 } //-- void setDisplayCharacter(java.lang.String)
303 * Sets the value of field 'position'.
305 * @param position the value of field 'position'.
307 public void setPosition(int position)
309 this._position = position;
310 this._has_position = true;
311 } //-- void setPosition(int)
314 * Sets the value of field 'secondaryStructure'.
316 * @param secondaryStructure the value of field
317 * 'secondaryStructure'.
319 public void setSecondaryStructure(java.lang.String secondaryStructure)
321 this._secondaryStructure = secondaryStructure;
322 } //-- void setSecondaryStructure(java.lang.String)
325 * Sets the value of field 'value'.
327 * @param value the value of field 'value'.
329 public void setValue(float value)
332 this._has_value = true;
333 } //-- void setValue(float)
341 * @return AnnotationElement
343 public static org.vamsas.objects.core.AnnotationElement unmarshal(java.io.Reader reader)
344 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
346 return (org.vamsas.objects.core.AnnotationElement) Unmarshaller.unmarshal(org.vamsas.objects.core.AnnotationElement.class, reader);
347 } //-- org.vamsas.objects.core.AnnotationElement unmarshal(java.io.Reader)
353 public void validate()
354 throws org.exolab.castor.xml.ValidationException
356 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
357 validator.validate(this);
358 } //-- void validate()