001: /*
002: * This class was automatically generated with
003: * <a href="http://www.castor.org">Castor 1.0M1</a>, using an XML
004: * Schema.
005: * $Id: LdapDescriptor.java 6104 2006-08-23 06:32:44Z wguttmn $
006: */
007:
008: package org.exolab.castor.mapping.xml;
009:
010: /**
011: * Class LdapDescriptor.
012: *
013: * @version $Revision: 6104 $ $Date: 2006-01-07 15:48:31 -0700 (Sat, 07 Jan 2006) $
014: */
015: public class LdapDescriptor extends
016: org.exolab.castor.xml.util.XMLClassDescriptorImpl {
017:
018: //--------------------------/
019: //- Class/Member Variables -/
020: //--------------------------/
021:
022: /**
023: * Field elementDefinition
024: */
025: private boolean elementDefinition;
026:
027: /**
028: * Field nsPrefix
029: */
030: private java.lang.String nsPrefix;
031:
032: /**
033: * Field nsURI
034: */
035: private java.lang.String nsURI;
036:
037: /**
038: * Field xmlName
039: */
040: private java.lang.String xmlName;
041:
042: /**
043: * Field identity
044: */
045: private org.exolab.castor.xml.XMLFieldDescriptor identity;
046:
047: //----------------/
048: //- Constructors -/
049: //----------------/
050:
051: public LdapDescriptor() {
052: super ();
053: nsURI = "http://castor.exolab.org/";
054: xmlName = "ldap";
055: elementDefinition = true;
056: org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
057: org.exolab.castor.mapping.FieldHandler handler = null;
058: org.exolab.castor.xml.FieldValidator fieldValidator = null;
059: //-- initialize attribute descriptors
060:
061: //-- _name
062: desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
063: java.lang.String.class, "_name", "name",
064: org.exolab.castor.xml.NodeType.Attribute);
065: handler = new org.exolab.castor.xml.XMLFieldHandler() {
066: public java.lang.Object getValue(java.lang.Object object)
067: throws IllegalStateException {
068: Ldap target = (Ldap) object;
069: return target.getName();
070: }
071:
072: public void setValue(java.lang.Object object,
073: java.lang.Object value)
074: throws IllegalStateException,
075: IllegalArgumentException {
076: try {
077: Ldap target = (Ldap) object;
078: target.setName((java.lang.String) value);
079: } catch (java.lang.Exception ex) {
080: throw new IllegalStateException(ex.toString());
081: }
082: }
083:
084: public java.lang.Object newInstance(java.lang.Object parent) {
085: return new java.lang.String();
086: }
087: };
088: desc.setHandler(handler);
089: desc.setMultivalued(false);
090: addFieldDescriptor(desc);
091:
092: //-- validation code for: _name
093: fieldValidator = new org.exolab.castor.xml.FieldValidator();
094: { //-- local scope
095: org.exolab.castor.xml.validators.NameValidator typeValidator = new org.exolab.castor.xml.validators.NameValidator(
096: org.exolab.castor.xml.validators.NameValidator.NMTOKEN);
097: fieldValidator.setValidator(typeValidator);
098: }
099: desc.setValidator(fieldValidator);
100: //-- initialize element descriptors
101:
102: } //-- org.exolab.castor.mapping.xml.LdapDescriptor()
103:
104: //-----------/
105: //- Methods -/
106: //-----------/
107:
108: /**
109: * Method getAccessMode
110: *
111: *
112: *
113: * @return AccessMode
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: *
123: *
124: * @return ClassDescriptor
125: */
126: public org.exolab.castor.mapping.ClassDescriptor getExtends() {
127: return null;
128: } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
129:
130: /**
131: * Method getIdentity
132: *
133: *
134: *
135: * @return FieldDescriptor
136: */
137: public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
138: return identity;
139: } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
140:
141: /**
142: * Method getJavaClass
143: *
144: *
145: *
146: * @return Class
147: */
148: public java.lang.Class getJavaClass() {
149: return org.exolab.castor.mapping.xml.Ldap.class;
150: } //-- java.lang.Class getJavaClass()
151:
152: /**
153: * Method getNameSpacePrefix
154: *
155: *
156: *
157: * @return String
158: */
159: public java.lang.String getNameSpacePrefix() {
160: return nsPrefix;
161: } //-- java.lang.String getNameSpacePrefix()
162:
163: /**
164: * Method getNameSpaceURI
165: *
166: *
167: *
168: * @return String
169: */
170: public java.lang.String getNameSpaceURI() {
171: return nsURI;
172: } //-- java.lang.String getNameSpaceURI()
173:
174: /**
175: * Method getValidator
176: *
177: *
178: *
179: * @return TypeValidator
180: */
181: public org.exolab.castor.xml.TypeValidator getValidator() {
182: return this ;
183: } //-- org.exolab.castor.xml.TypeValidator getValidator()
184:
185: /**
186: * Method getXMLName
187: *
188: *
189: *
190: * @return String
191: */
192: public java.lang.String getXMLName() {
193: return xmlName;
194: } //-- java.lang.String getXMLName()
195:
196: /**
197: * Method isElementDefinition
198: *
199: *
200: *
201: * @return boolean
202: */
203: public boolean isElementDefinition() {
204: return elementDefinition;
205: } //-- boolean isElementDefinition()
206:
207: }
|