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 * Ordered set of optionally named float
26 * values for the whole annotation
29 * @version $Revision$ $Date$
31 public class Score extends org.vamsas.client.Vobject
32 implements java.io.Serializable
36 //--------------------------/
37 //- Class/Member Variables -/
38 //--------------------------/
41 * internal content storage
43 private float _content;
46 * keeps track of state for field: _content
48 private boolean _has_content;
53 private java.lang.String _name = "score";
64 } //-- org.vamsas.objects.core.Score()
72 * Method deleteContent
75 public void deleteContent()
77 this._has_content= false;
78 } //-- void deleteContent()
81 * Note: hashCode() has not been overriden
86 public boolean equals(java.lang.Object obj)
91 if (super.equals(obj)==false)
94 if (obj instanceof Score) {
96 Score temp = (Score)obj;
97 if (this._content != temp._content)
99 if (this._has_content != temp._has_content)
101 if (this._name != null) {
102 if (temp._name == null) return false;
103 else if (!(this._name.equals(temp._name)))
106 else if (temp._name != null)
111 } //-- boolean equals(java.lang.Object)
114 * Returns the value of field 'content'. The field 'content'
115 * has the following description: internal content storage
118 * @return the value of field 'content'.
120 public float getContent()
122 return this._content;
123 } //-- float getContent()
126 * Returns the value of field 'name'.
129 * @return the value of field 'name'.
131 public java.lang.String getName()
134 } //-- java.lang.String getName()
143 public boolean hasContent()
145 return this._has_content;
146 } //-- boolean hasContent()
155 public boolean isValid()
160 catch (org.exolab.castor.xml.ValidationException vex) {
164 } //-- boolean isValid()
173 public void marshal(java.io.Writer out)
174 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
177 Marshaller.marshal(this, out);
178 } //-- void marshal(java.io.Writer)
187 public void marshal(org.xml.sax.ContentHandler handler)
188 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
191 Marshaller.marshal(this, handler);
192 } //-- void marshal(org.xml.sax.ContentHandler)
195 * Sets the value of field 'content'. The field 'content' has
196 * the following description: internal content storage
198 * @param content the value of field 'content'.
200 public void setContent(float content)
202 this._content = content;
203 this._has_content = true;
204 } //-- void setContent(float)
207 * Sets the value of field 'name'.
209 * @param name the value of field 'name'.
211 public void setName(java.lang.String name)
214 } //-- void setName(java.lang.String)
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
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)
234 public void validate()
235 throws org.exolab.castor.xml.ValidationException
237 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
238 validator.validate(this);
239 } //-- void validate()