1
2
3
4
5
6
7
8 package org.astrogrid.workflow.beans.v1.execution;
9
10
11
12
13
14 import org.exolab.castor.mapping.AccessMode;
15 import org.exolab.castor.xml.TypeValidator;
16 import org.exolab.castor.xml.XMLFieldDescriptor;
17 import org.exolab.castor.xml.validators.*;
18
19 /***
20 * Class ExecutionRecordTypeDescriptor.
21 *
22 * @version $Revision: 1.30 $ $Date: 2007/01/04 16:26:08 $
23 */
24 public class ExecutionRecordTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
25
26
27
28
29
30
31 /***
32 * Field nsPrefix
33 */
34 private java.lang.String nsPrefix;
35
36 /***
37 * Field nsURI
38 */
39 private java.lang.String nsURI;
40
41 /***
42 * Field xmlName
43 */
44 private java.lang.String xmlName;
45
46 /***
47 * Field identity
48 */
49 private org.exolab.castor.xml.XMLFieldDescriptor identity;
50
51
52
53
54
55
56 public ExecutionRecordTypeDescriptor() {
57 super();
58 nsURI = "http://www.astrogrid.org/schema/ExecutionRecord/v1";
59 xmlName = "execution-record-type";
60
61
62 setCompositorAsSequence();
63 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
64 org.exolab.castor.xml.XMLFieldHandler handler = null;
65 org.exolab.castor.xml.FieldValidator fieldValidator = null;
66
67
68
69 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.util.Date.class, "_startTime", "startTime", org.exolab.castor.xml.NodeType.Attribute);
70 handler = (new org.exolab.castor.xml.XMLFieldHandler() {
71 public java.lang.Object getValue( java.lang.Object object )
72 throws IllegalStateException
73 {
74 ExecutionRecordType target = (ExecutionRecordType) object;
75 return target.getStartTime();
76 }
77 public void setValue( java.lang.Object object, java.lang.Object value)
78 throws IllegalStateException, IllegalArgumentException
79 {
80 try {
81 ExecutionRecordType target = (ExecutionRecordType) object;
82 target.setStartTime( (java.util.Date) value);
83 }
84 catch (java.lang.Exception ex) {
85 throw new IllegalStateException(ex.toString());
86 }
87 }
88 public java.lang.Object newInstance( java.lang.Object parent ) {
89 return new java.util.Date();
90 }
91 } );
92 desc.setHandler( new org.exolab.castor.xml.handlers.DateFieldHandler(handler));
93 desc.setImmutable(true);
94 addFieldDescriptor(desc);
95
96
97 fieldValidator = new org.exolab.castor.xml.FieldValidator();
98 {
99 }
100 desc.setValidator(fieldValidator);
101
102 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.util.Date.class, "_finishTime", "finishTime", org.exolab.castor.xml.NodeType.Attribute);
103 handler = (new org.exolab.castor.xml.XMLFieldHandler() {
104 public java.lang.Object getValue( java.lang.Object object )
105 throws IllegalStateException
106 {
107 ExecutionRecordType target = (ExecutionRecordType) object;
108 return target.getFinishTime();
109 }
110 public void setValue( java.lang.Object object, java.lang.Object value)
111 throws IllegalStateException, IllegalArgumentException
112 {
113 try {
114 ExecutionRecordType target = (ExecutionRecordType) object;
115 target.setFinishTime( (java.util.Date) value);
116 }
117 catch (java.lang.Exception ex) {
118 throw new IllegalStateException(ex.toString());
119 }
120 }
121 public java.lang.Object newInstance( java.lang.Object parent ) {
122 return new java.util.Date();
123 }
124 } );
125 desc.setHandler( new org.exolab.castor.xml.handlers.DateFieldHandler(handler));
126 desc.setImmutable(true);
127 addFieldDescriptor(desc);
128
129
130 fieldValidator = new org.exolab.castor.xml.FieldValidator();
131 {
132 }
133 desc.setValidator(fieldValidator);
134
135 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.astrogrid.applications.beans.v1.cea.castor.types.ExecutionPhase.class, "_status", "status", org.exolab.castor.xml.NodeType.Attribute);
136 handler = (new org.exolab.castor.xml.XMLFieldHandler() {
137 public java.lang.Object getValue( java.lang.Object object )
138 throws IllegalStateException
139 {
140 ExecutionRecordType target = (ExecutionRecordType) object;
141 return target.getStatus();
142 }
143 public void setValue( java.lang.Object object, java.lang.Object value)
144 throws IllegalStateException, IllegalArgumentException
145 {
146 try {
147 ExecutionRecordType target = (ExecutionRecordType) object;
148 target.setStatus( (org.astrogrid.applications.beans.v1.cea.castor.types.ExecutionPhase) value);
149 }
150 catch (java.lang.Exception ex) {
151 throw new IllegalStateException(ex.toString());
152 }
153 }
154 public java.lang.Object newInstance( java.lang.Object parent ) {
155 return null;
156 }
157 } );
158 desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(org.astrogrid.applications.beans.v1.cea.castor.types.ExecutionPhase.class, handler));
159 desc.setImmutable(true);
160 addFieldDescriptor(desc);
161
162
163 fieldValidator = new org.exolab.castor.xml.FieldValidator();
164 {
165 }
166 desc.setValidator(fieldValidator);
167
168
169
170 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.astrogrid.workflow.beans.v1.execution.Extension.class, "_extensionList", "extension", org.exolab.castor.xml.NodeType.Element);
171 handler = (new org.exolab.castor.xml.XMLFieldHandler() {
172 public java.lang.Object getValue( java.lang.Object object )
173 throws IllegalStateException
174 {
175 ExecutionRecordType target = (ExecutionRecordType) object;
176 return target.getExtension();
177 }
178 public void setValue( java.lang.Object object, java.lang.Object value)
179 throws IllegalStateException, IllegalArgumentException
180 {
181 try {
182 ExecutionRecordType target = (ExecutionRecordType) object;
183 target.addExtension( (org.astrogrid.workflow.beans.v1.execution.Extension) value);
184 }
185 catch (java.lang.Exception ex) {
186 throw new IllegalStateException(ex.toString());
187 }
188 }
189 public java.lang.Object newInstance( java.lang.Object parent ) {
190 return new org.astrogrid.workflow.beans.v1.execution.Extension();
191 }
192 } );
193 desc.setHandler(handler);
194 desc.setNameSpaceURI("http://www.astrogrid.org/schema/ExecutionRecord/v1");
195 desc.setMultivalued(true);
196 addFieldDescriptor(desc);
197
198
199 fieldValidator = new org.exolab.castor.xml.FieldValidator();
200 fieldValidator.setMinOccurs(0);
201 {
202 }
203 desc.setValidator(fieldValidator);
204
205 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.astrogrid.applications.beans.v1.cea.castor.MessageType.class, "_messageList", "message", org.exolab.castor.xml.NodeType.Element);
206 handler = (new org.exolab.castor.xml.XMLFieldHandler() {
207 public java.lang.Object getValue( java.lang.Object object )
208 throws IllegalStateException
209 {
210 ExecutionRecordType target = (ExecutionRecordType) object;
211 return target.getMessage();
212 }
213 public void setValue( java.lang.Object object, java.lang.Object value)
214 throws IllegalStateException, IllegalArgumentException
215 {
216 try {
217 ExecutionRecordType target = (ExecutionRecordType) object;
218 target.addMessage( (org.astrogrid.applications.beans.v1.cea.castor.MessageType) value);
219 }
220 catch (java.lang.Exception ex) {
221 throw new IllegalStateException(ex.toString());
222 }
223 }
224 public java.lang.Object newInstance( java.lang.Object parent ) {
225 return new org.astrogrid.applications.beans.v1.cea.castor.MessageType();
226 }
227 } );
228 desc.setHandler(handler);
229 desc.setNameSpaceURI("http://www.astrogrid.org/schema/CEATypes/v1");
230 desc.setMultivalued(true);
231 addFieldDescriptor(desc);
232
233
234 fieldValidator = new org.exolab.castor.xml.FieldValidator();
235 fieldValidator.setMinOccurs(0);
236 {
237 }
238 desc.setValidator(fieldValidator);
239 }
240
241
242
243
244
245
246 /***
247 * Method getAccessMode
248 */
249 public org.exolab.castor.mapping.AccessMode getAccessMode()
250 {
251 return null;
252 }
253
254 /***
255 * Method getExtends
256 */
257 public org.exolab.castor.mapping.ClassDescriptor getExtends()
258 {
259 return null;
260 }
261
262 /***
263 * Method getIdentity
264 */
265 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
266 {
267 return identity;
268 }
269
270 /***
271 * Method getJavaClass
272 */
273 public java.lang.Class getJavaClass()
274 {
275 return org.astrogrid.workflow.beans.v1.execution.ExecutionRecordType.class;
276 }
277
278 /***
279 * Method getNameSpacePrefix
280 */
281 public java.lang.String getNameSpacePrefix()
282 {
283 return nsPrefix;
284 }
285
286 /***
287 * Method getNameSpaceURI
288 */
289 public java.lang.String getNameSpaceURI()
290 {
291 return nsURI;
292 }
293
294 /***
295 * Method getValidator
296 */
297 public org.exolab.castor.xml.TypeValidator getValidator()
298 {
299 return this;
300 }
301
302 /***
303 * Method getXMLName
304 */
305 public java.lang.String getXMLName()
306 {
307 return xmlName;
308 }
309
310 }