svn-gvsig-desktop / trunk / frameworks / _fwAndami / src / com / iver / andami / plugins / config / generate / SelectableToolDescriptor.java @ 6431
History | View | Annotate | Download (18.2 KB)
1 |
/*
|
---|---|
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: SelectableToolDescriptor.java 6431 2006-07-19 10:41:35Z cesar $
|
6 |
*/
|
7 |
|
8 |
package com.iver.andami.plugins.config.generate; |
9 |
|
10 |
//---------------------------------/
|
11 |
//- Imported classes and packages -/
|
12 |
//---------------------------------/
|
13 |
|
14 |
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 |
|
19 |
/**
|
20 |
* Class SelectableToolDescriptor.
|
21 |
*
|
22 |
* @version $Revision: 6431 $ $Date: 2006-07-19 12:41:35 +0200 (Wed, 19 Jul 2006) $
|
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 |
//-- _actionCommand
|
101 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_actionCommand", "action-command", 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.getActionCommand();
|
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.setActionCommand( (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: _actionCommand
|
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 |
//-- _isDefault
|
137 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_isDefault", "is-default", org.exolab.castor.xml.NodeType.Attribute); |
138 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
139 |
public java.lang.Object getValue( java.lang.Object object )
|
140 |
throws IllegalStateException |
141 |
{ |
142 |
SelectableTool target = (SelectableTool) object; |
143 |
if(!target.hasIsDefault())
|
144 |
return null; |
145 |
return (target.getIsDefault() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
|
146 |
} |
147 |
public void setValue( java.lang.Object object, java.lang.Object value) |
148 |
throws IllegalStateException, IllegalArgumentException |
149 |
{ |
150 |
try {
|
151 |
SelectableTool target = (SelectableTool) object; |
152 |
// if null, use delete method for optional primitives
|
153 |
if (value == null) { |
154 |
target.deleteIsDefault(); |
155 |
return;
|
156 |
} |
157 |
target.setIsDefault( ((java.lang.Boolean)value).booleanValue()); |
158 |
} |
159 |
catch (java.lang.Exception ex) {
|
160 |
throw new IllegalStateException(ex.toString()); |
161 |
} |
162 |
} |
163 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
164 |
return null; |
165 |
} |
166 |
} ); |
167 |
desc.setHandler(handler); |
168 |
addFieldDescriptor(desc); |
169 |
|
170 |
//-- validation code for: _isDefault
|
171 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
172 |
{ //-- local scope
|
173 |
BooleanValidator typeValidator = new BooleanValidator();
|
174 |
fieldValidator.setValidator(typeValidator); |
175 |
} |
176 |
desc.setValidator(fieldValidator); |
177 |
//-- _last
|
178 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_last", "last", org.exolab.castor.xml.NodeType.Attribute); |
179 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
180 |
public java.lang.Object getValue( java.lang.Object object )
|
181 |
throws IllegalStateException |
182 |
{ |
183 |
SelectableTool target = (SelectableTool) object; |
184 |
if(!target.hasLast())
|
185 |
return null; |
186 |
return (target.getLast() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
|
187 |
} |
188 |
public void setValue( java.lang.Object object, java.lang.Object value) |
189 |
throws IllegalStateException, IllegalArgumentException |
190 |
{ |
191 |
try {
|
192 |
SelectableTool target = (SelectableTool) object; |
193 |
// if null, use delete method for optional primitives
|
194 |
if (value == null) { |
195 |
target.deleteLast(); |
196 |
return;
|
197 |
} |
198 |
target.setLast( ((java.lang.Boolean)value).booleanValue()); |
199 |
} |
200 |
catch (java.lang.Exception ex) {
|
201 |
throw new IllegalStateException(ex.toString()); |
202 |
} |
203 |
} |
204 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
205 |
return null; |
206 |
} |
207 |
} ); |
208 |
desc.setHandler(handler); |
209 |
addFieldDescriptor(desc); |
210 |
|
211 |
//-- validation code for: _last
|
212 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
213 |
{ //-- local scope
|
214 |
BooleanValidator typeValidator = new BooleanValidator();
|
215 |
fieldValidator.setValidator(typeValidator); |
216 |
} |
217 |
desc.setValidator(fieldValidator); |
218 |
//-- _icon
|
219 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_icon", "icon", org.exolab.castor.xml.NodeType.Attribute); |
220 |
desc.setImmutable(true);
|
221 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
222 |
public java.lang.Object getValue( java.lang.Object object )
|
223 |
throws IllegalStateException |
224 |
{ |
225 |
SelectableTool target = (SelectableTool) object; |
226 |
return target.getIcon();
|
227 |
} |
228 |
public void setValue( java.lang.Object object, java.lang.Object value) |
229 |
throws IllegalStateException, IllegalArgumentException |
230 |
{ |
231 |
try {
|
232 |
SelectableTool target = (SelectableTool) object; |
233 |
target.setIcon( (java.lang.String) value); |
234 |
} |
235 |
catch (java.lang.Exception ex) {
|
236 |
throw new IllegalStateException(ex.toString()); |
237 |
} |
238 |
} |
239 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
240 |
return null; |
241 |
} |
242 |
} ); |
243 |
desc.setHandler(handler); |
244 |
desc.setRequired(true);
|
245 |
addFieldDescriptor(desc); |
246 |
|
247 |
//-- validation code for: _icon
|
248 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
249 |
fieldValidator.setMinOccurs(1);
|
250 |
{ //-- local scope
|
251 |
StringValidator typeValidator = new StringValidator();
|
252 |
typeValidator.setWhiteSpace("preserve");
|
253 |
fieldValidator.setValidator(typeValidator); |
254 |
} |
255 |
desc.setValidator(fieldValidator); |
256 |
//-- _tooltip
|
257 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_tooltip", "tooltip", org.exolab.castor.xml.NodeType.Attribute); |
258 |
desc.setImmutable(true);
|
259 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
260 |
public java.lang.Object getValue( java.lang.Object object )
|
261 |
throws IllegalStateException |
262 |
{ |
263 |
SelectableTool target = (SelectableTool) object; |
264 |
return target.getTooltip();
|
265 |
} |
266 |
public void setValue( java.lang.Object object, java.lang.Object value) |
267 |
throws IllegalStateException, IllegalArgumentException |
268 |
{ |
269 |
try {
|
270 |
SelectableTool target = (SelectableTool) object; |
271 |
target.setTooltip( (java.lang.String) value); |
272 |
} |
273 |
catch (java.lang.Exception ex) {
|
274 |
throw new IllegalStateException(ex.toString()); |
275 |
} |
276 |
} |
277 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
278 |
return null; |
279 |
} |
280 |
} ); |
281 |
desc.setHandler(handler); |
282 |
addFieldDescriptor(desc); |
283 |
|
284 |
//-- validation code for: _tooltip
|
285 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
286 |
{ //-- local scope
|
287 |
StringValidator typeValidator = new StringValidator();
|
288 |
typeValidator.setWhiteSpace("preserve");
|
289 |
fieldValidator.setValidator(typeValidator); |
290 |
} |
291 |
desc.setValidator(fieldValidator); |
292 |
//-- _enableText
|
293 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_enableText", "enable-text", 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.getEnableText();
|
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.setEnableText( (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: _enableText
|
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 |
//-- _group
|
329 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_group", "group", 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.getGroup();
|
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.setGroup( (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: _group
|
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 |
//-- _position
|
365 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_position", "position", org.exolab.castor.xml.NodeType.Attribute); |
366 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
367 |
public java.lang.Object getValue( java.lang.Object object )
|
368 |
throws IllegalStateException |
369 |
{ |
370 |
SelectableTool target = (SelectableTool) object; |
371 |
if(!target.hasPosition())
|
372 |
return null; |
373 |
return new java.lang.Integer(target.getPosition()); |
374 |
} |
375 |
public void setValue( java.lang.Object object, java.lang.Object value) |
376 |
throws IllegalStateException, IllegalArgumentException |
377 |
{ |
378 |
try {
|
379 |
SelectableTool target = (SelectableTool) object; |
380 |
// if null, use delete method for optional primitives
|
381 |
if (value == null) { |
382 |
target.deletePosition(); |
383 |
return;
|
384 |
} |
385 |
target.setPosition( ((java.lang.Integer)value).intValue()); |
386 |
} |
387 |
catch (java.lang.Exception ex) {
|
388 |
throw new IllegalStateException(ex.toString()); |
389 |
} |
390 |
} |
391 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
392 |
return null; |
393 |
} |
394 |
} ); |
395 |
desc.setHandler(handler); |
396 |
addFieldDescriptor(desc); |
397 |
|
398 |
//-- validation code for: _position
|
399 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
400 |
{ //-- local scope
|
401 |
IntegerValidator typeValidator= new IntegerValidator();
|
402 |
fieldValidator.setValidator(typeValidator); |
403 |
} |
404 |
desc.setValidator(fieldValidator); |
405 |
//-- initialize element descriptors
|
406 |
|
407 |
} //-- com.iver.andami.plugins.config.generate.SelectableToolDescriptor()
|
408 |
|
409 |
|
410 |
//-----------/
|
411 |
//- Methods -/
|
412 |
//-----------/
|
413 |
|
414 |
/**
|
415 |
* Method getAccessMode
|
416 |
*/
|
417 |
public org.exolab.castor.mapping.AccessMode getAccessMode()
|
418 |
{ |
419 |
return null; |
420 |
} //-- org.exolab.castor.mapping.AccessMode getAccessMode()
|
421 |
|
422 |
/**
|
423 |
* Method getExtends
|
424 |
*/
|
425 |
public org.exolab.castor.mapping.ClassDescriptor getExtends()
|
426 |
{ |
427 |
return null; |
428 |
} //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
|
429 |
|
430 |
/**
|
431 |
* Method getIdentity
|
432 |
*/
|
433 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
434 |
{ |
435 |
return identity;
|
436 |
} //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
437 |
|
438 |
/**
|
439 |
* Method getJavaClass
|
440 |
*/
|
441 |
public java.lang.Class getJavaClass()
|
442 |
{ |
443 |
return com.iver.andami.plugins.config.generate.SelectableTool.class;
|
444 |
} //-- java.lang.Class getJavaClass()
|
445 |
|
446 |
/**
|
447 |
* Method getNameSpacePrefix
|
448 |
*/
|
449 |
public java.lang.String getNameSpacePrefix()
|
450 |
{ |
451 |
return nsPrefix;
|
452 |
} //-- java.lang.String getNameSpacePrefix()
|
453 |
|
454 |
/**
|
455 |
* Method getNameSpaceURI
|
456 |
*/
|
457 |
public java.lang.String getNameSpaceURI()
|
458 |
{ |
459 |
return nsURI;
|
460 |
} //-- java.lang.String getNameSpaceURI()
|
461 |
|
462 |
/**
|
463 |
* Method getValidator
|
464 |
*/
|
465 |
public org.exolab.castor.xml.TypeValidator getValidator()
|
466 |
{ |
467 |
return this; |
468 |
} //-- org.exolab.castor.xml.TypeValidator getValidator()
|
469 |
|
470 |
/**
|
471 |
* Method getXMLName
|
472 |
*/
|
473 |
public java.lang.String getXMLName()
|
474 |
{ |
475 |
return xmlName;
|
476 |
} //-- java.lang.String getXMLName()
|
477 |
|
478 |
} |