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 DimensionDefinitionDescriptor.
021: *
022: * @version $Revision$ $Date$
023: */
024: public class DimensionDefinitionDescriptor 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 DimensionDefinitionDescriptor() {
056: super ();
057: xmlName = "DimensionDefinition";
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: DimensionDefinition target = (DimensionDefinition) 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: DimensionDefinition target = (DimensionDefinition) 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: DimensionDefinition target = (DimensionDefinition) 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: DimensionDefinition target = (DimensionDefinition) 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: addFieldDescriptor(desc);
134:
135: //-- validation code for: _description
136: fieldValidator = new org.exolab.castor.xml.FieldValidator();
137: { //-- local scope
138: StringValidator typeValidator = new StringValidator();
139: typeValidator.setWhiteSpace("preserve");
140: fieldValidator.setValidator(typeValidator);
141: }
142: desc.setValidator(fieldValidator);
143: //-- _location
144: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
145: com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType.class,
146: "_location", "Location",
147: org.exolab.castor.xml.NodeType.Attribute);
148: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
149: public java.lang.Object getValue(java.lang.Object object)
150: throws IllegalStateException {
151: DimensionDefinition target = (DimensionDefinition) object;
152: return target.getLocation();
153: }
154:
155: public void setValue(java.lang.Object object,
156: java.lang.Object value)
157: throws IllegalStateException,
158: IllegalArgumentException {
159: try {
160: DimensionDefinition target = (DimensionDefinition) object;
161: target
162: .setLocation((com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType) value);
163: } catch (java.lang.Exception ex) {
164: throw new IllegalStateException(ex.toString());
165: }
166: }
167:
168: public java.lang.Object newInstance(java.lang.Object parent) {
169: return null;
170: }
171: });
172: desc
173: .setHandler(new org.exolab.castor.xml.handlers.EnumFieldHandler(
174: com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionLocationType.class,
175: handler));
176: desc.setImmutable(true);
177: desc.setRequired(true);
178: addFieldDescriptor(desc);
179:
180: //-- validation code for: _location
181: fieldValidator = new org.exolab.castor.xml.FieldValidator();
182: fieldValidator.setMinOccurs(1);
183: { //-- local scope
184: }
185: desc.setValidator(fieldValidator);
186: //-- _groups
187: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
188: java.lang.Boolean.TYPE, "_groups", "Groups",
189: org.exolab.castor.xml.NodeType.Attribute);
190: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
191: public java.lang.Object getValue(java.lang.Object object)
192: throws IllegalStateException {
193: DimensionDefinition target = (DimensionDefinition) object;
194: if (!target.hasGroups())
195: return null;
196: return new Boolean(target.getGroups());
197: }
198:
199: public void setValue(java.lang.Object object,
200: java.lang.Object value)
201: throws IllegalStateException,
202: IllegalArgumentException {
203: try {
204: DimensionDefinition target = (DimensionDefinition) object;
205: // if null, use delete method for optional primitives
206: if (value == null) {
207: target.deleteGroups();
208: return;
209: }
210: target.setGroups(((Boolean) value).booleanValue());
211: } catch (java.lang.Exception ex) {
212: throw new IllegalStateException(ex.toString());
213: }
214: }
215:
216: public java.lang.Object newInstance(java.lang.Object parent) {
217: return null;
218: }
219: });
220: desc.setHandler(handler);
221: addFieldDescriptor(desc);
222:
223: //-- validation code for: _groups
224: fieldValidator = new org.exolab.castor.xml.FieldValidator();
225: { //-- local scope
226: BooleanValidator typeValidator = new BooleanValidator();
227: fieldValidator.setValidator(typeValidator);
228: }
229: desc.setValidator(fieldValidator);
230: //-- _groupFooterCaption
231: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
232: java.lang.String.class, "_groupFooterCaption",
233: "GroupFooterCaption",
234: org.exolab.castor.xml.NodeType.Attribute);
235: desc.setImmutable(true);
236: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
237: public java.lang.Object getValue(java.lang.Object object)
238: throws IllegalStateException {
239: DimensionDefinition target = (DimensionDefinition) object;
240: return target.getGroupFooterCaption();
241: }
242:
243: public void setValue(java.lang.Object object,
244: java.lang.Object value)
245: throws IllegalStateException,
246: IllegalArgumentException {
247: try {
248: DimensionDefinition target = (DimensionDefinition) object;
249: target
250: .setGroupFooterCaption((java.lang.String) value);
251: } catch (java.lang.Exception ex) {
252: throw new IllegalStateException(ex.toString());
253: }
254: }
255:
256: public java.lang.Object newInstance(java.lang.Object parent) {
257: return null;
258: }
259: });
260: desc.setHandler(handler);
261: addFieldDescriptor(desc);
262:
263: //-- validation code for: _groupFooterCaption
264: fieldValidator = new org.exolab.castor.xml.FieldValidator();
265: { //-- local scope
266: StringValidator typeValidator = new StringValidator();
267: typeValidator.setWhiteSpace("preserve");
268: fieldValidator.setValidator(typeValidator);
269: }
270: desc.setValidator(fieldValidator);
271: //-- _order
272: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
273: com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionOrderType.class,
274: "_order", "Order",
275: org.exolab.castor.xml.NodeType.Attribute);
276: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
277: public java.lang.Object getValue(java.lang.Object object)
278: throws IllegalStateException {
279: DimensionDefinition target = (DimensionDefinition) object;
280: return target.getOrder();
281: }
282:
283: public void setValue(java.lang.Object object,
284: java.lang.Object value)
285: throws IllegalStateException,
286: IllegalArgumentException {
287: try {
288: DimensionDefinition target = (DimensionDefinition) object;
289: target
290: .setOrder((com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionOrderType) value);
291: } catch (java.lang.Exception ex) {
292: throw new IllegalStateException(ex.toString());
293: }
294: }
295:
296: public java.lang.Object newInstance(java.lang.Object parent) {
297: return null;
298: }
299: });
300: desc
301: .setHandler(new org.exolab.castor.xml.handlers.EnumFieldHandler(
302: com.calipso.reportgenerator.reportdefinitions.types.DimensionDefinitionOrderType.class,
303: handler));
304: desc.setImmutable(true);
305: addFieldDescriptor(desc);
306:
307: //-- validation code for: _order
308: fieldValidator = new org.exolab.castor.xml.FieldValidator();
309: { //-- local scope
310: }
311: desc.setValidator(fieldValidator);
312: //-- _rankMetricName
313: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
314: java.lang.String.class, "_rankMetricName",
315: "RankMetricName",
316: org.exolab.castor.xml.NodeType.Attribute);
317: desc.setImmutable(true);
318: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
319: public java.lang.Object getValue(java.lang.Object object)
320: throws IllegalStateException {
321: DimensionDefinition target = (DimensionDefinition) object;
322: return target.getRankMetricName();
323: }
324:
325: public void setValue(java.lang.Object object,
326: java.lang.Object value)
327: throws IllegalStateException,
328: IllegalArgumentException {
329: try {
330: DimensionDefinition target = (DimensionDefinition) object;
331: target.setRankMetricName((java.lang.String) value);
332: } catch (java.lang.Exception ex) {
333: throw new IllegalStateException(ex.toString());
334: }
335: }
336:
337: public java.lang.Object newInstance(java.lang.Object parent) {
338: return null;
339: }
340: });
341: desc.setHandler(handler);
342: addFieldDescriptor(desc);
343:
344: //-- validation code for: _rankMetricName
345: fieldValidator = new org.exolab.castor.xml.FieldValidator();
346: { //-- local scope
347: StringValidator typeValidator = new StringValidator();
348: typeValidator.setWhiteSpace("preserve");
349: fieldValidator.setValidator(typeValidator);
350: }
351: desc.setValidator(fieldValidator);
352: //-- initialize element descriptors
353:
354: } //-- com.calipso.reportgenerator.reportdefinitions.DimensionDefinitionDescriptor()
355:
356: //-----------/
357: //- Methods -/
358: //-----------/
359:
360: /**
361: * Method getAccessMode
362: */
363: public org.exolab.castor.mapping.AccessMode getAccessMode() {
364: return null;
365: } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
366:
367: /**
368: * Method getExtends
369: */
370: public org.exolab.castor.mapping.ClassDescriptor getExtends() {
371: return null;
372: } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
373:
374: /**
375: * Method getIdentity
376: */
377: public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
378: return identity;
379: } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
380:
381: /**
382: * Method getJavaClass
383: */
384: public java.lang.Class getJavaClass() {
385: return com.calipso.reportgenerator.reportdefinitions.DimensionDefinition.class;
386: } //-- java.lang.Class getJavaClass()
387:
388: /**
389: * Method getNameSpacePrefix
390: */
391: public java.lang.String getNameSpacePrefix() {
392: return nsPrefix;
393: } //-- java.lang.String getNameSpacePrefix()
394:
395: /**
396: * Method getNameSpaceURI
397: */
398: public java.lang.String getNameSpaceURI() {
399: return nsURI;
400: } //-- java.lang.String getNameSpaceURI()
401:
402: /**
403: * Method getValidator
404: */
405: public org.exolab.castor.xml.TypeValidator getValidator() {
406: return this ;
407: } //-- org.exolab.castor.xml.TypeValidator getValidator()
408:
409: /**
410: * Method getXMLName
411: */
412: public java.lang.String getXMLName() {
413: return xmlName;
414: } //-- java.lang.String getXMLName()
415:
416: }
|