1
2
3
4
5
6
7
8 package org.exolab.castor.tests.framework.testDescriptor;
9
10
11
12
13
14
15
16
17
18
19
20
21 public class RootType extends org.exolab.castor.tests.framework.testDescriptor.StringType
22 implements java.io.Serializable
23 {
24
25
26
27
28
29
30
31
32
33 private java.lang.String _content = "";
34
35
36
37
38 private boolean _random = false;
39
40
41
42
43 private boolean _has_random;
44
45
46
47
48 private boolean _dump = false;
49
50
51
52
53 private boolean _has_dump;
54
55
56
57
58
59
60 public RootType() {
61 super();
62 setContent("");
63 }
64
65 public RootType(final java.lang.String defaultValue) {
66 try {
67 setContent( new java.lang.String(defaultValue));
68 } catch(Exception e) {
69 throw new RuntimeException("Unable to cast default value for simple content!");
70 }
71 }
72
73
74
75
76
77
78
79
80 public void deleteDump(
81 ) {
82 this._has_dump= false;
83 }
84
85
86
87 public void deleteRandom(
88 ) {
89 this._has_random= false;
90 }
91
92
93
94
95
96
97
98 public java.lang.String getContent(
99 ) {
100 return this._content;
101 }
102
103
104
105
106
107
108 public boolean getDump(
109 ) {
110 return this._dump;
111 }
112
113
114
115
116
117
118 public boolean getRandom(
119 ) {
120 return this._random;
121 }
122
123
124
125
126
127
128 public boolean hasDump(
129 ) {
130 return this._has_dump;
131 }
132
133
134
135
136
137
138 public boolean hasRandom(
139 ) {
140 return this._has_random;
141 }
142
143
144
145
146
147
148 public boolean isDump(
149 ) {
150 return this._dump;
151 }
152
153
154
155
156
157
158 public boolean isRandom(
159 ) {
160 return this._random;
161 }
162
163
164
165
166
167
168 public boolean isValid(
169 ) {
170 try {
171 validate();
172 } catch (org.exolab.castor.xml.ValidationException vex) {
173 return false;
174 }
175 return true;
176 }
177
178
179
180
181
182
183
184
185
186
187 public void marshal(
188 final java.io.Writer out)
189 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
190 org.exolab.castor.xml.Marshaller.marshal(this, out);
191 }
192
193
194
195
196
197
198
199
200
201
202
203
204 public void marshal(
205 final org.xml.sax.ContentHandler handler)
206 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
207 org.exolab.castor.xml.Marshaller.marshal(this, handler);
208 }
209
210
211
212
213
214
215
216 public void setContent(
217 final java.lang.String content) {
218 this._content = content;
219 }
220
221
222
223
224
225
226 public void setDump(
227 final boolean dump) {
228 this._dump = dump;
229 this._has_dump = true;
230 }
231
232
233
234
235
236
237 public void setRandom(
238 final boolean random) {
239 this._random = random;
240 this._has_random = true;
241 }
242
243
244
245
246
247
248
249
250
251
252
253
254 public static org.exolab.castor.tests.framework.testDescriptor.StringType unmarshal(
255 final java.io.Reader reader)
256 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
257 return (org.exolab.castor.tests.framework.testDescriptor.StringType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.tests.framework.testDescriptor.RootType.class, reader);
258 }
259
260
261
262
263
264
265
266 public void validate(
267 )
268 throws org.exolab.castor.xml.ValidationException {
269 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
270 validator.validate(this);
271 }
272
273 }