autogenerated java classes for current schema
[vamsas.git] / src / org / vamsas / objects / core / Score.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package org.vamsas.objects.core;
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  * Ordered set of optionally named float
26  *  values for the whole annotation
27  *  
28  * 
29  * @version $Revision$ $Date$
30  */
31 public class Score extends org.vamsas.client.Vobject 
32 implements java.io.Serializable
33 {
34
35
36       //--------------------------/
37      //- Class/Member Variables -/
38     //--------------------------/
39
40     /**
41      * internal content storage
42      */
43     private float _content;
44
45     /**
46      * keeps track of state for field: _content
47      */
48     private boolean _has_content;
49
50     /**
51      * Field _name
52      */
53     private java.lang.String _name = "score";
54
55
56       //----------------/
57      //- Constructors -/
58     //----------------/
59
60     public Score() 
61      {
62         super();
63         setName("score");
64     } //-- org.vamsas.objects.core.Score()
65
66
67       //-----------/
68      //- Methods -/
69     //-----------/
70
71     /**
72      * Method deleteContent
73      * 
74      */
75     public void deleteContent()
76     {
77         this._has_content= false;
78     } //-- void deleteContent() 
79
80     /**
81      * Note: hashCode() has not been overriden
82      * 
83      * @param obj
84      * @return boolean
85      */
86     public boolean equals(java.lang.Object obj)
87     {
88         if ( this == obj )
89             return true;
90         
91         if (super.equals(obj)==false)
92             return false;
93         
94         if (obj instanceof Score) {
95         
96             Score temp = (Score)obj;
97             if (this._content != temp._content)
98                 return false;
99             if (this._has_content != temp._has_content)
100                 return false;
101             if (this._name != null) {
102                 if (temp._name == null) return false;
103                 else if (!(this._name.equals(temp._name))) 
104                     return false;
105             }
106             else if (temp._name != null)
107                 return false;
108             return true;
109         }
110         return false;
111     } //-- boolean equals(java.lang.Object) 
112
113     /**
114      * Returns the value of field 'content'. The field 'content'
115      * has the following description: internal content storage
116      * 
117      * @return float
118      * @return the value of field 'content'.
119      */
120     public float getContent()
121     {
122         return this._content;
123     } //-- float getContent() 
124
125     /**
126      * Returns the value of field 'name'.
127      * 
128      * @return String
129      * @return the value of field 'name'.
130      */
131     public java.lang.String getName()
132     {
133         return this._name;
134     } //-- java.lang.String getName() 
135
136     /**
137      * Method hasContent
138      * 
139      * 
140      * 
141      * @return boolean
142      */
143     public boolean hasContent()
144     {
145         return this._has_content;
146     } //-- boolean hasContent() 
147
148     /**
149      * Method isValid
150      * 
151      * 
152      * 
153      * @return boolean
154      */
155     public boolean isValid()
156     {
157         try {
158             validate();
159         }
160         catch (org.exolab.castor.xml.ValidationException vex) {
161             return false;
162         }
163         return true;
164     } //-- boolean isValid() 
165
166     /**
167      * Method marshal
168      * 
169      * 
170      * 
171      * @param out
172      */
173     public void marshal(java.io.Writer out)
174         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
175     {
176         
177         Marshaller.marshal(this, out);
178     } //-- void marshal(java.io.Writer) 
179
180     /**
181      * Method marshal
182      * 
183      * 
184      * 
185      * @param handler
186      */
187     public void marshal(org.xml.sax.ContentHandler handler)
188         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
189     {
190         
191         Marshaller.marshal(this, handler);
192     } //-- void marshal(org.xml.sax.ContentHandler) 
193
194     /**
195      * Sets the value of field 'content'. The field 'content' has
196      * the following description: internal content storage
197      * 
198      * @param content the value of field 'content'.
199      */
200     public void setContent(float content)
201     {
202         this._content = content;
203         this._has_content = true;
204     } //-- void setContent(float) 
205
206     /**
207      * Sets the value of field 'name'.
208      * 
209      * @param name the value of field 'name'.
210      */
211     public void setName(java.lang.String name)
212     {
213         this._name = name;
214     } //-- void setName(java.lang.String) 
215
216     /**
217      * Method unmarshal
218      * 
219      * 
220      * 
221      * @param reader
222      * @return Score
223      */
224     public static org.vamsas.objects.core.Score unmarshal(java.io.Reader reader)
225         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
226     {
227         return (org.vamsas.objects.core.Score) Unmarshaller.unmarshal(org.vamsas.objects.core.Score.class, reader);
228     } //-- org.vamsas.objects.core.Score unmarshal(java.io.Reader) 
229
230     /**
231      * Method validate
232      * 
233      */
234     public void validate()
235         throws org.exolab.castor.xml.ValidationException
236     {
237         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
238         validator.validate(this);
239     } //-- void validate() 
240
241 }