1
2
3
4
5
6
7
8 package org.exolab.castor.tests.framework.testDescriptor.descriptors;
9
10
11
12
13
14 import org.exolab.castor.tests.framework.testDescriptor.ConfigurationType;
15
16
17
18
19
20
21 public class ConfigurationTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
22
23
24
25
26
27
28
29
30
31 private boolean _elementDefinition;
32
33
34
35
36 private java.lang.String _nsPrefix;
37
38
39
40
41 private java.lang.String _nsURI;
42
43
44
45
46 private java.lang.String _xmlName;
47
48
49
50
51 private org.exolab.castor.xml.XMLFieldDescriptor _identity;
52
53
54
55
56
57
58 public ConfigurationTypeDescriptor() {
59 super();
60 _nsURI = "http://castor.exolab.org/Test";
61 _xmlName = "ConfigurationType";
62 _elementDefinition = false;
63
64
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
70
71
72
73
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
114 fieldValidator = new org.exolab.castor.xml.FieldValidator();
115 fieldValidator.setMinOccurs(1);
116 {
117 }
118 desc.setValidator(fieldValidator);
119 }
120
121
122
123
124
125
126
127
128
129
130
131 public org.exolab.castor.mapping.AccessMode getAccessMode(
132 ) {
133 return null;
134 }
135
136
137
138
139
140
141
142 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
143 ) {
144 return _identity;
145 }
146
147
148
149
150
151
152 public java.lang.Class getJavaClass(
153 ) {
154 return org.exolab.castor.tests.framework.testDescriptor.ConfigurationType.class;
155 }
156
157
158
159
160
161
162 public java.lang.String getNameSpacePrefix(
163 ) {
164 return _nsPrefix;
165 }
166
167
168
169
170
171
172
173 public java.lang.String getNameSpaceURI(
174 ) {
175 return _nsURI;
176 }
177
178
179
180
181
182
183
184 public org.exolab.castor.xml.TypeValidator getValidator(
185 ) {
186 return this;
187 }
188
189
190
191
192
193
194 public java.lang.String getXMLName(
195 ) {
196 return _xmlName;
197 }
198
199
200
201
202
203
204
205
206 public boolean isElementDefinition(
207 ) {
208 return _elementDefinition;
209 }
210
211 }