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 ActionDefinitionDescriptor.
021: *
022: * @version $Revision$ $Date$
023: */
024: public class ActionDefinitionDescriptor 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 ActionDefinitionDescriptor() {
056: super ();
057: xmlName = "ActionDefinition";
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: ActionDefinition target = (ActionDefinition) 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: ActionDefinition target = (ActionDefinition) 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: ActionDefinition target = (ActionDefinition) 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: ActionDefinition target = (ActionDefinition) 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: //-- _expression
146: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
147: java.lang.String.class, "_expression", "Expression",
148: org.exolab.castor.xml.NodeType.Attribute);
149: desc.setImmutable(true);
150: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
151: public java.lang.Object getValue(java.lang.Object object)
152: throws IllegalStateException {
153: ActionDefinition target = (ActionDefinition) object;
154: return target.getExpression();
155: }
156:
157: public void setValue(java.lang.Object object,
158: java.lang.Object value)
159: throws IllegalStateException,
160: IllegalArgumentException {
161: try {
162: ActionDefinition target = (ActionDefinition) object;
163: target.setExpression((java.lang.String) 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.setHandler(handler);
174: addFieldDescriptor(desc);
175:
176: //-- validation code for: _expression
177: fieldValidator = new org.exolab.castor.xml.FieldValidator();
178: { //-- local scope
179: StringValidator typeValidator = new StringValidator();
180: typeValidator.setWhiteSpace("preserve");
181: fieldValidator.setValidator(typeValidator);
182: }
183: desc.setValidator(fieldValidator);
184: //-- _metric
185: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
186: java.lang.String.class, "_metric", "Metric",
187: org.exolab.castor.xml.NodeType.Attribute);
188: desc.setImmutable(true);
189: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
190: public java.lang.Object getValue(java.lang.Object object)
191: throws IllegalStateException {
192: ActionDefinition target = (ActionDefinition) object;
193: return target.getMetric();
194: }
195:
196: public void setValue(java.lang.Object object,
197: java.lang.Object value)
198: throws IllegalStateException,
199: IllegalArgumentException {
200: try {
201: ActionDefinition target = (ActionDefinition) object;
202: target.setMetric((java.lang.String) value);
203: } catch (java.lang.Exception ex) {
204: throw new IllegalStateException(ex.toString());
205: }
206: }
207:
208: public java.lang.Object newInstance(java.lang.Object parent) {
209: return null;
210: }
211: });
212: desc.setHandler(handler);
213: addFieldDescriptor(desc);
214:
215: //-- validation code for: _metric
216: fieldValidator = new org.exolab.castor.xml.FieldValidator();
217: { //-- local scope
218: StringValidator typeValidator = new StringValidator();
219: typeValidator.setWhiteSpace("preserve");
220: fieldValidator.setValidator(typeValidator);
221: }
222: desc.setValidator(fieldValidator);
223: //-- initialize element descriptors
224:
225: } //-- com.calipso.reportgenerator.reportdefinitions.ActionDefinitionDescriptor()
226:
227: //-----------/
228: //- Methods -/
229: //-----------/
230:
231: /**
232: * Method getAccessMode
233: */
234: public org.exolab.castor.mapping.AccessMode getAccessMode() {
235: return null;
236: } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
237:
238: /**
239: * Method getExtends
240: */
241: public org.exolab.castor.mapping.ClassDescriptor getExtends() {
242: return null;
243: } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
244:
245: /**
246: * Method getIdentity
247: */
248: public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
249: return identity;
250: } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
251:
252: /**
253: * Method getJavaClass
254: */
255: public java.lang.Class getJavaClass() {
256: return com.calipso.reportgenerator.reportdefinitions.ActionDefinition.class;
257: } //-- java.lang.Class getJavaClass()
258:
259: /**
260: * Method getNameSpacePrefix
261: */
262: public java.lang.String getNameSpacePrefix() {
263: return nsPrefix;
264: } //-- java.lang.String getNameSpacePrefix()
265:
266: /**
267: * Method getNameSpaceURI
268: */
269: public java.lang.String getNameSpaceURI() {
270: return nsURI;
271: } //-- java.lang.String getNameSpaceURI()
272:
273: /**
274: * Method getValidator
275: */
276: public org.exolab.castor.xml.TypeValidator getValidator() {
277: return this ;
278: } //-- org.exolab.castor.xml.TypeValidator getValidator()
279:
280: /**
281: * Method getXMLName
282: */
283: public java.lang.String getXMLName() {
284: return xmlName;
285: } //-- java.lang.String getXMLName()
286:
287: }
|