2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
8 package uk.ac.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 User extends uk.ac.vamsas.objects.core.AppData
30 implements java.io.Serializable
34 //--------------------------/
35 //- Class/Member Variables -/
36 //--------------------------/
41 private java.lang.String _fullname;
46 private java.lang.String _organization;
56 } //-- uk.ac.vamsas.objects.core.User()
64 * Note: hashCode() has not been overriden
69 public boolean equals(java.lang.Object obj)
74 if (super.equals(obj)==false)
77 if (obj instanceof User) {
79 User temp = (User)obj;
80 if (this._fullname != null) {
81 if (temp._fullname == null) return false;
82 else if (!(this._fullname.equals(temp._fullname)))
85 else if (temp._fullname != null)
87 if (this._organization != null) {
88 if (temp._organization == null) return false;
89 else if (!(this._organization.equals(temp._organization)))
92 else if (temp._organization != null)
97 } //-- boolean equals(java.lang.Object)
100 * Returns the value of field 'fullname'.
103 * @return the value of field 'fullname'.
105 public java.lang.String getFullname()
107 return this._fullname;
108 } //-- java.lang.String getFullname()
111 * Returns the value of field 'organization'.
114 * @return the value of field 'organization'.
116 public java.lang.String getOrganization()
118 return this._organization;
119 } //-- java.lang.String getOrganization()
128 public boolean isValid()
133 catch (org.exolab.castor.xml.ValidationException vex) {
137 } //-- boolean isValid()
146 public void marshal(java.io.Writer out)
147 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
150 Marshaller.marshal(this, out);
151 } //-- void marshal(java.io.Writer)
160 public void marshal(org.xml.sax.ContentHandler handler)
161 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
164 Marshaller.marshal(this, handler);
165 } //-- void marshal(org.xml.sax.ContentHandler)
168 * Sets the value of field 'fullname'.
170 * @param fullname the value of field 'fullname'.
172 public void setFullname(java.lang.String fullname)
174 this._fullname = fullname;
175 } //-- void setFullname(java.lang.String)
178 * Sets the value of field 'organization'.
180 * @param organization the value of field 'organization'.
182 public void setOrganization(java.lang.String organization)
184 this._organization = organization;
185 } //-- void setOrganization(java.lang.String)
195 public static uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader reader)
196 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
198 return (uk.ac.vamsas.objects.core.User) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.User.class, reader);
199 } //-- uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader)
205 public void validate()
206 throws org.exolab.castor.xml.ValidationException
208 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
209 validator.validate(this);
210 } //-- void validate()