View Javadoc
1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 1.3.1</a>, using an XML
4    * Schema.
5    * $Id$
6    */
7   
8   package org.exolab.castor.tests.framework.testDescriptor.descriptors;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import org.exolab.castor.tests.framework.testDescriptor.ConfigurationType;
15  
16  /**
17   * Class ConfigurationTypeDescriptor.
18   * 
19   * @version $Revision$ $Date$
20   */
21  public class ConfigurationTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
22  
23  
24        //--------------------------/
25       //- Class/Member Variables -/
26      //--------------------------/
27  
28      /**
29       * Field _elementDefinition.
30       */
31      private boolean _elementDefinition;
32  
33      /**
34       * Field _nsPrefix.
35       */
36      private java.lang.String _nsPrefix;
37  
38      /**
39       * Field _nsURI.
40       */
41      private java.lang.String _nsURI;
42  
43      /**
44       * Field _xmlName.
45       */
46      private java.lang.String _xmlName;
47  
48      /**
49       * Field _identity.
50       */
51      private org.exolab.castor.xml.XMLFieldDescriptor _identity;
52  
53  
54        //----------------/
55       //- Constructors -/
56      //----------------/
57  
58      public ConfigurationTypeDescriptor() {
59          super();
60          _nsURI = "http://castor.exolab.org/Test";
61          _xmlName = "ConfigurationType";
62          _elementDefinition = false;
63  
64          //-- set grouping compositor
65          setCompositorAsSequence();
66          org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;
67          org.exolab.castor.mapping.FieldHandler             handler        = null;
68          org.exolab.castor.xml.FieldValidator               fieldValidator = null;
69          //-- initialize attribute descriptors
70  
71          //-- initialize element descriptors
72  
73          //-- _callMethodList
74          desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.tests.framework.testDescriptor.CallMethod.class, "_callMethodList", "Call-method", org.exolab.castor.xml.NodeType.Element);
75          handler = new org.exolab.castor.xml.XMLFieldHandler() {
76              public java.lang.Object getValue( java.lang.Object object ) 
77                  throws IllegalStateException
78              {
79                  ConfigurationType target = (ConfigurationType) object;
80                  return target.getCallMethod();
81              }
82              public void setValue( java.lang.Object object, java.lang.Object value) 
83                  throws IllegalStateException, IllegalArgumentException
84              {
85                  try {
86                      ConfigurationType target = (ConfigurationType) object;
87                      target.addCallMethod( (org.exolab.castor.tests.framework.testDescriptor.CallMethod) value);
88                  } catch (java.lang.Exception ex) {
89                      throw new IllegalStateException(ex.toString());
90                  }
91              }
92              public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
93                  try {
94                      ConfigurationType target = (ConfigurationType) object;
95                      target.removeAllCallMethod();
96                  } catch (java.lang.Exception ex) {
97                      throw new IllegalStateException(ex.toString());
98                  }
99              }
100             public java.lang.Object newInstance(java.lang.Object parent) {
101                 return new org.exolab.castor.tests.framework.testDescriptor.CallMethod();
102             }
103         };
104         desc.setSchemaType("list");
105         desc.setComponentType("org.exolab.castor.tests.framework.testDescriptor.CallMethod");
106         desc.setHandler(handler);
107         desc.setNameSpaceURI("http://castor.exolab.org/Test");
108         desc.setRequired(true);
109         desc.setMultivalued(true);
110         addFieldDescriptor(desc);
111         addSequenceElement(desc);
112 
113         //-- validation code for: _callMethodList
114         fieldValidator = new org.exolab.castor.xml.FieldValidator();
115         fieldValidator.setMinOccurs(1);
116         { //-- local scope
117         }
118         desc.setValidator(fieldValidator);
119     }
120 
121 
122       //-----------/
123      //- Methods -/
124     //-----------/
125 
126     /**
127      * Method getAccessMode.
128      * 
129      * @return the access mode specified for this class.
130      */
131     public org.exolab.castor.mapping.AccessMode getAccessMode(
132     ) {
133         return null;
134     }
135 
136     /**
137      * Method getIdentity.
138      * 
139      * @return the identity field, null if this class has no
140      * identity.
141      */
142     public org.exolab.castor.mapping.FieldDescriptor getIdentity(
143     ) {
144         return _identity;
145     }
146 
147     /**
148      * Method getJavaClass.
149      * 
150      * @return the Java class represented by this descriptor.
151      */
152     public java.lang.Class getJavaClass(
153     ) {
154         return org.exolab.castor.tests.framework.testDescriptor.ConfigurationType.class;
155     }
156 
157     /**
158      * Method getNameSpacePrefix.
159      * 
160      * @return the namespace prefix to use when marshaling as XML.
161      */
162     public java.lang.String getNameSpacePrefix(
163     ) {
164         return _nsPrefix;
165     }
166 
167     /**
168      * Method getNameSpaceURI.
169      * 
170      * @return the namespace URI used when marshaling and
171      * unmarshaling as XML.
172      */
173     public java.lang.String getNameSpaceURI(
174     ) {
175         return _nsURI;
176     }
177 
178     /**
179      * Method getValidator.
180      * 
181      * @return a specific validator for the class described by this
182      * ClassDescriptor.
183      */
184     public org.exolab.castor.xml.TypeValidator getValidator(
185     ) {
186         return this;
187     }
188 
189     /**
190      * Method getXMLName.
191      * 
192      * @return the XML Name for the Class being described.
193      */
194     public java.lang.String getXMLName(
195     ) {
196         return _xmlName;
197     }
198 
199     /**
200      * Method isElementDefinition.
201      * 
202      * @return true if XML schema definition of this Class is that
203      * of a global
204      * element or element with anonymous type definition.
205      */
206     public boolean isElementDefinition(
207     ) {
208         return _elementDefinition;
209     }
210 
211 }