KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > reportdefinitions > DimensionSourceDefinitionDescriptor


1 /*
2  * This class was automatically generated with
3  * <a HREF="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
4  * Schema.
5  * $Id$
6  */

7
8 package com.calipso.reportgenerator.reportdefinitions;
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 DimensionSourceDefinitionDescriptor.
21  *
22  * @version $Revision$ $Date$
23  */

24 public class DimensionSourceDefinitionDescriptor 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 JavaDoc nsPrefix;
35
36     /**
37      * Field nsURI
38      */

39     private java.lang.String JavaDoc nsURI;
40
41     /**
42      * Field xmlName
43      */

44     private java.lang.String JavaDoc xmlName;
45
46     /**
47      * Field identity
48      */

49     private org.exolab.castor.xml.XMLFieldDescriptor identity;
50
51
52       //----------------/
53
//- Constructors -/
54
//----------------/
55

56     public DimensionSourceDefinitionDescriptor() {
57         super();
58         xmlName = "DimensionSourceDefinition";
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         //-- _name
65
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_name", "Name", org.exolab.castor.xml.NodeType.Attribute);
66         desc.setImmutable(true);
67         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
68             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
69                 throws IllegalStateException JavaDoc
70             {
71                 DimensionSourceDefinition target = (DimensionSourceDefinition) object;
72                 return target.getName();
73             }
74             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
75                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
76             {
77                 try {
78                     DimensionSourceDefinition target = (DimensionSourceDefinition) object;
79                     target.setName( (java.lang.String JavaDoc) value);
80                 }
81                 catch (java.lang.Exception JavaDoc ex) {
82                     throw new IllegalStateException JavaDoc(ex.toString());
83                 }
84             }
85             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
86                 return null;
87             }
88         } );
89         desc.setHandler(handler);
90         desc.setRequired(true);
91         addFieldDescriptor(desc);
92         
93         //-- validation code for: _name
94
fieldValidator = new org.exolab.castor.xml.FieldValidator();
95         fieldValidator.setMinOccurs(1);
96         { //-- local scope
97
StringValidator typeValidator = new StringValidator();
98             typeValidator.setWhiteSpace("preserve");
99             fieldValidator.setValidator(typeValidator);
100         }
101         desc.setValidator(fieldValidator);
102         //-- _description
103
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_description", "Description", org.exolab.castor.xml.NodeType.Attribute);
104         desc.setImmutable(true);
105         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
106             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
107                 throws IllegalStateException JavaDoc
108             {
109                 DimensionSourceDefinition target = (DimensionSourceDefinition) object;
110                 return target.getDescription();
111             }
112             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
113                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
114             {
115                 try {
116                     DimensionSourceDefinition target = (DimensionSourceDefinition) object;
117                     target.setDescription( (java.lang.String JavaDoc) value);
118                 }
119                 catch (java.lang.Exception JavaDoc ex) {
120                     throw new IllegalStateException JavaDoc(ex.toString());
121                 }
122             }
123             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
124                 return null;
125             }
126         } );
127         desc.setHandler(handler);
128         desc.setRequired(true);
129         addFieldDescriptor(desc);
130         
131         //-- validation code for: _description
132
fieldValidator = new org.exolab.castor.xml.FieldValidator();
133         fieldValidator.setMinOccurs(1);
134         { //-- local scope
135
StringValidator typeValidator = new StringValidator();
136             typeValidator.setWhiteSpace("preserve");
137             fieldValidator.setValidator(typeValidator);
138         }
139         desc.setValidator(fieldValidator);
140         //-- _dataType
141
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.ReportDataType.class, "_dataType", "DataType", org.exolab.castor.xml.NodeType.Attribute);
142         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
143             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
144                 throws IllegalStateException JavaDoc
145             {
146                 DimensionSourceDefinition target = (DimensionSourceDefinition) object;
147                 return target.getDataType();
148             }
149             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
150                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
151             {
152                 try {
153                     DimensionSourceDefinition target = (DimensionSourceDefinition) object;
154                     target.setDataType( (com.calipso.reportgenerator.reportdefinitions.types.ReportDataType) value);
155                 }
156                 catch (java.lang.Exception JavaDoc ex) {
157                     throw new IllegalStateException JavaDoc(ex.toString());
158                 }
159             }
160             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
161                 return null;
162             }
163         } );
164         desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.ReportDataType.class, handler));
165         desc.setImmutable(true);
166         desc.setRequired(true);
167         addFieldDescriptor(desc);
168         
169         //-- validation code for: _dataType
170
fieldValidator = new org.exolab.castor.xml.FieldValidator();
171         fieldValidator.setMinOccurs(1);
172         { //-- local scope
173
}
174         desc.setValidator(fieldValidator);
175         //-- _calculated
176
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_calculated", "Calculated", org.exolab.castor.xml.NodeType.Attribute);
177         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
178             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
179                 throws IllegalStateException JavaDoc
180             {
181                 DimensionSourceDefinition target = (DimensionSourceDefinition) object;
182                 if(!target.hasCalculated())
183                     return null;
184                 return new Boolean JavaDoc(target.getCalculated());
185             }
186             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
187                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
188             {
189                 try {
190                     DimensionSourceDefinition target = (DimensionSourceDefinition) object;
191                     // if null, use delete method for optional primitives
192
if (value == null) {
193                         target.deleteCalculated();
194                         return;
195                     }
196                     target.setCalculated( ((Boolean JavaDoc)value).booleanValue());
197                 }
198                 catch (java.lang.Exception JavaDoc ex) {
199                     throw new IllegalStateException JavaDoc(ex.toString());
200                 }
201             }
202             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
203                 return null;
204             }
205         } );
206         desc.setHandler(handler);
207         addFieldDescriptor(desc);
208         
209         //-- validation code for: _calculated
210
fieldValidator = new org.exolab.castor.xml.FieldValidator();
211         { //-- local scope
212
BooleanValidator typeValidator = new BooleanValidator();
213             fieldValidator.setValidator(typeValidator);
214         }
215         desc.setValidator(fieldValidator);
216         //-- _expression
217
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_expression", "Expression", org.exolab.castor.xml.NodeType.Attribute);
218         desc.setImmutable(true);
219         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
220             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
221                 throws IllegalStateException JavaDoc
222             {
223                 DimensionSourceDefinition target = (DimensionSourceDefinition) object;
224                 return target.getExpression();
225             }
226             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
227                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
228             {
229                 try {
230                     DimensionSourceDefinition target = (DimensionSourceDefinition) object;
231                     target.setExpression( (java.lang.String JavaDoc) value);
232                 }
233                 catch (java.lang.Exception JavaDoc ex) {
234                     throw new IllegalStateException JavaDoc(ex.toString());
235                 }
236             }
237             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
238                 return null;
239             }
240         } );
241         desc.setHandler(handler);
242         addFieldDescriptor(desc);
243         
244         //-- validation code for: _expression
245
fieldValidator = new org.exolab.castor.xml.FieldValidator();
246         { //-- local scope
247
StringValidator typeValidator = new StringValidator();
248             typeValidator.setWhiteSpace("preserve");
249             fieldValidator.setValidator(typeValidator);
250         }
251         desc.setValidator(fieldValidator);
252         //-- _externalData
253
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_externalData", "ExternalData", org.exolab.castor.xml.NodeType.Attribute);
254         desc.setImmutable(true);
255         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
256             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
257                 throws IllegalStateException JavaDoc
258             {
259                 DimensionSourceDefinition target = (DimensionSourceDefinition) object;
260                 return target.getExternalData();
261             }
262             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
263                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
264             {
265                 try {
266                     DimensionSourceDefinition target = (DimensionSourceDefinition) object;
267                     target.setExternalData( (java.lang.String JavaDoc) value);
268                 }
269                 catch (java.lang.Exception JavaDoc ex) {
270                     throw new IllegalStateException JavaDoc(ex.toString());
271                 }
272             }
273             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
274                 return null;
275             }
276         } );
277         desc.setHandler(handler);
278         addFieldDescriptor(desc);
279         
280         //-- validation code for: _externalData
281
fieldValidator = new org.exolab.castor.xml.FieldValidator();
282         { //-- local scope
283
StringValidator typeValidator = new StringValidator();
284             typeValidator.setWhiteSpace("preserve");
285             fieldValidator.setValidator(typeValidator);
286         }
287         desc.setValidator(fieldValidator);
288         //-- _indexed
289
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_indexed", "Indexed", org.exolab.castor.xml.NodeType.Attribute);
290         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
291             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
292                 throws IllegalStateException JavaDoc
293             {
294                 DimensionSourceDefinition target = (DimensionSourceDefinition) object;
295                 if(!target.hasIndexed())
296                     return null;
297                 return new Boolean JavaDoc(target.getIndexed());
298             }
299             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
300                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
301             {
302                 try {
303                     DimensionSourceDefinition target = (DimensionSourceDefinition) object;
304                     // if null, use delete method for optional primitives
305
if (value == null) {
306                         target.deleteIndexed();
307                         return;
308                     }
309                     target.setIndexed( ((Boolean JavaDoc)value).booleanValue());
310                 }
311                 catch (java.lang.Exception JavaDoc ex) {
312                     throw new IllegalStateException JavaDoc(ex.toString());
313                 }
314             }
315             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
316                 return null;
317             }
318         } );
319         desc.setHandler(handler);
320         addFieldDescriptor(desc);
321         
322         //-- validation code for: _indexed
323
fieldValidator = new org.exolab.castor.xml.FieldValidator();
324         { //-- local scope
325
BooleanValidator typeValidator = new BooleanValidator();
326             fieldValidator.setValidator(typeValidator);
327         }
328         desc.setValidator(fieldValidator);
329         //-- initialize element descriptors
330

