2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package uk.ac.vamsas.objects.core;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
20 * @version $Revision$ $Date$
22 public class User extends uk.ac.vamsas.objects.core.AppData
23 implements java.io.Serializable
27 //--------------------------/
28 //- Class/Member Variables -/
29 //--------------------------/
34 private java.lang.String _fullname;
37 * Field _organization.
39 private java.lang.String _organization;
56 * Overrides the java.lang.Object.equals method.
59 * @return true if the objects are equal.
61 public boolean equals(
62 final java.lang.Object obj) {
66 if (super.equals(obj)==false)
69 if (obj instanceof User) {
71 User temp = (User)obj;
72 if (this._fullname != null) {
73 if (temp._fullname == null) return false;
74 else if (!(this._fullname.equals(temp._fullname)))
77 else if (temp._fullname != null)
79 if (this._organization != null) {
80 if (temp._organization == null) return false;
81 else if (!(this._organization.equals(temp._organization)))
84 else if (temp._organization != null)
92 * Returns the value of field 'fullname'.
94 * @return the value of field 'Fullname'.
96 public java.lang.String getFullname(
98 return this._fullname;
102 * Returns the value of field 'organization'.
104 * @return the value of field 'Organization'.
106 public java.lang.String getOrganization(
108 return this._organization;
112 * Overrides the java.lang.Object.hashCode method.
114 * The following steps came from <b>Effective Java Programming
115 * Language Guide</b> by Joshua Bloch, Chapter 3
117 * @return a hash code value for the object.
121 int result = super.hashCode();
124 if (_fullname != null) {
125 result = 37 * result + _fullname.hashCode();
127 if (_organization != null) {
128 result = 37 * result + _organization.hashCode();
137 * @return true if this object is valid according to the schema
139 public boolean isValid(
143 } catch (org.exolab.castor.xml.ValidationException vex) {
153 * @throws org.exolab.castor.xml.MarshalException if object is
154 * null or if any SAXException is thrown during marshaling
155 * @throws org.exolab.castor.xml.ValidationException if this
156 * object is an invalid instance according to the schema
159 final java.io.Writer out)
160 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
161 Marshaller.marshal(this, out);
168 * @throws java.io.IOException if an IOException occurs during
170 * @throws org.exolab.castor.xml.ValidationException if this
171 * object is an invalid instance according to the schema
172 * @throws org.exolab.castor.xml.MarshalException if object is
173 * null or if any SAXException is thrown during marshaling
176 final org.xml.sax.ContentHandler handler)
177 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
178 Marshaller.marshal(this, handler);
182 * Sets the value of field 'fullname'.
184 * @param fullname the value of field 'fullname'.
186 public void setFullname(
187 final java.lang.String fullname) {
188 this._fullname = fullname;
192 * Sets the value of field 'organization'.
194 * @param organization the value of field 'organization'.
196 public void setOrganization(
197 final java.lang.String organization) {
198 this._organization = organization;
205 * @throws org.exolab.castor.xml.MarshalException if object is
206 * null or if any SAXException is thrown during marshaling
207 * @throws org.exolab.castor.xml.ValidationException if this
208 * object is an invalid instance according to the schema
209 * @return the unmarshaled uk.ac.vamsas.objects.core.AppData
211 public static uk.ac.vamsas.objects.core.AppData unmarshal(
212 final java.io.Reader reader)
213 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
214 return (uk.ac.vamsas.objects.core.AppData) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.User.class, reader);
220 * @throws org.exolab.castor.xml.ValidationException if this
221 * object is an invalid instance according to the schema
223 public void validate(
225 throws org.exolab.castor.xml.ValidationException {
226 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
227 validator.validate(this);