KickJava   Java API By Example, From Geeks To Geeks.

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


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 DimensionPropertyDescriptor.
21  *
22  * @version $Revision$ $Date$
23  */

24 public class DimensionPropertyDescriptor 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 DimensionPropertyDescriptor() {
57         super();
58         xmlName = "DimensionProperty";
59         
60         //-- set grouping compositor
61
setCompositorAsSequence();
62         org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63         org.exolab.castor.xml.XMLFieldHandler handler = null;
64         org.exolab.castor.xml.FieldValidator fieldValidator = null;
65         //-- initialize attribute descriptors
66

67         //-- _dimensionName
68
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_dimensionName", "DimensionName", org.exolab.castor.xml.NodeType.Attribute);
69         desc.setImmutable(true);
70         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
71             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
72                 throws IllegalStateException JavaDoc
73             {
74                 DimensionProperty target = (DimensionProperty) object;
75                 return target.getDimensionName();
76             }
77             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
78                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
79             {
80                 try {
81                     DimensionProperty target = (DimensionProperty) object;
82                     target.setDimensionName( (java.lang.String JavaDoc) value);
83                 }
84                 catch (java.lang.Exception JavaDoc ex) {
85                     throw new IllegalStateException JavaDoc(ex.toString());
86                 }
87             }
88             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
89                 return null;
90             }
91         } );
92         desc.setHandler(handler);
93         desc.setRequired(true);
94         addFieldDescriptor(desc);
95         
96         //-- validation code for: _dimensionName
97
fieldValidator = new org.exolab.castor.xml.FieldValidator();
98         fieldValidator.setMinOccurs(1);
99         { //-- local scope
100
StringValidator typeValidator = new StringValidator();
101             typeValidator.setWhiteSpace("preserve");
102             fieldValidator.setValidator(typeValidator);
103         }
104         desc.setValidator(fieldValidator);
105         //-- _width
106
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "Width", org.exolab.castor.xml.NodeType.Attribute);
107         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
108             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
109                 throws IllegalStateException JavaDoc
110             {
111                 DimensionProperty target = (DimensionProperty) object;
112                 if(!target.hasWidth())
113                     return null;
114                 return new Integer JavaDoc(target.getWidth());
115             }
116             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
117                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
118             {
119                 try {
120                     DimensionProperty target = (DimensionProperty) object;
121                     // if null, use delete method for optional primitives
122
if (value == null) {
123                         target.deleteWidth();
124                         return;
125                     }
126                     target.setWidth( ((Integer JavaDoc)value).intValue());
127                 }
128                 catch (java.lang.Exception JavaDoc ex) {
129                     throw new IllegalStateException JavaDoc(ex.toString());
130                 }
131             }
132             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
133                 return null;
134             }
135         } );
136         desc.setHandler(handler);
137         addFieldDescriptor(desc);
138         
139         //-- validation code for: _width
140
fieldValidator = new org.exolab.castor.xml.FieldValidator();
141         { //-- local scope
142
IntegerValidator typeValidator= new IntegerValidator();
143             fieldValidator.setValidator(typeValidator);
144         }
145         desc.setValidator(fieldValidator);
146         //-- _location
147
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType.class, "_location", "Location", org.exolab.castor.xml.NodeType.Attribute);
148         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
149             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
150                 throws IllegalStateException JavaDoc
151             {
152                 DimensionProperty target = (DimensionProperty) object;
153                 return target.getLocation();
154             }
155             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
156                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
157             {
158                 try {
159                     DimensionProperty target = (DimensionProperty) object;
160                     target.setLocation( (com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType) value);
161                 }
162                 catch (java.lang.Exception JavaDoc ex) {
163                     throw new IllegalStateException JavaDoc(ex.toString());
164                 }
165             }
166             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
167                 return null;
168             }
169         } );
170         desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType.class, handler));
171         desc.setImmutable(true);
172         desc.setRequired(true);
173         addFieldDescriptor(desc);
174         
175         //-- validation code for: _location
176
fieldValidator = new org.exolab.castor.xml.FieldValidator();
177         fieldValidator.setMinOccurs(1);
178         { //-- local scope
179
}
180         desc.setValidator(fieldValidator);
181         //-- _order
182
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType.class, "_order", "Order", org.exolab.castor.xml.NodeType.Attribute);
183         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
184             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
185                 throws IllegalStateException JavaDoc
186             {
187                 DimensionProperty target = (DimensionProperty) object;
188                 return target.getOrder();
189             }
190             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
191                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
192             {
193                 try {
194                     DimensionProperty target = (DimensionProperty) object;
195                     target.setOrder( (com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType) value);
196                 }
197                 catch (java.lang.Exception JavaDoc ex) {
198                     throw new IllegalStateException JavaDoc(ex.toString());
199                 }
200             }
201             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
202                 return null;
203             }
204         } );
205         desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType.class, handler));
206         desc.setImmutable(true);
207         addFieldDescriptor(desc);
208         
209         //-- validation code for: _order
210
fieldValidator = new org.exolab.castor.xml.FieldValidator();
211         { //-- local scope
212
}
213         desc.setValidator(fieldValidator);
214         //-- _ubication
215
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ubication", "Ubication", org.exolab.castor.xml.NodeType.Attribute);
216         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
217             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
218                 throws IllegalStateException JavaDoc
219             {
220                 DimensionProperty target = (DimensionProperty) object;
221                 if(!target.hasUbication())
222                     return null;
223                 return new Integer JavaDoc(target.getUbication());
224             }
225             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
226                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
227             {
228                 try {
229                     DimensionProperty target = (DimensionProperty) object;
230                     // if null, use delete method for optional primitives
231
if (value == null) {
232                         target.deleteUbication();
233                         return;
234                     }
235                     target.setUbication( ((Integer JavaDoc)value).intValue());
236                 }
237                 catch (java.lang.Exception JavaDoc ex) {
238                     throw new IllegalStateException JavaDoc(ex.toString());
239                 }
240             }
241             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
242                 return null;
243             }
244         } );
245         desc.setHandler(handler);
246         addFieldDescriptor(desc);
247         
248         //-- validation code for: _ubication
249
fieldValidator = new org.exolab.castor.xml.FieldValidator();
250         { //-- local scope
251
IntegerValidator typeValidator = new IntegerValidator();
252             fieldValidator.setValidator(typeValidator);
253         }
254         desc.setValidator(fieldValidator);
255         //-- _rankMetricName
256
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_rankMetricName", "RankMetricName", org.exolab.castor.xml.NodeType.Attribute);
257         desc.setImmutable(true);
258         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
259             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
260                 throws IllegalStateException JavaDoc
261             {
262                 DimensionProperty target = (DimensionProperty) object;
263                 return target.getRankMetricName();
264             }
265             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
266                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
267             {
268                 try {
269                     DimensionProperty target = (DimensionProperty) object;
270                     target.setRankMetricName( (java.lang.String JavaDoc) value);
271                 }
272                 catch (java.lang.Exception JavaDoc ex) {
273                     throw new IllegalStateException JavaDoc(ex.toString());
274                 }
275             }
276             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
277                 return null;
278             }
279         } );
280         desc.setHandler(handler);
281         addFieldDescriptor(desc);
282         
283         //-- validation code for: _rankMetricName
284
fieldValidator = new org.exolab.castor.xml.FieldValidator();
285         { //-- local scope
286
StringValidator typeValidator = new StringValidator();
287             typeValidator.setWhiteSpace("preserve");
288             fieldValidator.setValidator(typeValidator);
289         }
290         desc.setValidator(fieldValidator);
291         //-- initialize element descriptors
292

