/* * This class was automatically generated with * Castor 0.9.9M2, using an XML * Schema. * $Id$ */ package org.vamsas.objects.core; //---------------------------------/ //- Imported classes and packages -/ //---------------------------------/ import java.io.IOException; import java.io.Reader; import java.io.Serializable; import java.io.Writer; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; import org.exolab.castor.xml.ValidationException; import org.xml.sax.ContentHandler; /** * Ordered set of optionally named float * values for the whole annotation * * * @version $Revision$ $Date$ */ public class Score extends org.vamsas.client.Vobject implements java.io.Serializable { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * internal content storage */ private float _content; /** * keeps track of state for field: _content */ private boolean _has_content; /** * Field _name */ private java.lang.String _name = "score"; //----------------/ //- Constructors -/ //----------------/ public Score() { super(); setName("score"); } //-- org.vamsas.objects.core.Score() //-----------/ //- Methods -/ //-----------/ /** * Method deleteContent * */ public void deleteContent() { this._has_content= false; } //-- void deleteContent() /** * Note: hashCode() has not been overriden * * @param obj * @return boolean */ public boolean equals(java.lang.Object obj) { if ( this == obj ) return true; if (super.equals(obj)==false) return false; if (obj instanceof Score) { Score temp = (Score)obj; if (this._content != temp._content) return false; if (this._has_content != temp._has_content) return false; if (this._name != null) { if (temp._name == null) return false; else if (!(this._name.equals(temp._name))) return false; } else if (temp._name != null) return false; return true; } return false; } //-- boolean equals(java.lang.Object) /** * Returns the value of field 'content'. The field 'content' * has the following description: internal content storage * * @return float * @return the value of field 'content'. */ public float getContent() { return this._content; } //-- float getContent() /** * Returns the value of field 'name'. * * @return String * @return the value of field 'name'. */ public java.lang.String getName() { return this._name; } //-- java.lang.String getName() /** * Method hasContent * * * * @return boolean */ public boolean hasContent() { return this._has_content; } //-- boolean hasContent() /** * Method isValid * * * * @return boolean */ public boolean isValid() { try { validate(); } catch (org.exolab.castor.xml.ValidationException vex) { return false; } return true; } //-- boolean isValid() /** * Method marshal * * * * @param out */ public void marshal(java.io.Writer out) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); } //-- void marshal(java.io.Writer) /** * Method marshal * * * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, handler); } //-- void marshal(org.xml.sax.ContentHandler) /** * Sets the value of field 'content'. The field 'content' has * the following description: internal content storage * * @param content the value of field 'content'. */ public void setContent(float content) { this._content = content; this._has_content = true; } //-- void setContent(float) /** * Sets the value of field 'name'. * * @param name the value of field 'name'. */ public void setName(java.lang.String name) { this._name = name; } //-- void setName(java.lang.String) /** * Method unmarshal * * * * @param reader * @return Score */ public static org.vamsas.objects.core.Score unmarshal(java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.vamsas.objects.core.Score) Unmarshaller.unmarshal(org.vamsas.objects.core.Score.class, reader); } //-- org.vamsas.objects.core.Score unmarshal(java.io.Reader) /** * Method validate * */ public void validate() throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); } //-- void validate() }