1
2
3
4
5
6
7
8 package org.exolab.castor.builder.binding.xml.descriptors;
9
10
11
12
13
14 import org.exolab.castor.builder.binding.xml.Forces;
15
16
17
18
19
20
21 public class ForcesDescriptor 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 ForcesDescriptor() {
59 super();
60 _nsURI = "http://www.castor.org/SourceGenerator/Binding";
61 _xmlName = "forces";
62 _elementDefinition = true;
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(java.lang.String.class, "_forceList", "force", org.exolab.castor.xml.NodeType.Element);
75 desc.setImmutable(true);
76 handler = new org.exolab.castor.xml.XMLFieldHandler() {
77 public java.lang.Object getValue( java.lang.Object object )
78 throws IllegalStateException
79 {
80 Forces target = (Forces) object;
81 return target.getForce();
82 }
83 public void setValue( java.lang.Object object, java.lang.Object value)
84 throws IllegalStateException, IllegalArgumentException
85 {
86 try {
87 Forces target = (Forces) object;
88 target.addForce( (java.lang.String) value);
89 } catch (java.lang.Exception ex) {
90 throw new IllegalStateException(ex.toString());
91 }
92 }
93 public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
94 try {
95 Forces target = (Forces) object;
96 target.removeAllForce();
97 } catch (java.lang.Exception ex) {
98 throw new IllegalStateException(ex.toString());
99 }
100 }
101 public java.lang.Object newInstance(java.lang.Object parent) {
102 return null;
103 }
104 };
105 desc.setSchemaType("list");
106 desc.setComponentType("string");
107 desc.setHandler(handler);
108 desc.setNameSpaceURI("http://www.castor.org/SourceGenerator/Binding");
109 desc.setRequired(true);
110 desc.setMultivalued(true);
111 addFieldDescriptor(desc);
112 addSequenceElement(desc);
113
114
115 fieldValidator = new org.exolab.castor.xml.FieldValidator();
116 fieldValidator.setMinOccurs(1);
117 {
118 org.exolab.castor.xml.validators.StringValidator typeValidator;
119 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
120 fieldValidator.setValidator(typeValidator);
121 typeValidator.setWhiteSpace("preserve");
122 }
123 desc.setValidator(fieldValidator);
124 }
125
126
127
128
129
130
131
132
133
134
135
136 public org.exolab.castor.mapping.AccessMode getAccessMode(
137 ) {
138 return null;
139 }
140
141
142
143
144
145
146
147 public org.exolab.castor.mapping.FieldDescriptor getIdentity(
148 ) {
149 return _identity;
150 }
151
152
153
154
155
156
157 public java.lang.Class getJavaClass(
158 ) {
159 return org.exolab.castor.builder.binding.xml.Forces.class;
160 }
161
162
163
164
165
166
167 public java.lang.String getNameSpacePrefix(
168 ) {
169 return _nsPrefix;
170 }
171
172
173
174
175
176
177
178 public java.lang.String getNameSpaceURI(
179 ) {
180 return _nsURI;
181 }
182
183
184
185
186
187
188
189 public org.exolab.castor.xml.TypeValidator getValidator(
190 ) {
191 return this;
192 }
193
194
195
196
197
198
199 public java.lang.String getXMLName(
200 ) {
201 return _xmlName;
202 }
203
204
205
206
207
208
209
210
211 public boolean isElementDefinition(
212 ) {
213 return _elementDefinition;
214 }
215
216 }