latest schema.
[vamsas.git] / src / org / vamsas / objects / core / Application.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package org.vamsas.objects.core;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
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;
23
24 /**
25  * Class Application.
26  * 
27  * @version $Revision$ $Date$
28  */
29 public class Application extends org.vamsas.client.object 
30 implements java.io.Serializable
31 {
32
33
34       //--------------------------/
35      //- Class/Member Variables -/
36     //--------------------------/
37
38     /**
39      * Field _version
40      */
41     private java.lang.String _version;
42
43     /**
44      * Field _name
45      */
46     private java.lang.String _name;
47
48     /**
49      * Field _urn
50      */
51     private java.lang.String _urn;
52
53     /**
54      * Field _data
55      */
56     private java.lang.String _data;
57
58     /**
59      * Field _user
60      */
61     private org.vamsas.objects.core.User _user;
62
63
64       //----------------/
65      //- Constructors -/
66     //----------------/
67
68     public Application() 
69      {
70         super();
71     } //-- org.vamsas.objects.core.Application()
72
73
74       //-----------/
75      //- Methods -/
76     //-----------/
77
78     /**
79      * Note: hashCode() has not been overriden
80      * 
81      * @param obj
82      * @return boolean
83      */
84     public boolean equals(java.lang.Object obj)
85     {
86         if ( this == obj )
87             return true;
88         
89         if (super.equals(obj)==false)
90             return false;
91         
92         if (obj instanceof Application) {
93         
94             Application temp = (Application)obj;
95             if (this._version != null) {
96                 if (temp._version == null) return false;
97                 else if (!(this._version.equals(temp._version))) 
98                     return false;
99             }
100             else if (temp._version != null)
101                 return false;
102             if (this._name != null) {
103                 if (temp._name == null) return false;
104                 else if (!(this._name.equals(temp._name))) 
105                     return false;
106             }
107             else if (temp._name != null)
108                 return false;
109             if (this._urn != null) {
110                 if (temp._urn == null) return false;
111                 else if (!(this._urn.equals(temp._urn))) 
112                     return false;
113             }
114             else if (temp._urn != null)
115                 return false;
116             if (this._data != null) {
117                 if (temp._data == null) return false;
118                 else if (!(this._data.equals(temp._data))) 
119                     return false;
120             }
121             else if (temp._data != null)
122                 return false;
123             if (this._user != null) {
124                 if (temp._user == null) return false;
125                 else if (!(this._user.equals(temp._user))) 
126                     return false;
127             }
128             else if (temp._user != null)
129                 return false;
130             return true;
131         }
132         return false;
133     } //-- boolean equals(java.lang.Object) 
134
135     /**
136      * Returns the value of field 'data'.
137      * 
138      * @return String
139      * @return the value of field 'data'.
140      */
141     public java.lang.String getData()
142     {
143         return this._data;
144     } //-- java.lang.String getData() 
145
146     /**
147      * Returns the value of field 'name'.
148      * 
149      * @return String
150      * @return the value of field 'name'.
151      */
152     public java.lang.String getName()
153     {
154         return this._name;
155     } //-- java.lang.String getName() 
156
157     /**
158      * Returns the value of field 'urn'.
159      * 
160      * @return String
161      * @return the value of field 'urn'.
162      */
163     public java.lang.String getUrn()
164     {
165         return this._urn;
166     } //-- java.lang.String getUrn() 
167
168     /**
169      * Returns the value of field 'user'.
170      * 
171      * @return User
172      * @return the value of field 'user'.
173      */
174     public org.vamsas.objects.core.User getUser()
175     {
176         return this._user;
177     } //-- org.vamsas.objects.core.User getUser() 
178
179     /**
180      * Returns the value of field 'version'.
181      * 
182      * @return String
183      * @return the value of field 'version'.
184      */
185     public java.lang.String getVersion()
186     {
187         return this._version;
188     } //-- java.lang.String getVersion() 
189
190     /**
191      * Method isValid
192      * 
193      * 
194      * 
195      * @return boolean
196      */
197     public boolean isValid()
198     {
199         try {
200             validate();
201         }
202         catch (org.exolab.castor.xml.ValidationException vex) {
203             return false;
204         }
205         return true;
206     } //-- boolean isValid() 
207
208     /**
209      * Method marshal
210      * 
211      * 
212      * 
213      * @param out
214      */
215     public void marshal(java.io.Writer out)
216         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
217     {
218         
219         Marshaller.marshal(this, out);
220     } //-- void marshal(java.io.Writer) 
221
222     /**
223      * Method marshal
224      * 
225      * 
226      * 
227      * @param handler
228      */
229     public void marshal(org.xml.sax.ContentHandler handler)
230         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
231     {
232         
233         Marshaller.marshal(this, handler);
234     } //-- void marshal(org.xml.sax.ContentHandler) 
235
236     /**
237      * Sets the value of field 'data'.
238      * 
239      * @param data the value of field 'data'.
240      */
241     public void setData(java.lang.String data)
242     {
243         this._data = data;
244     } //-- void setData(java.lang.String) 
245
246     /**
247      * Sets the value of field 'name'.
248      * 
249      * @param name the value of field 'name'.
250      */
251     public void setName(java.lang.String name)
252     {
253         this._name = name;
254     } //-- void setName(java.lang.String) 
255
256     /**
257      * Sets the value of field 'urn'.
258      * 
259      * @param urn the value of field 'urn'.
260      */
261     public void setUrn(java.lang.String urn)
262     {
263         this._urn = urn;
264     } //-- void setUrn(java.lang.String) 
265
266     /**
267      * Sets the value of field 'user'.
268      * 
269      * @param user the value of field 'user'.
270      */
271     public void setUser(org.vamsas.objects.core.User user)
272     {
273         this._user = user;
274     } //-- void setUser(org.vamsas.objects.core.User) 
275
276     /**
277      * Sets the value of field 'version'.
278      * 
279      * @param version the value of field 'version'.
280      */
281     public void setVersion(java.lang.String version)
282     {
283         this._version = version;
284     } //-- void setVersion(java.lang.String) 
285
286     /**
287      * Method unmarshal
288      * 
289      * 
290      * 
291      * @param reader
292      * @return Application
293      */
294     public static org.vamsas.objects.core.Application unmarshal(java.io.Reader reader)
295         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
296     {
297         return (org.vamsas.objects.core.Application) Unmarshaller.unmarshal(org.vamsas.objects.core.Application.class, reader);
298     } //-- org.vamsas.objects.core.Application unmarshal(java.io.Reader) 
299
300     /**
301      * Method validate
302      * 
303      */
304     public void validate()
305         throws org.exolab.castor.xml.ValidationException
306     {
307         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
308         validator.validate(this);
309     } //-- void validate() 
310
311 }