root / trunk / frameworks / _fwAndami / src / com / iver / andami / plugins / config / generate / SelectableToolDescriptor.java @ 9956
History | View | Annotate | Download (19.7 KB)
1 | 598 | fernando | /*
|
---|---|---|---|
2 | * This class was automatically generated with
|
||
3 | * <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
|
||
4 | * Schema.
|
||
5 | * $Id$
|
||
6 | */
|
||
7 | |||
8 | package com.iver.andami.plugins.config.generate; |
||
9 | |||
10 | //---------------------------------/
|
||
11 | //- Imported classes and packages -/
|
||
12 | //---------------------------------/
|
||
13 | |||
14 | 6431 | cesar | 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 | 598 | fernando | |
19 | /**
|
||
20 | * Class SelectableToolDescriptor.
|
||
21 | *
|
||
22 | * @version $Revision$ $Date$
|
||
23 | */
|
||
24 | public class SelectableToolDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { |
||
25 | |||
26 | |||
27 | //--------------------------/
|
||
28 | //- Class/Member Variables -/
|
||
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 | //- Constructors -/
|
||
54 | //----------------/
|
||
55 | |||
56 | public SelectableToolDescriptor() {
|
||
57 | super();
|
||
58 | xmlName = "selectable-tool";
|
||
59 | org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
|
||
60 | org.exolab.castor.xml.XMLFieldHandler handler = null;
|
||
61 | org.exolab.castor.xml.FieldValidator fieldValidator = null;
|
||
62 | //-- initialize attribute descriptors
|
||
63 | |||
64 | //-- _text
|
||
65 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_text", "text", org.exolab.castor.xml.NodeType.Attribute); |
||
66 | desc.setImmutable(true);
|
||
67 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
68 | public java.lang.Object getValue( java.lang.Object object )
|
||
69 | throws IllegalStateException |
||
70 | { |
||
71 | SelectableTool target = (SelectableTool) object; |
||
72 | return target.getText();
|
||
73 | } |
||
74 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
75 | throws IllegalStateException, IllegalArgumentException |
||
76 | { |
||
77 | try {
|
||
78 | SelectableTool target = (SelectableTool) object; |
||
79 | target.setText( (java.lang.String) value); |
||
80 | } |
||
81 | catch (java.lang.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 | addFieldDescriptor(desc); |
||
91 | |||
92 | //-- validation code for: _text
|
||
93 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
94 | { //-- local scope
|
||
95 | StringValidator typeValidator = new StringValidator();
|
||
96 | typeValidator.setWhiteSpace("preserve");
|
||
97 | fieldValidator.setValidator(typeValidator); |
||
98 | } |
||
99 | desc.setValidator(fieldValidator); |
||
100 | 9683 | cesar | //-- _name
|
101 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); |
||
102 | desc.setImmutable(true);
|
||
103 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
104 | public java.lang.Object getValue( java.lang.Object object )
|
||
105 | throws IllegalStateException |
||
106 | { |
||
107 | SelectableTool target = (SelectableTool) object; |
||
108 | return target.getName();
|
||
109 | } |
||
110 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
111 | throws IllegalStateException, IllegalArgumentException |
||
112 | { |
||
113 | try {
|
||
114 | SelectableTool target = (SelectableTool) object; |
||
115 | target.setName( (java.lang.String) 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 null; |
||
123 | } |
||
124 | } ); |
||
125 | desc.setHandler(handler); |
||
126 | addFieldDescriptor(desc); |
||
127 | |||
128 | //-- validation code for: _name
|
||
129 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
130 | { //-- local scope
|
||
131 | StringValidator typeValidator = new StringValidator();
|
||
132 | typeValidator.setWhiteSpace("preserve");
|
||
133 | fieldValidator.setValidator(typeValidator); |
||
134 | } |
||
135 | desc.setValidator(fieldValidator); |
||
136 | 598 | fernando | //-- _actionCommand
|
137 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_actionCommand", "action-command", org.exolab.castor.xml.NodeType.Attribute); |
||
138 | desc.setImmutable(true);
|
||
139 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
140 | public java.lang.Object getValue( java.lang.Object object )
|
||
141 | throws IllegalStateException |
||
142 | { |
||
143 | SelectableTool target = (SelectableTool) object; |
||
144 | return target.getActionCommand();
|
||
145 | } |
||
146 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
147 | throws IllegalStateException, IllegalArgumentException |
||
148 | { |
||
149 | try {
|
||
150 | SelectableTool target = (SelectableTool) object; |
||
151 | target.setActionCommand( (java.lang.String) value); |
||
152 | } |
||
153 | catch (java.lang.Exception ex) {
|
||
154 | throw new IllegalStateException(ex.toString()); |
||
155 | } |
||
156 | } |
||
157 | public java.lang.Object newInstance( java.lang.Object parent ) {
|
||
158 | return null; |
||
159 | } |
||
160 | } ); |
||
161 | desc.setHandler(handler); |
||
162 | addFieldDescriptor(desc); |
||
163 | |||
164 | //-- validation code for: _actionCommand
|
||
165 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
166 | { //-- local scope
|
||
167 | StringValidator typeValidator = new StringValidator();
|
||
168 | typeValidator.setWhiteSpace("preserve");
|
||
169 | fieldValidator.setValidator(typeValidator); |
||
170 | } |
||
171 | desc.setValidator(fieldValidator); |
||
172 | //-- _isDefault
|
||
173 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_isDefault", "is-default", org.exolab.castor.xml.NodeType.Attribute); |
||
174 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
175 | public java.lang.Object getValue( java.lang.Object object )
|
||
176 | throws IllegalStateException |
||
177 | { |
||
178 | SelectableTool target = (SelectableTool) object; |
||
179 | if(!target.hasIsDefault())
|
||
180 | return null; |
||
181 | return (target.getIsDefault() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
|
||
182 | } |
||
183 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
184 | throws IllegalStateException, IllegalArgumentException |
||
185 | { |
||
186 | try {
|
||
187 | SelectableTool target = (SelectableTool) object; |
||
188 | // if null, use delete method for optional primitives
|
||
189 | if (value == null) { |
||
190 | target.deleteIsDefault(); |
||
191 | return;
|
||
192 | } |
||
193 | target.setIsDefault( ((java.lang.Boolean)value).booleanValue()); |
||
194 | } |
||
195 | catch (java.lang.Exception ex) {
|
||
196 | throw new IllegalStateException(ex.toString()); |
||
197 | } |
||
198 | } |
||
199 | public java.lang.Object newInstance( java.lang.Object parent ) {
|
||
200 | return null; |
||
201 | } |
||
202 | } ); |
||
203 | desc.setHandler(handler); |
||
204 | addFieldDescriptor(desc); |
||
205 | |||
206 | //-- validation code for: _isDefault
|
||
207 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
208 | { //-- local scope
|
||
209 | BooleanValidator typeValidator = new BooleanValidator();
|
||
210 | fieldValidator.setValidator(typeValidator); |
||
211 | } |
||
212 | desc.setValidator(fieldValidator); |
||
213 | //-- _last
|
||
214 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_last", "last", org.exolab.castor.xml.NodeType.Attribute); |
||
215 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
216 | public java.lang.Object getValue( java.lang.Object object )
|
||
217 | throws IllegalStateException |
||
218 | { |
||
219 | SelectableTool target = (SelectableTool) object; |
||
220 | if(!target.hasLast())
|
||
221 | return null; |
||
222 | return (target.getLast() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
|
||
223 | } |
||
224 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
225 | throws IllegalStateException, IllegalArgumentException |
||
226 | { |
||
227 | try {
|
||
228 | SelectableTool target = (SelectableTool) object; |
||
229 | // if null, use delete method for optional primitives
|
||
230 | if (value == null) { |
||
231 | target.deleteLast(); |
||
232 | return;
|
||
233 | } |
||
234 | target.setLast( ((java.lang.Boolean)value).booleanValue()); |
||
235 | } |
||
236 | catch (java.lang.Exception ex) {
|
||
237 | throw new IllegalStateException(ex.toString()); |
||
238 | } |
||
239 | } |
||
240 | public java.lang.Object newInstance( java.lang.Object parent ) {
|
||
241 | return null; |
||
242 | } |
||
243 | } ); |
||
244 | desc.setHandler(handler); |
||
245 | addFieldDescriptor(desc); |
||
246 | |||
247 | //-- validation code for: _last
|
||
248 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
249 | { //-- local scope
|
||
250 | BooleanValidator typeValidator = new BooleanValidator();
|
||
251 | fieldValidator.setValidator(typeValidator); |
||
252 | } |
||
253 | desc.setValidator(fieldValidator); |
||
254 | //-- _icon
|
||
255 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_icon", "icon", org.exolab.castor.xml.NodeType.Attribute); |
||
256 | desc.setImmutable(true);
|
||
257 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
258 | public java.lang.Object getValue( java.lang.Object object )
|
||
259 | throws IllegalStateException |
||
260 | { |
||
261 | SelectableTool target = (SelectableTool) object; |
||
262 | return target.getIcon();
|
||
263 | } |
||
264 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
265 | throws IllegalStateException, IllegalArgumentException |
||
266 | { |
||
267 | try {
|
||
268 | SelectableTool target = (SelectableTool) object; |
||
269 | target.setIcon( (java.lang.String) value); |
||
270 | } |
||
271 | catch (java.lang.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.setRequired(true);
|
||
281 | addFieldDescriptor(desc); |
||
282 | |||
283 | //-- validation code for: _icon
|
||
284 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
285 | fieldValidator.setMinOccurs(1);
|
||
286 | { //-- local scope
|
||
287 | StringValidator typeValidator = new StringValidator();
|
||
288 | typeValidator.setWhiteSpace("preserve");
|
||
289 | fieldValidator.setValidator(typeValidator); |
||
290 | } |
||
291 | desc.setValidator(fieldValidator); |
||
292 | //-- _tooltip
|
||
293 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_tooltip", "tooltip", org.exolab.castor.xml.NodeType.Attribute); |
||
294 | desc.setImmutable(true);
|
||
295 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
296 | public java.lang.Object getValue( java.lang.Object object )
|
||
297 | throws IllegalStateException |
||
298 | { |
||
299 | SelectableTool target = (SelectableTool) object; |
||
300 | return target.getTooltip();
|
||
301 | } |
||
302 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
303 | throws IllegalStateException, IllegalArgumentException |
||
304 | { |
||
305 | try {
|
||
306 | SelectableTool target = (SelectableTool) object; |
||
307 | target.setTooltip( (java.lang.String) value); |
||
308 | } |
||
309 | catch (java.lang.Exception ex) {
|
||
310 | throw new IllegalStateException(ex.toString()); |
||
311 | } |
||
312 | } |
||
313 | public java.lang.Object newInstance( java.lang.Object parent ) {
|
||
314 | return null; |
||
315 | } |
||
316 | } ); |
||
317 | desc.setHandler(handler); |
||
318 | addFieldDescriptor(desc); |
||
319 | |||
320 | //-- validation code for: _tooltip
|
||
321 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
322 | { //-- local scope
|
||
323 | StringValidator typeValidator = new StringValidator();
|
||
324 | typeValidator.setWhiteSpace("preserve");
|
||
325 | fieldValidator.setValidator(typeValidator); |
||
326 | } |
||
327 | desc.setValidator(fieldValidator); |
||
328 | //-- _enableText
|
||
329 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_enableText", "enable-text", org.exolab.castor.xml.NodeType.Attribute); |
||
330 | desc.setImmutable(true);
|
||
331 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
332 | public java.lang.Object getValue( java.lang.Object object )
|
||
333 | throws IllegalStateException |
||
334 | { |
||
335 | SelectableTool target = (SelectableTool) object; |
||
336 | return target.getEnableText();
|
||
337 | } |
||
338 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
339 | throws IllegalStateException, IllegalArgumentException |
||
340 | { |
||
341 | try {
|
||
342 | SelectableTool target = (SelectableTool) object; |
||
343 | target.setEnableText( (java.lang.String) value); |
||
344 | } |
||
345 | catch (java.lang.Exception ex) {
|
||
346 | throw new IllegalStateException(ex.toString()); |
||
347 | } |
||
348 | } |
||
349 | public java.lang.Object newInstance( java.lang.Object parent ) {
|
||
350 | return null; |
||
351 | } |
||
352 | } ); |
||
353 | desc.setHandler(handler); |
||
354 | addFieldDescriptor(desc); |
||
355 | |||
356 | //-- validation code for: _enableText
|
||
357 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
358 | { //-- local scope
|
||
359 | StringValidator typeValidator = new StringValidator();
|
||
360 | typeValidator.setWhiteSpace("preserve");
|
||
361 | fieldValidator.setValidator(typeValidator); |
||
362 | } |
||
363 | desc.setValidator(fieldValidator); |
||
364 | //-- _group
|
||
365 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_group", "group", org.exolab.castor.xml.NodeType.Attribute); |
||
366 | desc.setImmutable(true);
|
||
367 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
368 | public java.lang.Object getValue( java.lang.Object object )
|
||
369 | throws IllegalStateException |
||
370 | { |
||
371 | SelectableTool target = (SelectableTool) object; |
||
372 | return target.getGroup();
|
||
373 | } |
||
374 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
375 | throws IllegalStateException, IllegalArgumentException |
||
376 | { |
||
377 | try {
|
||
378 | SelectableTool target = (SelectableTool) object; |
||
379 | target.setGroup( (java.lang.String) value); |
||
380 | } |
||
381 | catch (java.lang.Exception ex) {
|
||
382 | throw new IllegalStateException(ex.toString()); |
||
383 | } |
||
384 | } |
||
385 | public java.lang.Object newInstance( java.lang.Object parent ) {
|
||
386 | return null; |
||
387 | } |
||
388 | } ); |
||
389 | desc.setHandler(handler); |
||
390 | addFieldDescriptor(desc); |
||
391 | |||
392 | //-- validation code for: _group
|
||
393 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
394 | { //-- local scope
|
||
395 | StringValidator typeValidator = new StringValidator();
|
||
396 | typeValidator.setWhiteSpace("preserve");
|
||
397 | fieldValidator.setValidator(typeValidator); |
||
398 | } |
||
399 | desc.setValidator(fieldValidator); |
||
400 | 5360 | cesar | //-- _position
|
401 | desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_position", "position", org.exolab.castor.xml.NodeType.Attribute); |
||
402 | handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
||
403 | public java.lang.Object getValue( java.lang.Object object )
|
||
404 | throws IllegalStateException |
||
405 | { |
||
406 | SelectableTool target = (SelectableTool) object; |
||
407 | if(!target.hasPosition())
|
||
408 | return null; |
||
409 | return new java.lang.Integer(target.getPosition()); |
||
410 | } |
||
411 | public void setValue( java.lang.Object object, java.lang.Object value) |
||
412 | throws IllegalStateException, IllegalArgumentException |
||
413 | { |
||
414 | try {
|
||
415 | SelectableTool target = (SelectableTool) object; |
||
416 | // if null, use delete method for optional primitives
|
||
417 | if (value == null) { |
||
418 | target.deletePosition(); |
||
419 | return;
|
||
420 | } |
||
421 | target.setPosition( ((java.lang.Integer)value).intValue()); |
||
422 | } |
||
423 | catch (java.lang.Exception ex) {
|
||
424 | throw new IllegalStateException(ex.toString()); |
||
425 | } |
||
426 | } |
||
427 | public java.lang.Object newInstance( java.lang.Object parent ) {
|
||
428 | return null; |
||
429 | } |
||
430 | } ); |
||
431 | desc.setHandler(handler); |
||
432 | addFieldDescriptor(desc); |
||
433 | |||
434 | //-- validation code for: _position
|
||
435 | fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
||
436 | { //-- local scope
|
||
437 | IntegerValidator typeValidator= new IntegerValidator();
|
||
438 | fieldValidator.setValidator(typeValidator); |
||
439 | } |
||
440 | desc.setValidator(fieldValidator); |
||
441 | 598 | fernando | //-- initialize element descriptors
|
442 | |||
443 | } //-- com.iver.andami.plugins.config.generate.SelectableToolDescriptor()
|
||
444 | |||
445 | |||
446 | //-----------/
|
||
447 | //- Methods -/
|
||
448 | //-----------/
|
||
449 | |||
450 | /**
|
||
451 | * Method getAccessMode
|
||
452 | */
|
||
453 | public org.exolab.castor.mapping.AccessMode getAccessMode()
|
||
454 | { |
||
455 | return null; |
||
456 | } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
|
||
457 | |||
458 | /**
|
||
459 | * Method getExtends
|
||
460 | */
|
||
461 | public org.exolab.castor.mapping.ClassDescriptor getExtends()
|
||
462 | { |
||
463 | return null; |
||
464 | } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
|
||
465 | |||
466 | /**
|
||
467 | * Method getIdentity
|
||
468 | */
|
||
469 | public org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
||
470 | { |
||
471 | return identity;
|
||
472 | } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
||
473 | |||
474 | /**
|
||
475 | * Method getJavaClass
|
||
476 | */
|
||
477 | public java.lang.Class getJavaClass()
|
||
478 | { |
||
479 | return com.iver.andami.plugins.config.generate.SelectableTool.class;
|
||
480 | } //-- java.lang.Class getJavaClass()
|
||
481 | |||
482 | /**
|
||
483 | * Method getNameSpacePrefix
|
||
484 | */
|
||
485 | public java.lang.String getNameSpacePrefix()
|
||
486 | { |
||
487 | return nsPrefix;
|
||
488 | } //-- java.lang.String getNameSpacePrefix()
|
||
489 | |||
490 | /**
|
||
491 | * Method getNameSpaceURI
|
||
492 | */
|
||
493 | public java.lang.String getNameSpaceURI()
|
||
494 | { |
||
495 | return nsURI;
|
||
496 | } //-- java.lang.String getNameSpaceURI()
|
||
497 | |||
498 | /**
|
||
499 | * Method getValidator
|
||
500 | */
|
||
501 | public org.exolab.castor.xml.TypeValidator getValidator()
|
||
502 | { |
||
503 | return this; |
||
504 | } //-- org.exolab.castor.xml.TypeValidator getValidator()
|
||
505 | |||
506 | /**
|
||
507 | * Method getXMLName
|
||
508 | */
|
||
509 | public java.lang.String getXMLName()
|
||
510 | { |
||
511 | return xmlName;
|
||
512 | } //-- java.lang.String getXMLName()
|
||
513 | |||
514 | } |