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 LiteralsDescriptor.
021: *
022: * @version $Revision$ $Date$
023: */
024: public class LiteralsDescriptor 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 LiteralsDescriptor() {
056: super ();
057: xmlName = "Literals";
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: //-- _code
064: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
065: java.lang.String.class, "_code", "Code",
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: Literals target = (Literals) object;
072: return target.getCode();
073: }
074:
075: public void setValue(java.lang.Object object,
076: java.lang.Object value)
077: throws IllegalStateException,
078: IllegalArgumentException {
079: try {
080: Literals target = (Literals) object;
081: target.setCode((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: _code
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: //-- _value
105: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
106: java.lang.String.class, "_value", "Value",
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: Literals target = (Literals) object;
113: return target.getValue();
114: }
115:
116: public void setValue(java.lang.Object object,
117: java.lang.Object value)
118: throws IllegalStateException,
119: IllegalArgumentException {
120: try {
121: Literals target = (Literals) object;
122: target.setValue((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: _value
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: //-- initialize element descriptors
146:
147: } //-- com.calipso.reportgenerator.reportdefinitions.LiteralsDescriptor()
148:
149: //-----------/
150: //- Methods -/
151: //-----------/
152:
153: /**
154: * Method getAccessMode
155: */
156: public org.exolab.castor.mapping.AccessMode getAccessMode() {
157: return null;
158: } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
159:
160: /**
161: * Method getExtends
162: */
163: public org.exolab.castor.mapping.ClassDescriptor getExtends() {
164: return null;
165: } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
166:
167: /**
168: * Method getIdentity
169: */
170: public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
171: return identity;
172: } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
173:
174: /**
175: * Method getJavaClass
176: */
177: public java.lang.Class getJavaClass() {
178: return com.calipso.reportgenerator.reportdefinitions.Literals.class;
179: } //-- java.lang.Class getJavaClass()
180:
181: /**
182: * Method getNameSpacePrefix
183: */
184: public java.lang.String getNameSpacePrefix() {
185: return nsPrefix;
186: } //-- java.lang.String getNameSpacePrefix()
187:
188: /**
189: * Method getNameSpaceURI
190: */
191: public java.lang.String getNameSpaceURI() {
192: return nsURI;
193: } //-- java.lang.String getNameSpaceURI()
194:
195: /**
196: * Method getValidator
197: */
198: public org.exolab.castor.xml.TypeValidator getValidator() {
199: return this ;
200: } //-- org.exolab.castor.xml.TypeValidator getValidator()
201:
202: /**
203: * Method getXMLName
204: */
205: public java.lang.String getXMLName() {
206: return xmlName;
207: } //-- java.lang.String getXMLName()
208:
209: }
|