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.Configuration;
15
16
17
18
19
20
21 public class ConfigurationDescriptor 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 ConfigurationDescriptor() {
59 super();
60 _nsURI = "http://castor.exolab.org/Test";
61 _xmlName = "Configuration";
62 _elementDefinition = true;
63
64
65 setCompositorAsChoice();
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(org.exolab.castor.tests.framework.testDescriptor.Marshal.class, "_marshal", "Marshal", org.exolab.castor.xml.NodeType.Element);
75 handler = new org.exolab.castor.xml.XMLFieldHandler() {
76 public java.lang.Object getValue( java.lang.Object object )
77 throws IllegalStateException
78 {
79 Configuration target = (Configuration) object;
80 return target.getMarshal();
81 }
82 public void setValue( java.lang.Object object, java.lang.Object value)
83 throws IllegalStateException, IllegalArgumentException
84 {
85 try {
86 Configuration target = (Configuration) object;
87 target.setMarshal( (org.exolab.castor.tests.framework.testDescriptor.Marshal) value);
88 } catch (java.lang.Exception ex) {
89 throw new IllegalStateException(ex.toString());
90 }
91 }
92 public java.lang.Object newInstance(java.lang.Object parent) {
93 return new org.exolab.castor.tests.framework.testDescriptor.Marshal();
94 }
95 };
96 desc.setSchemaType("org.exolab.castor.tests.framework.testDescriptor.Marshal");
97 desc.setHandler(handler);
98 desc.setNameSpaceURI("http://castor.exolab.org/Test");
99 desc.setRequired(true);
100 desc.setMultivalued(false);
101 addFieldDescriptor(desc);
102 addSequenceElement(desc);
103
104
105 fieldValidator = new org.exolab.castor.xml.FieldValidator();
106 fieldValidator.setMinOccurs(1);
107 {
108 }
109 desc.setValidator(fieldValidator);
110
111 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.tests.framework.testDescriptor.Unmarshal.class, "_unmarshal", "Unmarshal", org.exolab.castor.xml.NodeType.Element);
112 handler = new org.exolab.castor.xml.XMLFieldHandler() {
113 public java.lang.Object getValue( java.lang.Object object )
114 throws IllegalStateException
115 {
116 Configuration target = (Configuration) object;
117 return target.getUnmarshal();
118 }
119 public void setValue( java.lang.Object object, java.lang.Object value)
120 throws IllegalStateException, IllegalArgumentException
121 {
122 try {
123 Configuration target = (Configuration) object;
124 target.setUnmarshal( (org.exolab.castor.tests.framework.testDescriptor.Unmarshal) value);
125 } catch (java.lang.Exception ex) {
126 throw new IllegalStateException(ex.toString());
127 }
128 }
129 public java.lang.Object newInstance(java.lang.Object parent) {
130 return new org.exolab.castor.tests.framework.testDescriptor.Unmarshal();
131 }
132 };
133 desc.setSchemaType("org.exolab.castor.tests.framework.testDescriptor.Unmarshal");
134 desc.setHandler(handler);
135 desc.setNameSpaceURI("http://castor.exolab.org/Test");
136 desc.setRequired(true);
137 desc.setMultivalued(false);
138 addFieldDescriptor(desc);
139 addSequenceElement(desc);
140
141
142 fieldValidator = new org.exolab.castor.xml.FieldValidator();
143 fieldValidator.setMinOccurs(1);
144 {
145 }
146 desc.setValidator(fieldValidator);
147 }
148
149
150
151
152
153
154
155
156
157
158
159 public org.exolab.castor.mapping.AccessMode getAccessMode(
160 ) {
161 return null;
162 }
163
164
165
166
167
168
169
170 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
171 ) {
172 return _identity;
173 }
174
175
176
177
178
179
180 public java.lang.Class getJavaClass(
181 ) {
182 return org.exolab.castor.tests.framework.testDescriptor.Configuration.class;
183 }
184
185
186
187
188
189
190 public java.lang.String getNameSpacePrefix(
191 ) {
192 return _nsPrefix;
193 }
194
195
196
197
198
199
200
201 public java.lang.String getNameSpaceURI(
202 ) {
203 return _nsURI;
204 }
205
206
207
208
209
210
211
212 public org.exolab.castor.xml.TypeValidator getValidator(
213 ) {
214 return this;
215 }
216
217
218
219
220
221
222 public java.lang.String getXMLName(
223 ) {
224 return _xmlName;
225 }
226
227
228
229
230
231
232
233
234 public boolean isElementDefinition(
235 ) {
236 return _elementDefinition;
237 }
238
239 }