2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
8 package org.vamsas.objects.core;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import java.io.IOException;
15 import java.io.Reader;
16 import java.io.Serializable;
17 import java.io.Writer;
18 import org.exolab.castor.xml.MarshalException;
19 import org.exolab.castor.xml.Marshaller;
20 import org.exolab.castor.xml.Unmarshaller;
21 import org.exolab.castor.xml.ValidationException;
22 import org.xml.sax.ContentHandler;
27 * @version $Revision$ $Date$
29 public class DbRef extends org.vamsas.client.object
30 implements java.io.Serializable
34 //--------------------------/
35 //- Class/Member Variables -/
36 //--------------------------/
41 private java.lang.String _source;
46 private java.lang.String _version;
51 private java.lang.String _accessionId;
56 private java.lang.String _id;
66 } //-- org.vamsas.objects.core.DbRef()
74 * Note: hashCode() has not been overriden
79 public boolean equals(java.lang.Object obj)
84 if (super.equals(obj)==false)
87 if (obj instanceof DbRef) {
89 DbRef temp = (DbRef)obj;
90 if (this._source != null) {
91 if (temp._source == null) return false;
92 else if (!(this._source.equals(temp._source)))
95 else if (temp._source != null)
97 if (this._version != null) {
98 if (temp._version == null) return false;
99 else if (!(this._version.equals(temp._version)))
102 else if (temp._version != null)
104 if (this._accessionId != null) {
105 if (temp._accessionId == null) return false;
106 else if (!(this._accessionId.equals(temp._accessionId)))
109 else if (temp._accessionId != null)
111 if (this._id != null) {
112 if (temp._id == null) return false;
113 else if (!(this._id.equals(temp._id)))
116 else if (temp._id != null)
121 } //-- boolean equals(java.lang.Object)
124 * Returns the value of field 'accessionId'.
127 * @return the value of field 'accessionId'.
129 public java.lang.String getAccessionId()
131 return this._accessionId;
132 } //-- java.lang.String getAccessionId()
135 * Returns the value of field 'id'.
138 * @return the value of field 'id'.
140 public java.lang.String getId()
143 } //-- java.lang.String getId()
146 * Returns the value of field 'source'.
149 * @return the value of field 'source'.
151 public java.lang.String getSource()
154 } //-- java.lang.String getSource()
157 * Returns the value of field 'version'.
160 * @return the value of field 'version'.
162 public java.lang.String getVersion()
164 return this._version;
165 } //-- java.lang.String getVersion()
174 public boolean isValid()
179 catch (org.exolab.castor.xml.ValidationException vex) {
183 } //-- boolean isValid()
192 public void marshal(java.io.Writer out)
193 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
196 Marshaller.marshal(this, out);
197 } //-- void marshal(java.io.Writer)
206 public void marshal(org.xml.sax.ContentHandler handler)
207 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
210 Marshaller.marshal(this, handler);
211 } //-- void marshal(org.xml.sax.ContentHandler)
214 * Sets the value of field 'accessionId'.
216 * @param accessionId the value of field 'accessionId'.
218 public void setAccessionId(java.lang.String accessionId)
220 this._accessionId = accessionId;
221 } //-- void setAccessionId(java.lang.String)
224 * Sets the value of field 'id'.
226 * @param id the value of field 'id'.
228 public void setId(java.lang.String id)
231 } //-- void setId(java.lang.String)
234 * Sets the value of field 'source'.
236 * @param source the value of field 'source'.
238 public void setSource(java.lang.String source)
240 this._source = source;
241 } //-- void setSource(java.lang.String)
244 * Sets the value of field 'version'.
246 * @param version the value of field 'version'.
248 public void setVersion(java.lang.String version)
250 this._version = version;
251 } //-- void setVersion(java.lang.String)
261 public static org.vamsas.objects.core.DbRef unmarshal(java.io.Reader reader)
262 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
264 return (org.vamsas.objects.core.DbRef) Unmarshaller.unmarshal(org.vamsas.objects.core.DbRef.class, reader);
265 } //-- org.vamsas.objects.core.DbRef unmarshal(java.io.Reader)
271 public void validate()
272 throws org.exolab.castor.xml.ValidationException
274 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
275 validator.validate(this);
276 } //-- void validate()