1
2
3
4
5
6
7
8 package org.exolab.castor.tests.framework.testDescriptor.descriptors;
9
10
11
12
13
14 import org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest;
15
16
17
18
19
20
21 public class OnlySourceGenerationTestDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
22
23
24
25
26
27
28
29
30
31 private boolean _elementDefinition;
32
33
34
35
36 private java.lang.String _nsPrefix;
37
38
39
40
41 private java.lang.String _nsURI;
42
43
44
45
46 private java.lang.String _xmlName;
47
48
49
50
51 private org.exolab.castor.xml.XMLFieldDescriptor _identity;
52
53
54
55
56
57
58 public OnlySourceGenerationTestDescriptor() {
59 super();
60 _nsURI = "http://castor.exolab.org/Test";
61 _xmlName = "OnlySourceGenerationTest";
62 _elementDefinition = true;
63
64
65 setCompositorAsSequence();
66 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
67 org.exolab.castor.mapping.FieldHandler handler = null;
68 org.exolab.castor.xml.FieldValidator fieldValidator = null;
69
70
71
72
73
74 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_schemaList", "Schema", org.exolab.castor.xml.NodeType.Element);
75 desc.setImmutable(true);
76 handler = new org.exolab.castor.xml.XMLFieldHandler() {
77 public java.lang.Object getValue( java.lang.Object object )
78 throws IllegalStateException
79 {
80 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
81 return target.getSchema();
82 }
83 public void setValue( java.lang.Object object, java.lang.Object value)
84 throws IllegalStateException, IllegalArgumentException
85 {
86 try {
87 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
88 target.addSchema( (java.lang.String) value);
89 } catch (java.lang.Exception ex) {
90 throw new IllegalStateException(ex.toString());
91 }
92 }
93 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
94 try {
95 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
96 target.removeAllSchema();
97 } catch (java.lang.Exception ex) {
98 throw new IllegalStateException(ex.toString());
99 }
100 }
101 public java.lang.Object newInstance(java.lang.Object parent) {
102 return null;
103 }
104 };
105 desc.setSchemaType("list");
106 desc.setComponentType("string");
107 desc.setHandler(handler);
108 desc.setNameSpaceURI("http://castor.exolab.org/Test");
109 desc.setRequired(true);
110 desc.setMultivalued(true);
111 addFieldDescriptor(desc);
112 addSequenceElement(desc);
113
114
115 fieldValidator = new org.exolab.castor.xml.FieldValidator();
116 fieldValidator.setMinOccurs(1);
117 {
118 org.exolab.castor.xml.validators.StringValidator typeValidator;
119 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
120 fieldValidator.setValidator(typeValidator);
121 typeValidator.setWhiteSpace("preserve");
122 }
123 desc.setValidator(fieldValidator);
124
125 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_property_File", "Property_File", org.exolab.castor.xml.NodeType.Element);
126 desc.setImmutable(true);
127 handler = new org.exolab.castor.xml.XMLFieldHandler() {
128 public java.lang.Object getValue( java.lang.Object object )
129 throws IllegalStateException
130 {
131 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
132 return target.getProperty_File();
133 }
134 public void setValue( java.lang.Object object, java.lang.Object value)
135 throws IllegalStateException, IllegalArgumentException
136 {
137 try {
138 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
139 target.setProperty_File( (java.lang.String) value);
140 } catch (java.lang.Exception ex) {
141 throw new IllegalStateException(ex.toString());
142 }
143 }
144 public java.lang.Object newInstance(java.lang.Object parent) {
145 return null;
146 }
147 };
148 desc.setSchemaType("string");
149 desc.setHandler(handler);
150 desc.setNameSpaceURI("http://castor.exolab.org/Test");
151 desc.setMultivalued(false);
152 addFieldDescriptor(desc);
153 addSequenceElement(desc);
154
155
156 fieldValidator = new org.exolab.castor.xml.FieldValidator();
157 {
158 org.exolab.castor.xml.validators.StringValidator typeValidator;
159 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
160 fieldValidator.setValidator(typeValidator);
161 typeValidator.setWhiteSpace("preserve");
162 }
163 desc.setValidator(fieldValidator);
164
165 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.tests.framework.testDescriptor.types.CollectionType.class, "_collection", "Collection", org.exolab.castor.xml.NodeType.Element);
166 handler = new org.exolab.castor.xml.XMLFieldHandler() {
167 public java.lang.Object getValue( java.lang.Object object )
168 throws IllegalStateException
169 {
170 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
171 return target.getCollection();
172 }
173 public void setValue( java.lang.Object object, java.lang.Object value)
174 throws IllegalStateException, IllegalArgumentException
175 {
176 try {
177 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
178 target.setCollection( (org.exolab.castor.tests.framework.testDescriptor.types.CollectionType) value);
179 } catch (java.lang.Exception ex) {
180 throw new IllegalStateException(ex.toString());
181 }
182 }
183 public java.lang.Object newInstance(java.lang.Object parent) {
184 return null;
185 }
186 };
187 handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(org.exolab.castor.tests.framework.testDescriptor.types.CollectionType.class, handler);
188 desc.setImmutable(true);
189 desc.setSchemaType("CollectionType");
190 desc.setHandler(handler);
191 desc.setNameSpaceURI("http://castor.exolab.org/Test");
192 desc.setMultivalued(false);
193 addFieldDescriptor(desc);
194 addSequenceElement(desc);
195
196
197 fieldValidator = new org.exolab.castor.xml.FieldValidator();
198 {
199 }
200 desc.setValidator(fieldValidator);
201
202 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_bindingFile", "BindingFile", org.exolab.castor.xml.NodeType.Element);
203 desc.setImmutable(true);
204 handler = new org.exolab.castor.xml.XMLFieldHandler() {
205 public java.lang.Object getValue( java.lang.Object object )
206 throws IllegalStateException
207 {
208 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
209 return target.getBindingFile();
210 }
211 public void setValue( java.lang.Object object, java.lang.Object value)
212 throws IllegalStateException, IllegalArgumentException
213 {
214 try {
215 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
216 target.setBindingFile( (java.lang.String) value);
217 } catch (java.lang.Exception ex) {
218 throw new IllegalStateException(ex.toString());
219 }
220 }
221 public java.lang.Object newInstance(java.lang.Object parent) {
222 return null;
223 }
224 };
225 desc.setSchemaType("string");
226 desc.setHandler(handler);
227 desc.setNameSpaceURI("http://castor.exolab.org/Test");
228 desc.setMultivalued(false);
229 addFieldDescriptor(desc);
230 addSequenceElement(desc);
231
232
233 fieldValidator = new org.exolab.castor.xml.FieldValidator();
234 {
235 org.exolab.castor.xml.validators.StringValidator typeValidator;
236 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
237 fieldValidator.setValidator(typeValidator);
238 typeValidator.setWhiteSpace("preserve");
239 }
240 desc.setValidator(fieldValidator);
241
242 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_package", "Package", org.exolab.castor.xml.NodeType.Element);
243 desc.setImmutable(true);
244 handler = new org.exolab.castor.xml.XMLFieldHandler() {
245 public java.lang.Object getValue( java.lang.Object object )
246 throws IllegalStateException
247 {
248 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
249 return target.getPackage();
250 }
251 public void setValue( java.lang.Object object, java.lang.Object value)
252 throws IllegalStateException, IllegalArgumentException
253 {
254 try {
255 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
256 target.setPackage( (java.lang.String) value);
257 } catch (java.lang.Exception ex) {
258 throw new IllegalStateException(ex.toString());
259 }
260 }
261 public java.lang.Object newInstance(java.lang.Object parent) {
262 return null;
263 }
264 };
265 desc.setSchemaType("string");
266 desc.setHandler(handler);
267 desc.setNameSpaceURI("http://castor.exolab.org/Test");
268 desc.setMultivalued(false);
269 addFieldDescriptor(desc);
270 addSequenceElement(desc);
271
272
273 fieldValidator = new org.exolab.castor.xml.FieldValidator();
274 {
275 org.exolab.castor.xml.validators.StringValidator typeValidator;
276 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
277 fieldValidator.setValidator(typeValidator);
278 typeValidator.setWhiteSpace("preserve");
279 }
280 desc.setValidator(fieldValidator);
281
282 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.tests.framework.testDescriptor.UnitTestCase.class, "_unitTestCaseList", "UnitTestCase", org.exolab.castor.xml.NodeType.Element);
283 handler = new org.exolab.castor.xml.XMLFieldHandler() {
284 public java.lang.Object getValue( java.lang.Object object )
285 throws IllegalStateException
286 {
287 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
288 return target.getUnitTestCase();
289 }
290 public void setValue( java.lang.Object object, java.lang.Object value)
291 throws IllegalStateException, IllegalArgumentException
292 {
293 try {
294 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
295 target.addUnitTestCase( (org.exolab.castor.tests.framework.testDescriptor.UnitTestCase) value);
296 } catch (java.lang.Exception ex) {
297 throw new IllegalStateException(ex.toString());
298 }
299 }
300 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
301 try {
302 OnlySourceGenerationTest target = (OnlySourceGenerationTest) object;
303 target.removeAllUnitTestCase();
304 } catch (java.lang.Exception ex) {
305 throw new IllegalStateException(ex.toString());
306 }
307 }
308 public java.lang.Object newInstance(java.lang.Object parent) {
309 return new org.exolab.castor.tests.framework.testDescriptor.UnitTestCase();
310 }
311 };
312 desc.setSchemaType("list");
313 desc.setComponentType("org.exolab.castor.tests.framework.testDescriptor.UnitTestCase");
314 desc.setHandler(handler);
315 desc.setNameSpaceURI("http://castor.exolab.org/Test");
316 desc.setRequired(true);
317 desc.setMultivalued(true);
318 addFieldDescriptor(desc);
319 addSequenceElement(desc);
320
321
322 fieldValidator = new org.exolab.castor.xml.FieldValidator();
323 fieldValidator.setMinOccurs(1);
324 {
325 }
326 desc.setValidator(fieldValidator);
327 }
328
329
330
331
332
333
334
335
336
337
338
339 public org.exolab.castor.mapping.AccessMode getAccessMode(
340 ) {
341 return null;
342 }
343
344
345
346
347
348
349
350 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
351 ) {
352 return _identity;
353 }
354
355
356
357
358
359
360 public java.lang.Class getJavaClass(
361 ) {
362 return org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest.class;
363 }
364
365
366
367
368
369
370 public java.lang.String getNameSpacePrefix(
371 ) {
372 return _nsPrefix;
373 }
374
375
376
377
378
379
380
381 public java.lang.String getNameSpaceURI(
382 ) {
383 return _nsURI;
384 }
385
386
387
388
389
390
391
392 public org.exolab.castor.xml.TypeValidator getValidator(
393 ) {
394 return this;
395 }
396
397
398
399
400
401
402 public java.lang.String getXMLName(
403 ) {
404 return _xmlName;
405 }
406
407
408
409
410
411
412
413
414 public boolean isElementDefinition(
415 ) {
416 return _elementDefinition;
417 }
418
419 }