331     } //-- com.calipso.reportgenerator.reportdefinitions.DimensionSourceDefinitionDescriptor()
332

333
334       //-----------/
335
//- Methods -/
336
//-----------/
337

338     /**
339      * Method getAccessMode
340      */

341     public org.exolab.castor.mapping.AccessMode getAccessMode()
342     {
343         return null;
344     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
345

346     /**
347      * Method getExtends
348      */

349     public org.exolab.castor.mapping.ClassDescriptor getExtends()
350     {
351         return null;
352     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
353

354     /**
355      * Method getIdentity
356      */

357     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
358     {
359         return identity;
360     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
361

362     /**
363      * Method getJavaClass
364      */

365     public java.lang.Class JavaDoc getJavaClass()
366     {
367         return com.calipso.reportgenerator.reportdefinitions.DimensionSourceDefinition.class;
368     } //-- java.lang.Class getJavaClass()
369

370     /**
371      * Method getNameSpacePrefix
372      */

373     public java.lang.String JavaDoc getNameSpacePrefix()
374     {
375         return nsPrefix;
376     } //-- java.lang.String getNameSpacePrefix()
377

378     /**
379      * Method getNameSpaceURI
380      */

381     public java.lang.String JavaDoc getNameSpaceURI()
382     {
383         return nsURI;
384     } //-- java.lang.String getNameSpaceURI()
385

386     /**
387      * Method getValidator
388      */

389     public org.exolab.castor.xml.TypeValidator getValidator()
390     {
391         return this;
392     } //-- org.exolab.castor.xml.TypeValidator getValidator()
393

394     /**
395      * Method getXMLName
396      */

397     public java.lang.String JavaDoc getXMLName()
398     {
399         return xmlName;
400     } //-- java.lang.String getXMLName()
401

402 }
403
Popular Tags