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.TestDescriptorChoice;
15
16
17
18
19
20
21 public class TestDescriptorChoiceDescriptor 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 TestDescriptorChoiceDescriptor() {
59 super();
60 _nsURI = "http://castor.exolab.org/Test";
61 _elementDefinition = false;
62
63
64 setCompositorAsChoice();
65 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
66 org.exolab.castor.mapping.FieldHandler handler = null;
67 org.exolab.castor.xml.FieldValidator fieldValidator = null;
68
69
70
71
72
73 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.tests.framework.testDescriptor.SourceGeneratorTest.class, "_sourceGeneratorTest", "SourceGeneratorTest", org.exolab.castor.xml.NodeType.Element);
74 handler = new org.exolab.castor.xml.XMLFieldHandler() {
75 public java.lang.Object getValue( java.lang.Object object )
76 throws IllegalStateException
77 {
78 TestDescriptorChoice target = (TestDescriptorChoice) object;
79 return target.getSourceGeneratorTest();
80 }
81 public void setValue( java.lang.Object object, java.lang.Object value)
82 throws IllegalStateException, IllegalArgumentException
83 {
84 try {
85 TestDescriptorChoice target = (TestDescriptorChoice) object;
86 target.setSourceGeneratorTest( (org.exolab.castor.tests.framework.testDescriptor.SourceGeneratorTest) value);
87 } catch (java.lang.Exception ex) {
88 throw new IllegalStateException(ex.toString());
89 }
90 }
91 public java.lang.Object newInstance(java.lang.Object parent) {
92 return new org.exolab.castor.tests.framework.testDescriptor.SourceGeneratorTest();
93 }
94 };
95 desc.setSchemaType("org.exolab.castor.tests.framework.testDescriptor.SourceGeneratorTest");
96 desc.setHandler(handler);
97 desc.setNameSpaceURI("http://castor.exolab.org/Test");
98 desc.setMultivalued(false);
99 addFieldDescriptor(desc);
100 addSequenceElement(desc);
101
102
103 fieldValidator = new org.exolab.castor.xml.FieldValidator();
104 {
105 }
106 desc.setValidator(fieldValidator);
107
108 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.tests.framework.testDescriptor.MarshallingTest.class, "_marshallingTest", "MarshallingTest", org.exolab.castor.xml.NodeType.Element);
109 handler = new org.exolab.castor.xml.XMLFieldHandler() {
110 public java.lang.Object getValue( java.lang.Object object )
111 throws IllegalStateException
112 {
113 TestDescriptorChoice target = (TestDescriptorChoice) object;
114 return target.getMarshallingTest();
115 }
116 public void setValue( java.lang.Object object, java.lang.Object value)
117 throws IllegalStateException, IllegalArgumentException
118 {
119 try {
120 TestDescriptorChoice target = (TestDescriptorChoice) object;
121 target.setMarshallingTest( (org.exolab.castor.tests.framework.testDescriptor.MarshallingTest) value);
122 } catch (java.lang.Exception ex) {
123 throw new IllegalStateException(ex.toString());
124 }
125 }
126 public java.lang.Object newInstance(java.lang.Object parent) {
127 return new org.exolab.castor.tests.framework.testDescriptor.MarshallingTest();
128 }
129 };
130 desc.setSchemaType("org.exolab.castor.tests.framework.testDescriptor.MarshallingTest");
131 desc.setHandler(handler);
132 desc.setNameSpaceURI("http://castor.exolab.org/Test");
133 desc.setMultivalued(false);
134 addFieldDescriptor(desc);
135 addSequenceElement(desc);
136
137
138 fieldValidator = new org.exolab.castor.xml.FieldValidator();
139 {
140 }
141 desc.setValidator(fieldValidator);
142
143 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.tests.framework.testDescriptor.SchemaTest.class, "_schemaTest", "SchemaTest", org.exolab.castor.xml.NodeType.Element);
144 handler = new org.exolab.castor.xml.XMLFieldHandler() {
145 public java.lang.Object getValue( java.lang.Object object )
146 throws IllegalStateException
147 {
148 TestDescriptorChoice target = (TestDescriptorChoice) object;
149 return target.getSchemaTest();
150 }
151 public void setValue( java.lang.Object object, java.lang.Object value)
152 throws IllegalStateException, IllegalArgumentException
153 {
154 try {
155 TestDescriptorChoice target = (TestDescriptorChoice) object;
156 target.setSchemaTest( (org.exolab.castor.tests.framework.testDescriptor.SchemaTest) value);
157 } catch (java.lang.Exception ex) {
158 throw new IllegalStateException(ex.toString());
159 }
160 }
161 public java.lang.Object newInstance(java.lang.Object parent) {
162 return new org.exolab.castor.tests.framework.testDescriptor.SchemaTest();
163 }
164 };
165 desc.setSchemaType("org.exolab.castor.tests.framework.testDescriptor.SchemaTest");
166 desc.setHandler(handler);
167 desc.setNameSpaceURI("http://castor.exolab.org/Test");
168 desc.setMultivalued(false);
169 addFieldDescriptor(desc);
170 addSequenceElement(desc);
171
172
173 fieldValidator = new org.exolab.castor.xml.FieldValidator();
174 {
175 }
176 desc.setValidator(fieldValidator);
177
178 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest.class, "_onlySourceGenerationTest", "OnlySourceGenerationTest", org.exolab.castor.xml.NodeType.Element);
179 handler = new org.exolab.castor.xml.XMLFieldHandler() {
180 public java.lang.Object getValue( java.lang.Object object )
181 throws IllegalStateException
182 {
183 TestDescriptorChoice target = (TestDescriptorChoice) object;
184 return target.getOnlySourceGenerationTest();
185 }
186 public void setValue( java.lang.Object object, java.lang.Object value)
187 throws IllegalStateException, IllegalArgumentException
188 {
189 try {
190 TestDescriptorChoice target = (TestDescriptorChoice) object;
191 target.setOnlySourceGenerationTest( (org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest) value);
192 } catch (java.lang.Exception ex) {
193 throw new IllegalStateException(ex.toString());
194 }
195 }
196 public java.lang.Object newInstance(java.lang.Object parent) {
197 return new org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest();
198 }
199 };
200 desc.setSchemaType("org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest");
201 desc.setHandler(handler);
202 desc.setNameSpaceURI("http://castor.exolab.org/Test");
203 desc.setMultivalued(false);
204 addFieldDescriptor(desc);
205 addSequenceElement(desc);
206
207
208 fieldValidator = new org.exolab.castor.xml.FieldValidator();
209 {
210 }
211 desc.setValidator(fieldValidator);
212 }
213
214
215
216
217
218
219
220
221
222
223
224 public org.exolab.castor.mapping.AccessMode getAccessMode(
225 ) {
226 return null;
227 }
228
229
230
231
232
233
234
235 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
236 ) {
237 return _identity;
238 }
239
240
241
242
243
244
245 public java.lang.Class getJavaClass(
246 ) {
247 return org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice.class;
248 }
249
250
251
252
253
254
255 public java.lang.String getNameSpacePrefix(
256 ) {
257 return _nsPrefix;
258 }
259
260
261
262
263
264
265
266 public java.lang.String getNameSpaceURI(
267 ) {
268 return _nsURI;
269 }
270
271
272
273
274
275
276
277 public org.exolab.castor.xml.TypeValidator getValidator(
278 ) {
279 return this;
280 }
281
282
283
284
285
286
287 public java.lang.String getXMLName(
288 ) {
289 return _xmlName;
290 }
291
292
293
294
295
296
297
298
299 public boolean isElementDefinition(
300 ) {
301 return _elementDefinition;
302 }
303
304 }