/* * This class was automatically generated with * Castor 0.9.9M2, using an XML * Schema. * $Id:Newick.java 264 2006-12-14 17:42:54Z JimP $ */ package uk.ac.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; /** * Class Newick. * * @version $Revision:264 $ $Date:2006-12-14 17:42:54 +0000 (Thu, 14 Dec 2006) $ */ public class Newick extends uk.ac.vamsas.client.Vobject implements java.io.Serializable { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * internal content storage */ private java.lang.String _content = ""; /** * Field _title */ private java.lang.String _title; /** * Primary Key for vamsas object referencing * */ private java.lang.String _id; /** * Field _modifiable */ private java.lang.String _modifiable; //----------------/ //- Constructors -/ //----------------/ public Newick() { super(); setContent(""); } //-- uk.ac.vamsas.objects.core.Newick() //-----------/ //- Methods -/ //-----------/ /** * 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 Newick) { Newick temp = (Newick)obj; if (this._content != null) { if (temp._content == null) return false; else if (!(this._content.equals(temp._content))) return false; } else if (temp._content != null) return false; if (this._title != null) { if (temp._title == null) return false; else if (!(this._title.equals(temp._title))) return false; } else if (temp._title != null) return false; if (this._id != null) { if (temp._id == null) return false; else if (!(this._id.equals(temp._id))) return false; } else if (temp._id != null) return false; if (this._modifiable != null) { if (temp._modifiable == null) return false; else if (!(this._modifiable.equals(temp._modifiable))) return false; } else if (temp._modifiable != 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 String * @return the value of field 'content'. */ public java.lang.String getContent() { return this._content; } //-- java.lang.String getContent() /** * Returns the value of field 'id'. The field 'id' has the * following description: Primary Key for vamsas object * referencing * * * @return String * @return the value of field 'id'. */ public java.lang.String getId() { return this._id; } //-- java.lang.String getId() /** * Returns the value of field 'modifiable'. * * @return String * @return the value of field 'modifiable'. */ public java.lang.String getModifiable() { return this._modifiable; } //-- java.lang.String getModifiable() /** * Returns the value of field 'title'. * * @return String * @return the value of field 'title'. */ public java.lang.String getTitle() { return this._title; } //-- java.lang.String getTitle() /** * 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(java.lang.String content) { this._content = content; } //-- void setContent(java.lang.String) /** * Sets the value of field 'id'. The field 'id' has the * following description: Primary Key for vamsas object * referencing * * * @param id the value of field 'id'. */ public void setId(java.lang.String id) { this._id = id; } //-- void setId(java.lang.String) /** * Sets the value of field 'modifiable'. * * @param modifiable the value of field 'modifiable'. */ public void setModifiable(java.lang.String modifiable) { this._modifiable = modifiable; } //-- void setModifiable(java.lang.String) /** * Sets the value of field 'title'. * * @param title the value of field 'title'. */ public void setTitle(java.lang.String title) { this._title = title; } //-- void setTitle(java.lang.String) /** * Method unmarshal * * * * @param reader * @return Newick */ public static uk.ac.vamsas.objects.core.Newick unmarshal(java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (uk.ac.vamsas.objects.core.Newick) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Newick.class, reader); } //-- uk.ac.vamsas.objects.core.Newick 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() }