svn-gvsig-desktop / trunk / frameworks / _fwAndami / src / com / iver / andami / plugins / config / generate / ActionToolDescriptor.java @ 5281
History | View | Annotate | Download (14.3 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: ActionToolDescriptor.java 5281 2006-05-19 09:01:59Z 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.xml.validators.*; |
15 |
|
16 |
/**
|
17 |
* Class ActionToolDescriptor.
|
18 |
*
|
19 |
* @version $Revision: 5281 $ $Date: 2006-05-19 11:01:59 +0200 (Fri, 19 May 2006) $
|
20 |
*/
|
21 |
public class ActionToolDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { |
22 |
|
23 |
|
24 |
//--------------------------/
|
25 |
//- Class/Member Variables -/
|
26 |
//--------------------------/
|
27 |
|
28 |
/**
|
29 |
* Field nsPrefix
|
30 |
*/
|
31 |
private java.lang.String nsPrefix;
|
32 |
|
33 |
/**
|
34 |
* Field nsURI
|
35 |
*/
|
36 |
private java.lang.String nsURI;
|
37 |
|
38 |
/**
|
39 |
* Field xmlName
|
40 |
*/
|
41 |
private java.lang.String xmlName;
|
42 |
|
43 |
/**
|
44 |
* Field identity
|
45 |
*/
|
46 |
private org.exolab.castor.xml.XMLFieldDescriptor identity;
|
47 |
|
48 |
|
49 |
//----------------/
|
50 |
//- Constructors -/
|
51 |
//----------------/
|
52 |
|
53 |
public ActionToolDescriptor() {
|
54 |
super();
|
55 |
xmlName = "action-tool";
|
56 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
|
57 |
org.exolab.castor.xml.XMLFieldHandler handler = null;
|
58 |
org.exolab.castor.xml.FieldValidator fieldValidator = null;
|
59 |
//-- initialize attribute descriptors
|
60 |
|
61 |
//-- _text
|
62 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_text", "text", org.exolab.castor.xml.NodeType.Attribute); |
63 |
desc.setImmutable(true);
|
64 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
65 |
public java.lang.Object getValue( java.lang.Object object )
|
66 |
throws IllegalStateException |
67 |
{ |
68 |
ActionTool target = (ActionTool) object; |
69 |
return target.getText();
|
70 |
} |
71 |
public void setValue( java.lang.Object object, java.lang.Object value) |
72 |
throws IllegalStateException, IllegalArgumentException |
73 |
{ |
74 |
try {
|
75 |
ActionTool target = (ActionTool) object; |
76 |
target.setText( (java.lang.String) value); |
77 |
} |
78 |
catch (java.lang.Exception ex) {
|
79 |
throw new IllegalStateException(ex.toString()); |
80 |
} |
81 |
} |
82 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
83 |
return null; |
84 |
} |
85 |
} ); |
86 |
desc.setHandler(handler); |
87 |
addFieldDescriptor(desc); |
88 |
|
89 |
//-- validation code for: _text
|
90 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
91 |
{ //-- local scope
|
92 |
StringValidator typeValidator = new StringValidator();
|
93 |
typeValidator.setWhiteSpace("preserve");
|
94 |
fieldValidator.setValidator(typeValidator); |
95 |
} |
96 |
desc.setValidator(fieldValidator); |
97 |
//-- _actionCommand
|
98 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_actionCommand", "action-command", org.exolab.castor.xml.NodeType.Attribute); |
99 |
desc.setImmutable(true);
|
100 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
101 |
public java.lang.Object getValue( java.lang.Object object )
|
102 |
throws IllegalStateException |
103 |
{ |
104 |
ActionTool target = (ActionTool) object; |
105 |
return target.getActionCommand();
|
106 |
} |
107 |
public void setValue( java.lang.Object object, java.lang.Object value) |
108 |
throws IllegalStateException, IllegalArgumentException |
109 |
{ |
110 |
try {
|
111 |
ActionTool target = (ActionTool) object; |
112 |
target.setActionCommand( (java.lang.String) value); |
113 |
} |
114 |
catch (java.lang.Exception ex) {
|
115 |
throw new IllegalStateException(ex.toString()); |
116 |
} |
117 |
} |
118 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
119 |
return null; |
120 |
} |
121 |
} ); |
122 |
desc.setHandler(handler); |
123 |
addFieldDescriptor(desc); |
124 |
|
125 |
//-- validation code for: _actionCommand
|
126 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
127 |
{ //-- local scope
|
128 |
StringValidator typeValidator = new StringValidator();
|
129 |
typeValidator.setWhiteSpace("preserve");
|
130 |
fieldValidator.setValidator(typeValidator); |
131 |
} |
132 |
desc.setValidator(fieldValidator); |
133 |
//-- _icon
|
134 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_icon", "icon", org.exolab.castor.xml.NodeType.Attribute); |
135 |
desc.setImmutable(true);
|
136 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
137 |
public java.lang.Object getValue( java.lang.Object object )
|
138 |
throws IllegalStateException |
139 |
{ |
140 |
ActionTool target = (ActionTool) object; |
141 |
return target.getIcon();
|
142 |
} |
143 |
public void setValue( java.lang.Object object, java.lang.Object value) |
144 |
throws IllegalStateException, IllegalArgumentException |
145 |
{ |
146 |
try {
|
147 |
ActionTool target = (ActionTool) object; |
148 |
target.setIcon( (java.lang.String) value); |
149 |
} |
150 |
catch (java.lang.Exception ex) {
|
151 |
throw new IllegalStateException(ex.toString()); |
152 |
} |
153 |
} |
154 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
155 |
return null; |
156 |
} |
157 |
} ); |
158 |
desc.setHandler(handler); |
159 |
desc.setRequired(true);
|
160 |
addFieldDescriptor(desc); |
161 |
|
162 |
//-- validation code for: _icon
|
163 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
164 |
fieldValidator.setMinOccurs(1);
|
165 |
{ //-- local scope
|
166 |
StringValidator typeValidator = new StringValidator();
|
167 |
typeValidator.setWhiteSpace("preserve");
|
168 |
fieldValidator.setValidator(typeValidator); |
169 |
} |
170 |
desc.setValidator(fieldValidator); |
171 |
//-- _last
|
172 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_last", "last", org.exolab.castor.xml.NodeType.Attribute); |
173 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
174 |
public java.lang.Object getValue( java.lang.Object object )
|
175 |
throws IllegalStateException |
176 |
{ |
177 |
ActionTool target = (ActionTool) object; |
178 |
if(!target.hasLast())
|
179 |
return null; |
180 |
return (target.getLast() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
|
181 |
} |
182 |
public void setValue( java.lang.Object object, java.lang.Object value) |
183 |
throws IllegalStateException, IllegalArgumentException |
184 |
{ |
185 |
try {
|
186 |
ActionTool target = (ActionTool) object; |
187 |
// if null, use delete method for optional primitives
|
188 |
if (value == null) { |
189 |
target.deleteLast(); |
190 |
return;
|
191 |
} |
192 |
target.setLast( ((java.lang.Boolean)value).booleanValue()); |
193 |
} |
194 |
catch (java.lang.Exception ex) {
|
195 |
throw new IllegalStateException(ex.toString()); |
196 |
} |
197 |
} |
198 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
199 |
return null; |
200 |
} |
201 |
} ); |
202 |
desc.setHandler(handler); |
203 |
addFieldDescriptor(desc); |
204 |
|
205 |
//-- validation code for: _last
|
206 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
207 |
{ //-- local scope
|
208 |
BooleanValidator typeValidator = new BooleanValidator();
|
209 |
fieldValidator.setValidator(typeValidator); |
210 |
} |
211 |
desc.setValidator(fieldValidator); |
212 |
//-- _tooltip
|
213 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_tooltip", "tooltip", org.exolab.castor.xml.NodeType.Attribute); |
214 |
desc.setImmutable(true);
|
215 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
216 |
public java.lang.Object getValue( java.lang.Object object )
|
217 |
throws IllegalStateException |
218 |
{ |
219 |
ActionTool target = (ActionTool) object; |
220 |
return target.getTooltip();
|
221 |
} |
222 |
public void setValue( java.lang.Object object, java.lang.Object value) |
223 |
throws IllegalStateException, IllegalArgumentException |
224 |
{ |
225 |
try {
|
226 |
ActionTool target = (ActionTool) object; |
227 |
target.setTooltip( (java.lang.String) value); |
228 |
} |
229 |
catch (java.lang.Exception ex) {
|
230 |
throw new IllegalStateException(ex.toString()); |
231 |
} |
232 |
} |
233 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
234 |
return null; |
235 |
} |
236 |
} ); |
237 |
desc.setHandler(handler); |
238 |
addFieldDescriptor(desc); |
239 |
|
240 |
//-- validation code for: _tooltip
|
241 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
242 |
{ //-- local scope
|
243 |
StringValidator typeValidator = new StringValidator();
|
244 |
typeValidator.setWhiteSpace("preserve");
|
245 |
fieldValidator.setValidator(typeValidator); |
246 |
} |
247 |
desc.setValidator(fieldValidator); |
248 |
//-- _enableText
|
249 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_enableText", "enable-text", org.exolab.castor.xml.NodeType.Attribute); |
250 |
desc.setImmutable(true);
|
251 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
252 |
public java.lang.Object getValue( java.lang.Object object )
|
253 |
throws IllegalStateException |
254 |
{ |
255 |
ActionTool target = (ActionTool) object; |
256 |
return target.getEnableText();
|
257 |
} |
258 |
public void setValue( java.lang.Object object, java.lang.Object value) |
259 |
throws IllegalStateException, IllegalArgumentException |
260 |
{ |
261 |
try {
|
262 |
ActionTool target = (ActionTool) object; |
263 |
target.setEnableText( (java.lang.String) value); |
264 |
} |
265 |
catch (java.lang.Exception ex) {
|
266 |
throw new IllegalStateException(ex.toString()); |
267 |
} |
268 |
} |
269 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
270 |
return null; |
271 |
} |
272 |
} ); |
273 |
desc.setHandler(handler); |
274 |
addFieldDescriptor(desc); |
275 |
|
276 |
//-- validation code for: _enableText
|
277 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
278 |
{ //-- local scope
|
279 |
StringValidator typeValidator = new StringValidator();
|
280 |
typeValidator.setWhiteSpace("preserve");
|
281 |
fieldValidator.setValidator(typeValidator); |
282 |
} |
283 |
desc.setValidator(fieldValidator); |
284 |
//-- _position
|
285 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_position", "position", org.exolab.castor.xml.NodeType.Attribute); |
286 |
desc.setImmutable(true);
|
287 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
288 |
public java.lang.Object getValue( java.lang.Object object )
|
289 |
throws IllegalStateException |
290 |
{ |
291 |
ActionTool target = (ActionTool) object; |
292 |
return target.getPosition();
|
293 |
} |
294 |
public void setValue( java.lang.Object object, java.lang.Object value) |
295 |
throws IllegalStateException, IllegalArgumentException |
296 |
{ |
297 |
try {
|
298 |
ActionTool target = (ActionTool) object; |
299 |
target.setPosition( (java.lang.String) value); |
300 |
} |
301 |
catch (java.lang.Exception ex) {
|
302 |
throw new IllegalStateException(ex.toString()); |
303 |
} |
304 |
} |
305 |
public java.lang.Object newInstance( java.lang.Object parent ) {
|
306 |
return null; |
307 |
} |
308 |
} ); |
309 |
desc.setHandler(handler); |
310 |
addFieldDescriptor(desc); |
311 |
|
312 |
//-- validation code for: _position
|
313 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
314 |
{ //-- local scope
|
315 |
StringValidator typeValidator = new StringValidator();
|
316 |
typeValidator.setWhiteSpace("preserve");
|
317 |
fieldValidator.setValidator(typeValidator); |
318 |
} |
319 |
desc.setValidator(fieldValidator); |
320 |
//-- initialize element descriptors
|
321 |
|
322 |
} //-- com.iver.andami.plugins.config.generate.ActionToolDescriptor()
|
323 |
|
324 |
|
325 |
//-----------/
|
326 |
//- Methods -/
|
327 |
//-----------/
|
328 |
|
329 |
/**
|
330 |
* Method getAccessMode
|
331 |
*/
|
332 |
public org.exolab.castor.mapping.AccessMode getAccessMode()
|
333 |
{ |
334 |
return null; |
335 |
} //-- org.exolab.castor.mapping.AccessMode getAccessMode()
|
336 |
|
337 |
/**
|
338 |
* Method getExtends
|
339 |
*/
|
340 |
public org.exolab.castor.mapping.ClassDescriptor getExtends()
|
341 |
{ |
342 |
return null; |
343 |
} //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
|
344 |
|
345 |
/**
|
346 |
* Method getIdentity
|
347 |
*/
|
348 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
349 |
{ |
350 |
return identity;
|
351 |
} //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
|
352 |
|
353 |
/**
|
354 |
* Method getJavaClass
|
355 |
*/
|
356 |
public java.lang.Class getJavaClass()
|
357 |
{ |
358 |
return com.iver.andami.plugins.config.generate.ActionTool.class;
|
359 |
} //-- java.lang.Class getJavaClass()
|
360 |
|
361 |
/**
|
362 |
* Method getNameSpacePrefix
|
363 |
*/
|
364 |
public java.lang.String getNameSpacePrefix()
|
365 |
{ |
366 |
return nsPrefix;
|
367 |
} //-- java.lang.String getNameSpacePrefix()
|
368 |
|
369 |
/**
|
370 |
* Method getNameSpaceURI
|
371 |
*/
|
372 |
public java.lang.String getNameSpaceURI()
|
373 |
{ |
374 |
return nsURI;
|
375 |
} //-- java.lang.String getNameSpaceURI()
|
376 |
|
377 |
/**
|
378 |
* Method getValidator
|
379 |
*/
|
380 |
public org.exolab.castor.xml.TypeValidator getValidator()
|
381 |
{ |
382 |
return this; |
383 |
} //-- org.exolab.castor.xml.TypeValidator getValidator()
|
384 |
|
385 |
/**
|
386 |
* Method getXMLName
|
387 |
*/
|
388 |
public java.lang.String getXMLName()
|
389 |
{ |
390 |
return xmlName;
|
391 |
} //-- java.lang.String getXMLName()
|
392 |
|
393 |
} |