first attempt at object build.
[vamsas.git] / src / org / vamsas / client / objects / AnnotationElement.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package org.vamsas.client.objects;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
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;
23
24 /**
25  * Class AnnotationElement.
26  * 
27  * @version $Revision$ $Date$
28  */
29 public class AnnotationElement extends org.vamsas.client.object 
30 implements java.io.Serializable
31 {
32
33
34       //--------------------------/
35      //- Class/Member Variables -/
36     //--------------------------/
37
38     /**
39      * Field _position
40      */
41     private int _position;
42
43     /**
44      * keeps track of state for field: _position
45      */
46     private boolean _has_position;
47
48     /**
49      * Field _displayCharacter
50      */
51     private java.lang.String _displayCharacter;
52
53     /**
54      * Field _description
55      */
56     private java.lang.String _description;
57
58     /**
59      * Field _secondaryStructure
60      */
61     private java.lang.String _secondaryStructure;
62
63     /**
64      * Field _value
65      */
66     private float _value;
67
68     /**
69      * keeps track of state for field: _value
70      */
71     private boolean _has_value;
72
73
74       //----------------/
75      //- Constructors -/
76     //----------------/
77
78     public AnnotationElement() 
79      {
80         super();
81     } //-- org.vamsas.client.objects.AnnotationElement()
82
83
84       //-----------/
85      //- Methods -/
86     //-----------/
87
88     /**
89      * Method deletePosition
90      * 
91      */
92     public void deletePosition()
93     {
94         this._has_position= false;
95     } //-- void deletePosition() 
96
97     /**
98      * Method deleteValue
99      * 
100      */
101     public void deleteValue()
102     {
103         this._has_value= false;
104     } //-- void deleteValue() 
105
106     /**
107      * Note: hashCode() has not been overriden
108      * 
109      * @param obj
110      * @return boolean
111      */
112     public boolean equals(java.lang.Object obj)
113     {
114         if ( this == obj )
115             return true;
116         
117         if (super.equals(obj)==false)
118             return false;
119         
120         if (obj instanceof AnnotationElement) {
121         
122             AnnotationElement temp = (AnnotationElement)obj;
123             if (this._position != temp._position)
124                 return false;
125             if (this._has_position != temp._has_position)
126                 return false;
127             if (this._displayCharacter != null) {
128                 if (temp._displayCharacter == null) return false;
129                 else if (!(this._displayCharacter.equals(temp._displayCharacter))) 
130                     return false;
131             }
132             else if (temp._displayCharacter != null)
133                 return false;
134             if (this._description != null) {
135                 if (temp._description == null) return false;
136                 else if (!(this._description.equals(temp._description))) 
137                     return false;
138             }
139             else if (temp._description != null)
140                 return false;
141             if (this._secondaryStructure != null) {
142                 if (temp._secondaryStructure == null) return false;
143                 else if (!(this._secondaryStructure.equals(temp._secondaryStructure))) 
144                     return false;
145             }
146             else if (temp._secondaryStructure != null)
147                 return false;
148             if (this._value != temp._value)
149                 return false;
150             if (this._has_value != temp._has_value)
151                 return false;
152             return true;
153         }
154         return false;
155     } //-- boolean equals(java.lang.Object) 
156
157     /**
158      * Returns the value of field 'description'.
159      * 
160      * @return String
161      * @return the value of field 'description'.
162      */
163     public java.lang.String getDescription()
164     {
165         return this._description;
166     } //-- java.lang.String getDescription() 
167
168     /**
169      * Returns the value of field 'displayCharacter'.
170      * 
171      * @return String
172      * @return the value of field 'displayCharacter'.
173      */
174     public java.lang.String getDisplayCharacter()
175     {
176         return this._displayCharacter;
177     } //-- java.lang.String getDisplayCharacter() 
178
179     /**
180      * Returns the value of field 'position'.
181      * 
182      * @return int
183      * @return the value of field 'position'.
184      */
185     public int getPosition()
186     {
187         return this._position;
188     } //-- int getPosition() 
189
190     /**
191      * Returns the value of field 'secondaryStructure'.
192      * 
193      * @return String
194      * @return the value of field 'secondaryStructure'.
195      */
196     public java.lang.String getSecondaryStructure()
197     {
198         return this._secondaryStructure;
199     } //-- java.lang.String getSecondaryStructure() 
200
201     /**
202      * Returns the value of field 'value'.
203      * 
204      * @return float
205      * @return the value of field 'value'.
206      */
207     public float getValue()
208     {
209         return this._value;
210     } //-- float getValue() 
211
212     /**
213      * Method hasPosition
214      * 
215      * 
216      * 
217      * @return boolean
218      */
219     public boolean hasPosition()
220     {
221         return this._has_position;
222     } //-- boolean hasPosition() 
223
224     /**
225      * Method hasValue
226      * 
227      * 
228      * 
229      * @return boolean
230      */
231     public boolean hasValue()
232     {
233         return this._has_value;
234     } //-- boolean hasValue() 
235
236     /**
237      * Method isValid
238      * 
239      * 
240      * 
241      * @return boolean
242      */
243     public boolean isValid()
244     {
245         try {
246             validate();
247         }
248         catch (org.exolab.castor.xml.ValidationException vex) {
249             return false;
250         }
251         return true;
252     } //-- boolean isValid() 
253
254     /**
255      * Method marshal
256      * 
257      * 
258      * 
259      * @param out
260      */
261     public void marshal(java.io.Writer out)
262         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
263     {
264         
265         Marshaller.marshal(this, out);
266     } //-- void marshal(java.io.Writer) 
267
268     /**
269      * Method marshal
270      * 
271      * 
272      * 
273      * @param handler
274      */
275     public void marshal(org.xml.sax.ContentHandler handler)
276         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
277     {
278         
279         Marshaller.marshal(this, handler);
280     } //-- void marshal(org.xml.sax.ContentHandler) 
281
282     /**
283      * Sets the value of field 'description'.
284      * 
285      * @param description the value of field 'description'.
286      */
287     public void setDescription(java.lang.String description)
288     {
289         this._description = description;
290     } //-- void setDescription(java.lang.String) 
291
292     /**
293      * Sets the value of field 'displayCharacter'.
294      * 
295      * @param displayCharacter the value of field 'displayCharacter'
296      */
297     public void setDisplayCharacter(java.lang.String displayCharacter)
298     {
299         this._displayCharacter = displayCharacter;
300     } //-- void setDisplayCharacter(java.lang.String) 
301
302     /**
303      * Sets the value of field 'position'.
304      * 
305      * @param position the value of field 'position'.
306      */
307     public void setPosition(int position)
308     {
309         this._position = position;
310         this._has_position = true;
311     } //-- void setPosition(int) 
312
313     /**
314      * Sets the value of field 'secondaryStructure'.
315      * 
316      * @param secondaryStructure the value of field
317      * 'secondaryStructure'.
318      */
319     public void setSecondaryStructure(java.lang.String secondaryStructure)
320     {
321         this._secondaryStructure = secondaryStructure;
322     } //-- void setSecondaryStructure(java.lang.String) 
323
324     /**
325      * Sets the value of field 'value'.
326      * 
327      * @param value the value of field 'value'.
328      */
329     public void setValue(float value)
330     {
331         this._value = value;
332         this._has_value = true;
333     } //-- void setValue(float) 
334
335     /**
336      * Method unmarshal
337      * 
338      * 
339      * 
340      * @param reader
341      * @return AnnotationElement
342      */
343     public static org.vamsas.client.objects.AnnotationElement unmarshal(java.io.Reader reader)
344         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
345     {
346         return (org.vamsas.client.objects.AnnotationElement) Unmarshaller.unmarshal(org.vamsas.client.objects.AnnotationElement.class, reader);
347     } //-- org.vamsas.client.objects.AnnotationElement unmarshal(java.io.Reader) 
348
349     /**
350      * Method validate
351      * 
352      */
353     public void validate()
354         throws org.exolab.castor.xml.ValidationException
355     {
356         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
357         validator.validate(this);
358     } //-- void validate() 
359
360 }