293         //-- _excludeValueList
294
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.ExcludeValue.class, "_excludeValueList", "ExcludeValue", org.exolab.castor.xml.NodeType.Element);
295         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
296             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
297                 throws IllegalStateException JavaDoc
298             {
299                 DimensionProperty target = (DimensionProperty) object;
300                 return target.getExcludeValue();
301             }
302             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
303                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
304             {
305                 try {
306                     DimensionProperty target = (DimensionProperty) object;
307                     target.addExcludeValue( (com.calipso.reportgenerator.reportdefinitions.ExcludeValue) value);
308                 }
309                 catch (java.lang.Exception JavaDoc ex) {
310                     throw new IllegalStateException JavaDoc(ex.toString());
311                 }
312             }
313             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
314                 return new com.calipso.reportgenerator.reportdefinitions.ExcludeValue();
315             }
316         } );
317         desc.setHandler(handler);
318         desc.setMultivalued(true);
319         addFieldDescriptor(desc);
320         
321         //-- validation code for: _excludeValueList
322
fieldValidator = new org.exolab.castor.xml.FieldValidator();
323         fieldValidator.setMinOccurs(0);
324         { //-- local scope
325
}
326         desc.setValidator(fieldValidator);
327     } //-- com.calipso.reportgenerator.reportdefinitions.DimensionPropertyDescriptor()
328

329
330       //-----------/
331
//- Methods -/
332
//-----------/
333

334     /**
335      * Method getAccessMode
336      */

337     public org.exolab.castor.mapping.AccessMode getAccessMode()
338     {
339         return null;
340     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
341

342     /**
343      * Method getExtends
344      */

345     public org.exolab.castor.mapping.ClassDescriptor getExtends()
346     {
347         return null;
348     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
349

350     /**
351      * Method getIdentity
352      */

353     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
354     {
355         return identity;
356     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
357

358     /**
359      * Method getJavaClass
360      */

361     public java.lang.Class JavaDoc getJavaClass()
362     {
363         return com.calipso.reportgenerator.reportdefinitions.DimensionProperty.class;
364     } //-- java.lang.Class getJavaClass()
365

366     /**
367      * Method getNameSpacePrefix
368      */

369     public java.lang.String JavaDoc getNameSpacePrefix()
370     {
371         return nsPrefix;
372     } //-- java.lang.String getNameSpacePrefix()
373

374     /**
375      * Method getNameSpaceURI
376      */

377     public java.lang.String JavaDoc getNameSpaceURI()
378     {
379         return nsURI;
380     } //-- java.lang.String getNameSpaceURI()
381

382     /**
383      * Method getValidator
384      */

385     public org.exolab.castor.xml.TypeValidator getValidator()
386     {
387         return this;
388     } //-- org.exolab.castor.xml.TypeValidator getValidator()
389

390     /**
391      * Method getXMLName
392      */

393     public java.lang.String JavaDoc getXMLName()
394     {
395         return xmlName;
396     } //-- java.lang.String getXMLName()
397

398 }
399
Popular Tags