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 FilterDefinitionDescriptor.
021: *
022: * @version $Revision$ $Date$
023: */
024: public class FilterDefinitionDescriptor 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 FilterDefinitionDescriptor() {
056: super ();
057: xmlName = "FilterDefinition";
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: FilterDefinition target = (FilterDefinition) 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: FilterDefinition target = (FilterDefinition) 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: //-- _dimensionName
105: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
106: java.lang.String.class, "_dimensionName",
107: "DimensionName",
108: org.exolab.castor.xml.NodeType.Attribute);
109: desc.setImmutable(true);
110: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
111: public java.lang.Object getValue(java.lang.Object object)
112: throws IllegalStateException {
113: FilterDefinition target = (FilterDefinition) object;
114: return target.getDimensionName();
115: }
116:
117: public void setValue(java.lang.Object object,
118: java.lang.Object value)
119: throws IllegalStateException,
120: IllegalArgumentException {
121: try {
122: FilterDefinition target = (FilterDefinition) object;
123: target.setDimensionName((java.lang.String) value);
124: } catch (java.lang.Exception ex) {
125: throw new IllegalStateException(ex.toString());
126: }
127: }
128:
129: public java.lang.Object newInstance(java.lang.Object parent) {
130: return null;
131: }
132: });
133: desc.setHandler(handler);
134: addFieldDescriptor(desc);
135:
136: //-- validation code for: _dimensionName
137: fieldValidator = new org.exolab.castor.xml.FieldValidator();
138: { //-- local scope
139: StringValidator typeValidator = new StringValidator();
140: typeValidator.setWhiteSpace("preserve");
141: fieldValidator.setValidator(typeValidator);
142: }
143: desc.setValidator(fieldValidator);
144: //-- _dataType
145: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
146: com.calipso.reportgenerator.reportdefinitions.types.ReportDataType.class,
147: "_dataType", "DataType",
148: org.exolab.castor.xml.NodeType.Attribute);
149: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
150: public java.lang.Object getValue(java.lang.Object object)
151: throws IllegalStateException {
152: FilterDefinition target = (FilterDefinition) object;
153: return target.getDataType();
154: }
155:
156: public void setValue(java.lang.Object object,
157: java.lang.Object value)
158: throws IllegalStateException,
159: IllegalArgumentException {
160: try {
161: FilterDefinition target = (FilterDefinition) object;
162: target
163: .setDataType((com.calipso.reportgenerator.reportdefinitions.types.ReportDataType) value);
164: } catch (java.lang.Exception ex) {
165: throw new IllegalStateException(ex.toString());
166: }
167: }
168:
169: public java.lang.Object newInstance(java.lang.Object parent) {
170: return null;
171: }
172: });
173: desc
174: .setHandler(new org.exolab.castor.xml.handlers.EnumFieldHandler(
175: com.calipso.reportgenerator.reportdefinitions.types.ReportDataType.class,
176: handler));
177: desc.setImmutable(true);
178: addFieldDescriptor(desc);
179:
180: //-- validation code for: _dataType
181: fieldValidator = new org.exolab.castor.xml.FieldValidator();
182: { //-- local scope
183: }
184: desc.setValidator(fieldValidator);
185: //-- _filterType
186: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
187: com.calipso.reportgenerator.reportdefinitions.types.FilterDefinitionFilterTypeType.class,
188: "_filterType", "FilterType",
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: FilterDefinition target = (FilterDefinition) object;
194: return target.getFilterType();
195: }
196:
197: public void setValue(java.lang.Object object,
198: java.lang.Object value)
199: throws IllegalStateException,
200: IllegalArgumentException {
201: try {
202: FilterDefinition target = (FilterDefinition) object;
203: target
204: .setFilterType((com.calipso.reportgenerator.reportdefinitions.types.FilterDefinitionFilterTypeType) value);
205: } catch (java.lang.Exception ex) {
206: throw new IllegalStateException(ex.toString());
207: }
208: }
209:
210: public java.lang.Object newInstance(java.lang.Object parent) {
211: return null;
212: }
213: });
214: desc
215: .setHandler(new org.exolab.castor.xml.handlers.EnumFieldHandler(
216: com.calipso.reportgenerator.reportdefinitions.types.FilterDefinitionFilterTypeType.class,
217: handler));
218: desc.setImmutable(true);
219: desc.setRequired(true);
220: addFieldDescriptor(desc);
221:
222: //-- validation code for: _filterType
223: fieldValidator = new org.exolab.castor.xml.FieldValidator();
224: fieldValidator.setMinOccurs(1);
225: { //-- local scope
226: }
227: desc.setValidator(fieldValidator);
228: //-- _visual
229: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
230: java.lang.Boolean.TYPE, "_visual", "Visual",
231: org.exolab.castor.xml.NodeType.Attribute);
232: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
233: public java.lang.Object getValue(java.lang.Object object)
234: throws IllegalStateException {
235: FilterDefinition target = (FilterDefinition) object;
236: if (!target.hasVisual())
237: return null;
238: return new Boolean(target.getVisual());
239: }
240:
241: public void setValue(java.lang.Object object,
242: java.lang.Object value)
243: throws IllegalStateException,
244: IllegalArgumentException {
245: try {
246: FilterDefinition target = (FilterDefinition) object;
247: // ignore null values for non optional primitives
248: if (value == null)
249: return;
250:
251: target.setVisual(((Boolean) value).booleanValue());
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: desc.setRequired(true);
263: addFieldDescriptor(desc);
264:
265: //-- validation code for: _visual
266: fieldValidator = new org.exolab.castor.xml.FieldValidator();
267: fieldValidator.setMinOccurs(1);
268: { //-- local scope
269: BooleanValidator typeValidator = new BooleanValidator();
270: fieldValidator.setValidator(typeValidator);
271: }
272: desc.setValidator(fieldValidator);
273: //-- initialize element descriptors
274:
275: } //-- com.calipso.reportgenerator.reportdefinitions.FilterDefinitionDescriptor()
276:
277: //-----------/
278: //- Methods -/
279: //-----------/
280:
281: /**
282: * Method getAccessMode
283: */
284: public org.exolab.castor.mapping.AccessMode getAccessMode() {
285: return null;
286: } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
287:
288: /**
289: * Method getExtends
290: */
291: public org.exolab.castor.mapping.ClassDescriptor getExtends() {
292: return null;
293: } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
294:
295: /**
296: * Method getIdentity
297: */
298: public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
299: return identity;
300: } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
301:
302: /**
303: * Method getJavaClass
304: */
305: public java.lang.Class getJavaClass() {
306: return com.calipso.reportgenerator.reportdefinitions.FilterDefinition.class;
307: } //-- java.lang.Class getJavaClass()
308:
309: /**
310: * Method getNameSpacePrefix
311: */
312: public java.lang.String getNameSpacePrefix() {
313: return nsPrefix;
314: } //-- java.lang.String getNameSpacePrefix()
315:
316: /**
317: * Method getNameSpaceURI
318: */
319: public java.lang.String getNameSpaceURI() {
320: return nsURI;
321: } //-- java.lang.String getNameSpaceURI()
322:
323: /**
324: * Method getValidator
325: */
326: public org.exolab.castor.xml.TypeValidator getValidator() {
327: return this ;
328: } //-- org.exolab.castor.xml.TypeValidator getValidator()
329:
330: /**
331: * Method getXMLName
332: */
333: public java.lang.String getXMLName() {
334: return xmlName;
335: } //-- java.lang.String getXMLName()
336:
337: }
|