1
2
3
4
5
6
7
8 package org.astrogrid.registry.beans.v10.cea;
9
10
11
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.astrogrid.applications.beans.v1.InterfacesType;
19 import org.astrogrid.applications.beans.v1.types.ApplicationKindType;
20 import org.exolab.castor.xml.MarshalException;
21 import org.exolab.castor.xml.Marshaller;
22 import org.exolab.castor.xml.Unmarshaller;
23 import org.exolab.castor.xml.ValidationException;
24 import org.xml.sax.ContentHandler;
25
26 /***
27 * Class ApplicationDefinition.
28 *
29 * @version $Revision: 1.2 $ $Date: 2007/01/04 16:26:31 $
30 */
31 public class ApplicationDefinition extends org.astrogrid.common.bean.BaseBean
32 implements java.io.Serializable
33 {
34
35
36
37
38
39
40 /***
41 * Field _applicationKind
42 */
43 private org.astrogrid.applications.beans.v1.types.ApplicationKindType _applicationKind;
44
45 /***
46 * Field _parameters
47 */
48 private org.astrogrid.registry.beans.v10.cea.Parameters _parameters;
49
50 /***
51 * Field _interfaces
52 */
53 private org.astrogrid.applications.beans.v1.InterfacesType _interfaces;
54
55
56
57
58
59
60 public ApplicationDefinition() {
61 super();
62 }
63
64
65
66
67
68
69 /***
70 * Note: hashCode() has not been overriden
71 *
72 * @param obj
73 */
74 public boolean equals(java.lang.Object obj)
75 {
76 if ( this == obj )
77 return true;
78
79 if (super.equals(obj)==false)
80 return false;
81
82 if (obj instanceof ApplicationDefinition) {
83
84 ApplicationDefinition temp = (ApplicationDefinition)obj;
85 if (this._applicationKind != null) {
86 if (temp._applicationKind == null) return false;
87 else if (!(this._applicationKind.equals(temp._applicationKind)))
88 return false;
89 }
90 else if (temp._applicationKind != null)
91 return false;
92 if (this._parameters != null) {
93 if (temp._parameters == null) return false;
94 else if (!(this._parameters.equals(temp._parameters)))
95 return false;
96 }
97 else if (temp._parameters != null)
98 return false;
99 if (this._interfaces != null) {
100 if (temp._interfaces == null) return false;
101 else if (!(this._interfaces.equals(temp._interfaces)))
102 return false;
103 }
104 else if (temp._interfaces != null)
105 return false;
106 return true;
107 }
108 return false;
109 }
110
111 /***
112 * Returns the value of field 'applicationKind'.
113 *
114 * @return the value of field 'applicationKind'.
115 */
116 public org.astrogrid.applications.beans.v1.types.ApplicationKindType getApplicationKind()
117 {
118 return this._applicationKind;
119 }
120
121 /***
122 * Returns the value of field 'interfaces'.
123 *
124 * @return the value of field 'interfaces'.
125 */
126 public org.astrogrid.applications.beans.v1.InterfacesType getInterfaces()
127 {
128 return this._interfaces;
129 }
130
131 /***
132 * Returns the value of field 'parameters'.
133 *
134 * @return the value of field 'parameters'.
135 */
136 public org.astrogrid.registry.beans.v10.cea.Parameters getParameters()
137 {
138 return this._parameters;
139 }
140
141 /***
142 * Method isValid
143 */
144 public boolean isValid()
145 {
146 try {
147 validate();
148 }
149 catch (org.exolab.castor.xml.ValidationException vex) {
150 return false;
151 }
152 return true;
153 }
154
155 /***
156 * Method marshal
157 *
158 * @param out
159 */
160 public void marshal(java.io.Writer out)
161 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
162 {
163
164 Marshaller.marshal(this, out);
165 }
166
167 /***
168 * Method marshal
169 *
170 * @param handler
171 */
172 public void marshal(org.xml.sax.ContentHandler handler)
173 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
174 {
175
176 Marshaller.marshal(this, handler);
177 }
178
179 /***
180 * Sets the value of field 'applicationKind'.
181 *
182 * @param applicationKind the value of field 'applicationKind'.
183 */
184 public void setApplicationKind(org.astrogrid.applications.beans.v1.types.ApplicationKindType applicationKind)
185 {
186 this._applicationKind = applicationKind;
187 }
188
189 /***
190 * Sets the value of field 'interfaces'.
191 *
192 * @param interfaces the value of field 'interfaces'.
193 */
194 public void setInterfaces(org.astrogrid.applications.beans.v1.InterfacesType interfaces)
195 {
196 this._interfaces = interfaces;
197 }
198
199 /***
200 * Sets the value of field 'parameters'.
201 *
202 * @param parameters the value of field 'parameters'.
203 */
204 public void setParameters(org.astrogrid.registry.beans.v10.cea.Parameters parameters)
205 {
206 this._parameters = parameters;
207 }
208
209 /***
210 * Method unmarshalApplicationDefinition
211 *
212 * @param reader
213 */
214 public static org.astrogrid.registry.beans.v10.cea.ApplicationDefinition unmarshalApplicationDefinition(java.io.Reader reader)
215 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
216 {
217 return (org.astrogrid.registry.beans.v10.cea.ApplicationDefinition) Unmarshaller.unmarshal(org.astrogrid.registry.beans.v10.cea.ApplicationDefinition.class, reader);
218 }
219
220 /***
221 * Method validate
222 */
223 public void validate()
224 throws org.exolab.castor.xml.ValidationException
225 {
226 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
227 validator.validate(this);
228 }
229
230 }