2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
\r
8 package org.vamsas.objects.core;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import java.io.IOException;
\r
15 import java.io.Reader;
\r
16 import java.io.Serializable;
\r
17 import java.io.Writer;
\r
18 import org.exolab.castor.xml.MarshalException;
\r
19 import org.exolab.castor.xml.Marshaller;
\r
20 import org.exolab.castor.xml.Unmarshaller;
\r
21 import org.exolab.castor.xml.ValidationException;
\r
22 import org.xml.sax.ContentHandler;
\r
25 * Ordered set of optionally named float
\r
26 * values for the whole annotation
\r
29 * @version $Revision$ $Date$
\r
31 public class Score extends org.vamsas.client.Vobject
\r
32 implements java.io.Serializable
\r
36 //--------------------------/
\r
37 //- Class/Member Variables -/
\r
38 //--------------------------/
\r
41 * internal content storage
\r
43 private float _content;
\r
46 * keeps track of state for field: _content
\r
48 private boolean _has_content;
\r
53 private java.lang.String _name = "score";
\r
64 } //-- org.vamsas.objects.core.Score()
\r
72 * Method deleteContent
\r
75 public void deleteContent()
\r
77 this._has_content= false;
\r
78 } //-- void deleteContent()
\r
81 * Note: hashCode() has not been overriden
\r
86 public boolean equals(java.lang.Object obj)
\r
91 if (super.equals(obj)==false)
\r
94 if (obj instanceof Score) {
\r
96 Score temp = (Score)obj;
\r
97 if (this._content != temp._content)
\r
99 if (this._has_content != temp._has_content)
\r
101 if (this._name != null) {
\r
102 if (temp._name == null) return false;
\r
103 else if (!(this._name.equals(temp._name)))
\r
106 else if (temp._name != null)
\r
111 } //-- boolean equals(java.lang.Object)
\r
114 * Returns the value of field 'content'. The field 'content'
\r
115 * has the following description: internal content storage
\r
118 * @return the value of field 'content'.
\r
120 public float getContent()
\r
122 return this._content;
\r
123 } //-- float getContent()
\r
126 * Returns the value of field 'name'.
\r
129 * @return the value of field 'name'.
\r
131 public java.lang.String getName()
\r
134 } //-- java.lang.String getName()
\r
137 * Method hasContent
\r
143 public boolean hasContent()
\r
145 return this._has_content;
\r
146 } //-- boolean hasContent()
\r
155 public boolean isValid()
\r
160 catch (org.exolab.castor.xml.ValidationException vex) {
\r
164 } //-- boolean isValid()
\r
173 public void marshal(java.io.Writer out)
\r
174 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
177 Marshaller.marshal(this, out);
\r
178 } //-- void marshal(java.io.Writer)
\r
187 public void marshal(org.xml.sax.ContentHandler handler)
\r
188 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
191 Marshaller.marshal(this, handler);
\r
192 } //-- void marshal(org.xml.sax.ContentHandler)
\r
195 * Sets the value of field 'content'. The field 'content' has
\r
196 * the following description: internal content storage
\r
198 * @param content the value of field 'content'.
\r
200 public void setContent(float content)
\r
202 this._content = content;
\r
203 this._has_content = true;
\r
204 } //-- void setContent(float)
\r
207 * Sets the value of field 'name'.
\r
209 * @param name the value of field 'name'.
\r
211 public void setName(java.lang.String name)
\r
214 } //-- void setName(java.lang.String)
\r
224 public static org.vamsas.objects.core.Score unmarshal(java.io.Reader reader)
\r
225 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
227 return (org.vamsas.objects.core.Score) Unmarshaller.unmarshal(org.vamsas.objects.core.Score.class, reader);
\r
228 } //-- org.vamsas.objects.core.Score unmarshal(java.io.Reader)
\r
234 public void validate()
\r
235 throws org.exolab.castor.xml.ValidationException
\r
237 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
238 validator.validate(this);
\r
239 } //-- void validate()
\r