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 DimensionDefinitionsDescriptor.
021: *
022: * @version $Revision$ $Date$
023: */
024: public class DimensionDefinitionsDescriptor 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 DimensionDefinitionsDescriptor() {
056: super ();
057: xmlName = "DimensionDefinitions";
058:
059: //-- set grouping compositor
060: setCompositorAsSequence();
061: org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
062: org.exolab.castor.xml.XMLFieldHandler handler = null;
063: org.exolab.castor.xml.FieldValidator fieldValidator = null;
064: //-- initialize attribute descriptors
065:
066: //-- initialize element descriptors
067:
068: //-- _dimensionDefinitionList
069: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
070: com.calipso.reportgenerator.reportdefinitions.DimensionDefinition.class,
071: "_dimensionDefinitionList", "DimensionDefinition",
072: org.exolab.castor.xml.NodeType.Element);
073: handler = (new org.exolab.castor.xml.XMLFieldHandler() {
074: public java.lang.Object getValue(java.lang.Object object)
075: throws IllegalStateException {
076: DimensionDefinitions target = (DimensionDefinitions) object;
077: return target.getDimensionDefinition();
078: }
079:
080: public void setValue(java.lang.Object object,
081: java.lang.Object value)
082: throws IllegalStateException,
083: IllegalArgumentException {
084: try {
085: DimensionDefinitions target = (DimensionDefinitions) object;
086: target
087: .addDimensionDefinition((com.calipso.reportgenerator.reportdefinitions.DimensionDefinition) value);
088: } catch (java.lang.Exception ex) {
089: throw new IllegalStateException(ex.toString());
090: }
091: }
092:
093: public java.lang.Object newInstance(java.lang.Object parent) {
094: return new com.calipso.reportgenerator.reportdefinitions.DimensionDefinition();
095: }
096: });
097: desc.setHandler(handler);
098: desc.setRequired(true);
099: desc.setMultivalued(true);
100: addFieldDescriptor(desc);
101:
102: //-- validation code for: _dimensionDefinitionList
103: fieldValidator = new org.exolab.castor.xml.FieldValidator();
104: fieldValidator.setMinOccurs(1);
105: { //-- local scope
106: }
107: desc.setValidator(fieldValidator);
108: } //-- com.calipso.reportgenerator.reportdefinitions.DimensionDefinitionsDescriptor()
109:
110: //-----------/
111: //- Methods -/
112: //-----------/
113:
114: /**
115: * Method getAccessMode
116: */
117: public org.exolab.castor.mapping.AccessMode getAccessMode() {
118: return null;
119: } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
120:
121: /**
122: * Method getExtends
123: */
124: public org.exolab.castor.mapping.ClassDescriptor getExtends() {
125: return null;
126: } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
127:
128: /**
129: * Method getIdentity
130: */
131: public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
132: return identity;
133: } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
134:
135: /**
136: * Method getJavaClass
137: */
138: public java.lang.Class getJavaClass() {
139: return com.calipso.reportgenerator.reportdefinitions.DimensionDefinitions.class;
140: } //-- java.lang.Class getJavaClass()
141:
142: /**
143: * Method getNameSpacePrefix
144: */
145: public java.lang.String getNameSpacePrefix() {
146: return nsPrefix;
147: } //-- java.lang.String getNameSpacePrefix()
148:
149: /**
150: * Method getNameSpaceURI
151: */
152: public java.lang.String getNameSpaceURI() {
153: return nsURI;
154: } //-- java.lang.String getNameSpaceURI()
155:
156: /**
157: * Method getValidator
158: */
159: public org.exolab.castor.xml.TypeValidator getValidator() {
160: return this ;
161: } //-- org.exolab.castor.xml.TypeValidator getValidator()
162:
163: /**
164: * Method getXMLName
165: */
166: public java.lang.String getXMLName() {
167: return xmlName;
168: } //-- java.lang.String getXMLName()
169:
170: }
|