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 uk.ac.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 values for the
\r
28 * @version $Revision$ $Date$
\r
30 public class Score extends uk.ac.vamsas.client.Vobject
\r
31 implements java.io.Serializable
\r
35 //--------------------------/
\r
36 //- Class/Member Variables -/
\r
37 //--------------------------/
\r
40 * internal content storage
\r
42 private float _content;
\r
45 * keeps track of state for field: _content
\r
47 private boolean _has_content;
\r
52 private java.lang.String _name = "score";
\r
63 } //-- uk.ac.vamsas.objects.core.Score()
\r
71 * Method deleteContent
\r
74 public void deleteContent()
\r
76 this._has_content= false;
\r
77 } //-- void deleteContent()
\r
80 * Note: hashCode() has not been overriden
\r
85 public boolean equals(java.lang.Object obj)
\r
90 if (super.equals(obj)==false)
\r
93 if (obj instanceof Score) {
\r
95 Score temp = (Score)obj;
\r
96 if (this._content != temp._content)
\r
98 if (this._has_content != temp._has_content)
\r
100 if (this._name != null) {
\r
101 if (temp._name == null) return false;
\r
102 else if (!(this._name.equals(temp._name)))
\r
105 else if (temp._name != null)
\r
110 } //-- boolean equals(java.lang.Object)
\r
113 * Returns the value of field 'content'. The field 'content'
\r
114 * has the following description: internal content storage
\r
117 * @return the value of field 'content'.
\r
119 public float getContent()
\r
121 return this._content;
\r
122 } //-- float getContent()
\r
125 * Returns the value of field 'name'.
\r
128 * @return the value of field 'name'.
\r
130 public java.lang.String getName()
\r
133 } //-- java.lang.String getName()
\r
136 * Method hasContent
\r
142 public boolean hasContent()
\r
144 return this._has_content;
\r
145 } //-- boolean hasContent()
\r
154 public boolean isValid()
\r
159 catch (org.exolab.castor.xml.ValidationException vex) {
\r
163 } //-- boolean isValid()
\r
172 public void marshal(java.io.Writer out)
\r
173 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
176 Marshaller.marshal(this, out);
\r
177 } //-- void marshal(java.io.Writer)
\r
186 public void marshal(org.xml.sax.ContentHandler handler)
\r
187 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
190 Marshaller.marshal(this, handler);
\r
191 } //-- void marshal(org.xml.sax.ContentHandler)
\r
194 * Sets the value of field 'content'. The field 'content' has
\r
195 * the following description: internal content storage
\r
197 * @param content the value of field 'content'.
\r
199 public void setContent(float content)
\r
201 this._content = content;
\r
202 this._has_content = true;
\r
203 } //-- void setContent(float)
\r
206 * Sets the value of field 'name'.
\r
208 * @param name the value of field 'name'.
\r
210 public void setName(java.lang.String name)
\r
213 } //-- void setName(java.lang.String)
\r
223 public static uk.ac.vamsas.objects.core.Score unmarshal(java.io.Reader reader)
\r
224 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
226 return (uk.ac.vamsas.objects.core.Score) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Score.class, reader);
\r
227 } //-- uk.ac.vamsas.objects.core.Score unmarshal(java.io.Reader)
\r
233 public void validate()
\r
234 throws org.exolab.castor.xml.ValidationException
\r
236 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
237 validator.validate(this);
\r
238 } //-- void validate()
\r