1 /*
2 * This class was automatically generated with
3 * <a href="http://castor.exolab.org">Castor 0.9.4</a>, using an
4 * XML Schema.
5 * $Id$
6 */
7
8 package org.enableit.db.beans;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.mapping.AccessMode;
15 import org.exolab.castor.mapping.ClassDescriptor;
16 import org.exolab.castor.mapping.FieldDescriptor;
17 import org.exolab.castor.xml.*;
18 import org.exolab.castor.xml.FieldValidator;
19 import org.exolab.castor.xml.TypeValidator;
20 import org.exolab.castor.xml.XMLFieldDescriptor;
21 import org.exolab.castor.xml.handlers.*;
22 import org.exolab.castor.xml.util.XMLFieldDescriptorImpl;
23 import org.exolab.castor.xml.validators.*;
24
25 /***
26 *
27 *
28 * @version $Revision$ $Date$
29 **/
30 public class ProviderDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
31
32
33 //--------------------------/
34 //- Class/Member Variables -/
35 //--------------------------/
36
37 private java.lang.String nsPrefix;
38
39 private java.lang.String nsURI;
40
41 private java.lang.String xmlName;
42
43 private org.exolab.castor.xml.XMLFieldDescriptor identity;
44
45
46 //----------------/
47 //- Constructors -/
48 //----------------/
49
50 public ProviderDescriptor() {
51 super();
52 nsURI = "http://darrt.sourceforge.net/schemas/darrt";
53 xmlName = "provider";
54
55 //-- set grouping compositor
56 setCompositorAsSequence();
57 XMLFieldDescriptorImpl desc = null;
58 XMLFieldHandler handler = null;
59 FieldValidator fieldValidator = null;
60 //-- initialize attribute descriptors
61
62 //-- initialize element descriptors
63
64 //-- _name
65 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", NodeType.Element);
66 desc.setImmutable(true);
67 handler = (new XMLFieldHandler() {
68 public java.lang.Object getValue( java.lang.Object object )
69 throws IllegalStateException
70 {
71 Provider target = (Provider) object;
72 return target.getName();
73 }
74 public void setValue( java.lang.Object object, java.lang.Object value)
75 throws IllegalStateException, IllegalArgumentException
76 {
77 try {
78 Provider target = (Provider) object;
79 target.setName( (java.lang.String) value);
80 }
81 catch (Exception ex) {
82 throw new IllegalStateException(ex.toString());
83 }
84 }
85 public java.lang.Object newInstance( java.lang.Object parent ) {
86 return null;
87 }
88 } );
89 desc.setHandler(handler);
90 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
91 desc.setMultivalued(false);
92 addFieldDescriptor(desc);
93
94 //-- validation code for: _name
95 fieldValidator = new FieldValidator();
96 { //-- local scope
97 StringValidator typeValidator = new StringValidator();
98 typeValidator.setWhiteSpace("preserve");
99 fieldValidator.setValidator(typeValidator);
100 }
101 desc.setValidator(fieldValidator);
102 //-- _productName
103 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_productName", "product-name", NodeType.Element);
104 desc.setImmutable(true);
105 handler = (new XMLFieldHandler() {
106 public java.lang.Object getValue( java.lang.Object object )
107 throws IllegalStateException
108 {
109 Provider target = (Provider) object;
110 return target.getProductName();
111 }
112 public void setValue( java.lang.Object object, java.lang.Object value)
113 throws IllegalStateException, IllegalArgumentException
114 {
115 try {
116 Provider target = (Provider) object;
117 target.setProductName( (java.lang.String) value);
118 }
119 catch (Exception ex) {
120 throw new IllegalStateException(ex.toString());
121 }
122 }
123 public java.lang.Object newInstance( java.lang.Object parent ) {
124 return null;
125 }
126 } );
127 desc.setHandler(handler);
128 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
129 desc.setMultivalued(false);
130 addFieldDescriptor(desc);
131
132 //-- validation code for: _productName
133 fieldValidator = new FieldValidator();
134 { //-- local scope
135 StringValidator typeValidator = new StringValidator();
136 typeValidator.setWhiteSpace("preserve");
137 fieldValidator.setValidator(typeValidator);
138 }
139 desc.setValidator(fieldValidator);
140 //-- _version
141 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_version", "version", NodeType.Element);
142 desc.setImmutable(true);
143 handler = (new XMLFieldHandler() {
144 public java.lang.Object getValue( java.lang.Object object )
145 throws IllegalStateException
146 {
147 Provider target = (Provider) object;
148 return target.getVersion();
149 }
150 public void setValue( java.lang.Object object, java.lang.Object value)
151 throws IllegalStateException, IllegalArgumentException
152 {
153 try {
154 Provider target = (Provider) object;
155 target.setVersion( (java.lang.String) value);
156 }
157 catch (Exception ex) {
158 throw new IllegalStateException(ex.toString());
159 }
160 }
161 public java.lang.Object newInstance( java.lang.Object parent ) {
162 return null;
163 }
164 } );
165 desc.setHandler(handler);
166 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
167 desc.setMultivalued(false);
168 addFieldDescriptor(desc);
169
170 //-- validation code for: _version
171 fieldValidator = new FieldValidator();
172 { //-- local scope
173 StringValidator typeValidator = new StringValidator();
174 typeValidator.setWhiteSpace("preserve");
175 fieldValidator.setValidator(typeValidator);
176 }
177 desc.setValidator(fieldValidator);
178 //-- _providerChoice
179 desc = new XMLFieldDescriptorImpl(ProviderChoice.class, "_providerChoice", "-error-if-this-is-used-", NodeType.Element);
180 handler = (new XMLFieldHandler() {
181 public java.lang.Object getValue( java.lang.Object object )
182 throws IllegalStateException
183 {
184 Provider target = (Provider) object;
185 return target.getProviderChoice();
186 }
187 public void setValue( java.lang.Object object, java.lang.Object value)
188 throws IllegalStateException, IllegalArgumentException
189 {
190 try {
191 Provider target = (Provider) object;
192 target.setProviderChoice( (ProviderChoice) value);
193 }
194 catch (Exception ex) {
195 throw new IllegalStateException(ex.toString());
196 }
197 }
198 public java.lang.Object newInstance( java.lang.Object parent ) {
199 return new ProviderChoice();
200 }
201 } );
202 desc.setHandler(handler);
203 desc.setContainer(true);
204 desc.setClassDescriptor(new ProviderChoiceDescriptor());
205 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
206 desc.setRequired(true);
207 desc.setMultivalued(false);
208 addFieldDescriptor(desc);
209
210 //-- validation code for: _providerChoice
211 fieldValidator = new FieldValidator();
212 fieldValidator.setMinOccurs(1);
213 { //-- local scope
214 }
215 desc.setValidator(fieldValidator);
216 //-- _schemaName
217 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_schemaName", "schema-name", NodeType.Element);
218 desc.setImmutable(true);
219 handler = (new XMLFieldHandler() {
220 public java.lang.Object getValue( java.lang.Object object )
221 throws IllegalStateException
222 {
223 Provider target = (Provider) object;
224 return target.getSchemaName();
225 }
226 public void setValue( java.lang.Object object, java.lang.Object value)
227 throws IllegalStateException, IllegalArgumentException
228 {
229 try {
230 Provider target = (Provider) object;
231 target.setSchemaName( (java.lang.String) value);
232 }
233 catch (Exception ex) {
234 throw new IllegalStateException(ex.toString());
235 }
236 }
237 public java.lang.Object newInstance( java.lang.Object parent ) {
238 return null;
239 }
240 } );
241 desc.setHandler(handler);
242 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
243 desc.setMultivalued(false);
244 addFieldDescriptor(desc);
245
246 //-- validation code for: _schemaName
247 fieldValidator = new FieldValidator();
248 { //-- local scope
249 StringValidator typeValidator = new StringValidator();
250 typeValidator.setWhiteSpace("preserve");
251 fieldValidator.setValidator(typeValidator);
252 }
253 desc.setValidator(fieldValidator);
254 //-- _creationDate
255 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_creationDate", "creation-date", NodeType.Element);
256 desc.setImmutable(true);
257 handler = (new XMLFieldHandler() {
258 public java.lang.Object getValue( java.lang.Object object )
259 throws IllegalStateException
260 {
261 Provider target = (Provider) object;
262 return target.getCreationDate();
263 }
264 public void setValue( java.lang.Object object, java.lang.Object value)
265 throws IllegalStateException, IllegalArgumentException
266 {
267 try {
268 Provider target = (Provider) object;
269 target.setCreationDate( (java.lang.String) value);
270 }
271 catch (Exception ex) {
272 throw new IllegalStateException(ex.toString());
273 }
274 }
275 public java.lang.Object newInstance( java.lang.Object parent ) {
276 return null;
277 }
278 } );
279 desc.setHandler(handler);
280 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
281 desc.setMultivalued(false);
282 addFieldDescriptor(desc);
283
284 //-- validation code for: _creationDate
285 fieldValidator = new FieldValidator();
286 { //-- local scope
287 StringValidator typeValidator = new StringValidator();
288 typeValidator.setWhiteSpace("preserve");
289 fieldValidator.setValidator(typeValidator);
290 }
291 desc.setValidator(fieldValidator);
292 } //-- org.enableit.db.beans.ProviderDescriptor()
293
294
295 //-----------/
296 //- Methods -/
297 //-----------/
298
299 /***
300 **/
301 public org.exolab.castor.mapping.AccessMode getAccessMode()
302 {
303 return null;
304 } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
305
306 /***
307 **/
308 public org.exolab.castor.mapping.ClassDescriptor getExtends()
309 {
310 return null;
311 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
312
313 /***
314 **/
315 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
316 {
317 return identity;
318 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
319
320 /***
321 **/
322 public java.lang.Class getJavaClass()
323 {
324 return org.enableit.db.beans.Provider.class;
325 } //-- java.lang.Class getJavaClass()
326
327 /***
328 **/
329 public java.lang.String getNameSpacePrefix()
330 {
331 return nsPrefix;
332 } //-- java.lang.String getNameSpacePrefix()
333
334 /***
335 **/
336 public java.lang.String getNameSpaceURI()
337 {
338 return nsURI;
339 } //-- java.lang.String getNameSpaceURI()
340
341 /***
342 **/
343 public org.exolab.castor.xml.TypeValidator getValidator()
344 {
345 return this;
346 } //-- org.exolab.castor.xml.TypeValidator getValidator()
347
348 /***
349 **/
350 public java.lang.String getXMLName()
351 {
352 return xmlName;
353 } //-- java.lang.String getXMLName()
354
355 }
This page was automatically generated by Maven