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 RolDescriptor.
021: *
022: * @version $Revision$ $Date$
023: */
024: public class RolDescriptor 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 RolDescriptor() {
056: super ();
057: xmlName = "Rol";
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: Rol target = (Rol) 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: Rol target = (Rol) 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: //-- initialize element descriptors
105:
106: } //-- com.calipso.reportgenerator.reportdefinitions.RolDescriptor()
107:
108: //-----------/
109: //- Methods -/
110: //-----------/
111:
112: /**
113: * Method getAccessMode
114: */
115: public org.exolab.castor.mapping.AccessMode getAccessMode() {
116: return null;
117: } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
118:
119: /**
120: * Method getExtends
121: */
122: public org.exolab.castor.mapping.ClassDescriptor getExtends() {
123: return null;
124: } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
125:
126: /**
127: * Method getIdentity
128: */
129: public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
130: return identity;
131: } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
132:
133: /**
134: * Method getJavaClass
135: */
136: public java.lang.Class getJavaClass() {
137: return com.calipso.reportgenerator.reportdefinitions.Rol.class;
138: } //-- java.lang.Class getJavaClass()
139:
140: /**
141: * Method getNameSpacePrefix
142: */
143: public java.lang.String getNameSpacePrefix() {
144: return nsPrefix;
145: } //-- java.lang.String getNameSpacePrefix()
146:
147: /**
148: * Method getNameSpaceURI
149: */
150: public java.lang.String getNameSpaceURI() {
151: return nsURI;
152: } //-- java.lang.String getNameSpaceURI()
153:
154: /**
155: * Method getValidator
156: */
157: public org.exolab.castor.xml.TypeValidator getValidator() {
158: return this ;
159: } //-- org.exolab.castor.xml.TypeValidator getValidator()
160:
161: /**
162: * Method getXMLName
163: */
164: public java.lang.String getXMLName() {
165: return xmlName;
166: } //-- java.lang.String getXMLName()
167:
168: }
|