001: /*
002: * This class was automatically generated with
003: * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
004: * Schema.
005: * $Id$
006: */
007:
008: package com.calipso.reportgenerator.reportdefinitions;
009:
010: //---------------------------------/
011: //- Imported classes and packages -/
012: //---------------------------------/
013:
014: import org.exolab.castor.mapping.AccessMode;
015: import org.exolab.castor.xml.TypeValidator;
016: import org.exolab.castor.xml.XMLFieldDescriptor;
017: import org.exolab.castor.xml.validators.*;
018:
019: /**
020: * Class DimensionSourceDefinitionDescriptor.
021: *
022: * @version $Revision$ $Date$
023: */
024: public class DimensionSourceDefinitionDescriptor extends
025: org.exolab.castor.xml.util.XMLClassDescriptorImpl {
026:
027: //--------------------------/
028: //- Class/Member Variables -/
029: //--------------------------/
030:
031: /**
032: * Field nsPrefix
033: */
034: private java.lang.String nsPrefix;
035:
036: /**
037: * Field nsURI
038: */
039: private java.lang.String nsURI;
040:
041: /**
042: * Field xmlName
043: */
044: private java.lang.String xmlName;
045:
046: /**
047: * Field identity
048: */
049: private org.exolab.castor.xml.XMLFieldDescriptor identity;
050:
051: //----------------/
052: //- Constructors -/
053: //----------------/
054:
055: public DimensionSourceDefinitionDescriptor() {
056: super ();
057: xmlName = "DimensionSourceDefinition";
058: org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
059: org.exolab.castor.xml.XMLFieldHandler handler = null;
060: org.exolab.castor.xml.FieldValidator fieldValidator = null;
061: //-- initialize attribute descriptors
062:
063: //-- _name
064: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
065: java.lang.String.class, "_name", "Name",
066: org.exolab.castor.xml.NodeType.Attribute);
067: desc.setImmutable(true);
068: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
069: public java.lang.Object getValue(java.lang.Object object)
070: throws IllegalStateException {
071: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
072: return target.getName();
073: }
074:
075: public void setValue(java.lang.Object object,
076: java.lang.Object value)
077: throws IllegalStateException,
078: IllegalArgumentException {
079: try {
080: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
081: target.setName((java.lang.String) value);
082: } catch (java.lang.Exception ex) {
083: throw new IllegalStateException(ex.toString());
084: }
085: }
086:
087: public java.lang.Object newInstance(java.lang.Object parent) {
088: return null;
089: }
090: });
091: desc.setHandler(handler);
092: desc.setRequired(true);
093: addFieldDescriptor(desc);
094:
095: //-- validation code for: _name
096: fieldValidator = new org.exolab.castor.xml.FieldValidator();
097: fieldValidator.setMinOccurs(1);
098: { //-- local scope
099: StringValidator typeValidator = new StringValidator();
100: typeValidator.setWhiteSpace("preserve");
101: fieldValidator.setValidator(typeValidator);
102: }
103: desc.setValidator(fieldValidator);
104: //-- _description
105: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
106: java.lang.String.class, "_description", "Description",
107: org.exolab.castor.xml.NodeType.Attribute);
108: desc.setImmutable(true);
109: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
110: public java.lang.Object getValue(java.lang.Object object)
111: throws IllegalStateException {
112: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
113: return target.getDescription();
114: }
115:
116: public void setValue(java.lang.Object object,
117: java.lang.Object value)
118: throws IllegalStateException,
119: IllegalArgumentException {
120: try {
121: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
122: target.setDescription((java.lang.String) value);
123: } catch (java.lang.Exception ex) {
124: throw new IllegalStateException(ex.toString());
125: }
126: }
127:
128: public java.lang.Object newInstance(java.lang.Object parent) {
129: return null;
130: }
131: });
132: desc.setHandler(handler);
133: desc.setRequired(true);
134: addFieldDescriptor(desc);
135:
136: //-- validation code for: _description
137: fieldValidator = new org.exolab.castor.xml.FieldValidator();
138: fieldValidator.setMinOccurs(1);
139: { //-- local scope
140: StringValidator typeValidator = new StringValidator();
141: typeValidator.setWhiteSpace("preserve");
142: fieldValidator.setValidator(typeValidator);
143: }
144: desc.setValidator(fieldValidator);
145: //-- _dataType
146: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
147: com.calipso.reportgenerator.reportdefinitions.types.ReportDataType.class,
148: "_dataType", "DataType",
149: org.exolab.castor.xml.NodeType.Attribute);
150: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
151: public java.lang.Object getValue(java.lang.Object object)
152: throws IllegalStateException {
153: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
154: return target.getDataType();
155: }
156:
157: public void setValue(java.lang.Object object,
158: java.lang.Object value)
159: throws IllegalStateException,
160: IllegalArgumentException {
161: try {
162: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
163: target
164: .setDataType((com.calipso.reportgenerator.reportdefinitions.types.ReportDataType) value);
165: } catch (java.lang.Exception ex) {
166: throw new IllegalStateException(ex.toString());
167: }
168: }
169:
170: public java.lang.Object newInstance(java.lang.Object parent) {
171: return null;
172: }
173: });
174: desc
175: .setHandler(new org.exolab.castor.xml.handlers.EnumFieldHandler(
176: com.calipso.reportgenerator.reportdefinitions.types.ReportDataType.class,
177: handler));
178: desc.setImmutable(true);
179: desc.setRequired(true);
180: addFieldDescriptor(desc);
181:
182: //-- validation code for: _dataType
183: fieldValidator = new org.exolab.castor.xml.FieldValidator();
184: fieldValidator.setMinOccurs(1);
185: { //-- local scope
186: }
187: desc.setValidator(fieldValidator);
188: //-- _calculated
189: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
190: java.lang.Boolean.TYPE, "_calculated", "Calculated",
191: org.exolab.castor.xml.NodeType.Attribute);
192: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
193: public java.lang.Object getValue(java.lang.Object object)
194: throws IllegalStateException {
195: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
196: if (!target.hasCalculated())
197: return null;
198: return new Boolean(target.getCalculated());
199: }
200:
201: public void setValue(java.lang.Object object,
202: java.lang.Object value)
203: throws IllegalStateException,
204: IllegalArgumentException {
205: try {
206: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
207: // if null, use delete method for optional primitives
208: if (value == null) {
209: target.deleteCalculated();
210: return;
211: }
212: target.setCalculated(((Boolean) value)
213: .booleanValue());
214: } catch (java.lang.Exception ex) {
215: throw new IllegalStateException(ex.toString());
216: }
217: }
218:
219: public java.lang.Object newInstance(java.lang.Object parent) {
220: return null;
221: }
222: });
223: desc.setHandler(handler);
224: addFieldDescriptor(desc);
225:
226: //-- validation code for: _calculated
227: fieldValidator = new org.exolab.castor.xml.FieldValidator();
228: { //-- local scope
229: BooleanValidator typeValidator = new BooleanValidator();
230: fieldValidator.setValidator(typeValidator);
231: }
232: desc.setValidator(fieldValidator);
233: //-- _expression
234: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
235: java.lang.String.class, "_expression", "Expression",
236: org.exolab.castor.xml.NodeType.Attribute);
237: desc.setImmutable(true);
238: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
239: public java.lang.Object getValue(java.lang.Object object)
240: throws IllegalStateException {
241: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
242: return target.getExpression();
243: }
244:
245: public void setValue(java.lang.Object object,
246: java.lang.Object value)
247: throws IllegalStateException,
248: IllegalArgumentException {
249: try {
250: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
251: target.setExpression((java.lang.String) value);
252: } catch (java.lang.Exception ex) {
253: throw new IllegalStateException(ex.toString());
254: }
255: }
256:
257: public java.lang.Object newInstance(java.lang.Object parent) {
258: return null;
259: }
260: });
261: desc.setHandler(handler);
262: addFieldDescriptor(desc);
263:
264: //-- validation code for: _expression
265: fieldValidator = new org.exolab.castor.xml.FieldValidator();
266: { //-- local scope
267: StringValidator typeValidator = new StringValidator();
268: typeValidator.setWhiteSpace("preserve");
269: fieldValidator.setValidator(typeValidator);
270: }
271: desc.setValidator(fieldValidator);
272: //-- _externalData
273: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
274: java.lang.String.class, "_externalData",
275: "ExternalData",
276: org.exolab.castor.xml.NodeType.Attribute);
277: desc.setImmutable(true);
278: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
279: public java.lang.Object getValue(java.lang.Object object)
280: throws IllegalStateException {
281: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
282: return target.getExternalData();
283: }
284:
285: public void setValue(java.lang.Object object,
286: java.lang.Object value)
287: throws IllegalStateException,
288: IllegalArgumentException {
289: try {
290: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
291: target.setExternalData((java.lang.String) value);
292: } catch (java.lang.Exception ex) {
293: throw new IllegalStateException(ex.toString());
294: }
295: }
296:
297: public java.lang.Object newInstance(java.lang.Object parent) {
298: return null;
299: }
300: });
301: desc.setHandler(handler);
302: addFieldDescriptor(desc);
303:
304: //-- validation code for: _externalData
305: fieldValidator = new org.exolab.castor.xml.FieldValidator();
306: { //-- local scope
307: StringValidator typeValidator = new StringValidator();
308: typeValidator.setWhiteSpace("preserve");
309: fieldValidator.setValidator(typeValidator);
310: }
311: desc.setValidator(fieldValidator);
312: //-- _indexed
313: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
314: java.lang.Boolean.TYPE, "_indexed", "Indexed",
315: org.exolab.castor.xml.NodeType.Attribute);
316: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
317: public java.lang.Object getValue(java.lang.Object object)
318: throws IllegalStateException {
319: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
320: if (!target.hasIndexed())
321: return null;
322: return new Boolean(target.getIndexed());
323: }
324:
325: public void setValue(java.lang.Object object,
326: java.lang.Object value)
327: throws IllegalStateException,
328: IllegalArgumentException {
329: try {
330: DimensionSourceDefinition target = (DimensionSourceDefinition) object;
331: // if null, use delete method for optional primitives
332: if (value == null) {
333: target.deleteIndexed();
334: return;
335: }
336: target.setIndexed(((Boolean) value).booleanValue());
337: } catch (java.lang.Exception ex) {
338: throw new IllegalStateException(ex.toString());
339: }
340: }
341:
342: public java.lang.Object newInstance(java.lang.Object parent) {
343: return null;
344: }
345: });
346: desc.setHandler(handler);
347: addFieldDescriptor(desc);
348:
349: //-- validation code for: _indexed
350: fieldValidator = new org.exolab.castor.xml.FieldValidator();
351: { //-- local scope
352: BooleanValidator typeValidator = new BooleanValidator();
353: fieldValidator.setValidator(typeValidator);
354: }
355: desc.setValidator(fieldValidator);
356: //-- initialize element descriptors
357:
358: } //-- com.calipso.reportgenerator.reportdefinitions.DimensionSourceDefinitionDescriptor()
359:
360: //-----------/
361: //- Methods -/
362: //-----------/
363:
364: /**
365: * Method getAccessMode
366: */
367: public org.exolab.castor.mapping.AccessMode getAccessMode() {
368: return null;
369: } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
370:
371: /**
372: * Method getExtends
373: */
374: public org.exolab.castor.mapping.ClassDescriptor getExtends() {
375: return null;
376: } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
377:
378: /**
379: * Method getIdentity
380: */
381: public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
382: return identity;
383: } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
384:
385: /**
386: * Method getJavaClass
387: */
388: public java.lang.Class getJavaClass() {
389: return com.calipso.reportgenerator.reportdefinitions.DimensionSourceDefinition.class;
390: } //-- java.lang.Class getJavaClass()
391:
392: /**
393: * Method getNameSpacePrefix
394: */
395: public java.lang.String getNameSpacePrefix() {
396: return nsPrefix;
397: } //-- java.lang.String getNameSpacePrefix()
398:
399: /**
400: * Method getNameSpaceURI
401: */
402: public java.lang.String getNameSpaceURI() {
403: return nsURI;
404: } //-- java.lang.String getNameSpaceURI()
405:
406: /**
407: * Method getValidator
408: */
409: public org.exolab.castor.xml.TypeValidator getValidator() {
410: return this ;
411: } //-- org.exolab.castor.xml.TypeValidator getValidator()
412:
413: /**
414: * Method getXMLName
415: */
416: public java.lang.String getXMLName() {
417: return xmlName;
418: } //-- java.lang.String getXMLName()
419:
420: }
|