/* * This class was automatically generated with * Castor 0.9.9M1, using an XML * Schema. * $Id$ */ package org.vamsas.client.objects; //---------------------------------/ //- 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 DbRef. * * @version $Revision$ $Date$ */ public class DbRef extends org.vamsas.client.object implements java.io.Serializable { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * Field _source */ private java.lang.Object _source; /** * Field _version */ private java.lang.Object _version; /** * Field _accessionId */ private java.lang.Object _accessionId; //----------------/ //- Constructors -/ //----------------/ public DbRef() { super(); } //-- org.vamsas.client.objects.DbRef() //-----------/ //- 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 DbRef) { DbRef temp = (DbRef)obj; if (this._source != null) { if (temp._source == null) return false; else if (!(this._source.equals(temp._source))) return false; } else if (temp._source != null) return false; if (this._version != null) { if (temp._version == null) return false; else if (!(this._version.equals(temp._version))) return false; } else if (temp._version != null) return false; if (this._accessionId != null) { if (temp._accessionId == null) return false; else if (!(this._accessionId.equals(temp._accessionId))) return false; } else if (temp._accessionId != null) return false; return true; } return false; } //-- boolean equals(java.lang.Object) /** * Returns the value of field 'accessionId'. * * @return Object * @return the value of field 'accessionId'. */ public java.lang.Object getAccessionId() { return this._accessionId; } //-- java.lang.Object getAccessionId() /** * Returns the value of field 'source'. * * @return Object * @return the value of field 'source'. */ public java.lang.Object getSource() { return this._source; } //-- java.lang.Object getSource() /** * Returns the value of field 'version'. * * @return Object * @return the value of field 'version'. */ public java.lang.Object getVersion() { return this._version; } //-- java.lang.Object getVersion() /** * 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 'accessionId'. * * @param accessionId the value of field 'accessionId'. */ public void setAccessionId(java.lang.Object accessionId) { this._accessionId = accessionId; } //-- void setAccessionId(java.lang.Object) /** * Sets the value of field 'source'. * * @param source the value of field 'source'. */ public void setSource(java.lang.Object source) { this._source = source; } //-- void setSource(java.lang.Object) /** * Sets the value of field 'version'. * * @param version the value of field 'version'. */ public void setVersion(java.lang.Object version) { this._version = version; } //-- void setVersion(java.lang.Object) /** * Method unmarshal * * * * @param reader * @return DbRef */ public static org.vamsas.client.objects.DbRef unmarshal(java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.vamsas.client.objects.DbRef) Unmarshaller.unmarshal(org.vamsas.client.objects.DbRef.class, reader); } //-- org.vamsas.client.objects.DbRef 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() }