1
2
3
4
5
6
7
8 package org.exolab.castor.builder.binding.xml;
9
10
11
12
13
14
15 public class Excludes implements java.io.Serializable {
16
17
18
19
20
21
22
23
24
25 private java.util.List _excludeList;
26
27
28
29
30
31
32 public Excludes() {
33 super();
34 this._excludeList = new java.util.ArrayList();
35 }
36
37
38
39
40
41
42
43
44
45
46
47
48
49 public void addExclude(
50 final org.exolab.castor.builder.binding.xml.Exclude vExclude)
51 throws java.lang.IndexOutOfBoundsException {
52 this._excludeList.add(vExclude);
53 }
54
55
56
57
58
59
60
61
62
63 public void addExclude(
64 final int index,
65 final org.exolab.castor.builder.binding.xml.Exclude vExclude)
66 throws java.lang.IndexOutOfBoundsException {
67 this._excludeList.add(index, vExclude);
68 }
69
70
71
72
73
74
75
76 public java.util.Enumeration enumerateExclude(
77 ) {
78 return java.util.Collections.enumeration(this._excludeList);
79 }
80
81
82
83
84
85
86
87
88
89
90
91 public org.exolab.castor.builder.binding.xml.Exclude getExclude(
92 final int index)
93 throws java.lang.IndexOutOfBoundsException {
94
95 if (index < 0 || index >= this._excludeList.size()) {
96 throw new IndexOutOfBoundsException("getExclude: Index value '" + index + "' not in range [0.." + (this._excludeList.size() - 1) + "]");
97 }
98
99 return (org.exolab.castor.builder.binding.xml.Exclude) _excludeList.get(index);
100 }
101
102
103
104
105
106
107
108
109
110
111 public org.exolab.castor.builder.binding.xml.Exclude[] getExclude(
112 ) {
113 org.exolab.castor.builder.binding.xml.Exclude[] array = new org.exolab.castor.builder.binding.xml.Exclude[0];
114 return (org.exolab.castor.builder.binding.xml.Exclude[]) this._excludeList.toArray(array);
115 }
116
117
118
119
120
121
122 public int getExcludeCount(
123 ) {
124 return this._excludeList.size();
125 }
126
127
128
129
130
131
132 public boolean isValid(
133 ) {
134 try {
135 validate();
136 } catch (org.exolab.castor.xml.ValidationException vex) {
137 return false;
138 }
139 return true;
140 }
141
142
143
144
145
146
147
148 public java.util.Iterator iterateExclude(
149 ) {
150 return this._excludeList.iterator();
151 }
152
153
154
155
156
157
158
159
160
161
162 public void marshal(
163 final java.io.Writer out)
164 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
165 org.exolab.castor.xml.Marshaller.marshal(this, out);
166 }
167
168
169
170
171
172
173
174
175
176
177
178
179 public void marshal(
180 final org.xml.sax.ContentHandler handler)
181 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
182 org.exolab.castor.xml.Marshaller.marshal(this, handler);
183 }
184
185
186
187 public void removeAllExclude(
188 ) {
189 this._excludeList.clear();
190 }
191
192
193
194
195
196
197
198 public boolean removeExclude(
199 final org.exolab.castor.builder.binding.xml.Exclude vExclude) {
200 boolean removed = _excludeList.remove(vExclude);
201 return removed;
202 }
203
204
205
206
207
208
209
210 public org.exolab.castor.builder.binding.xml.Exclude removeExcludeAt(
211 final int index) {
212 java.lang.Object obj = this._excludeList.remove(index);
213 return (org.exolab.castor.builder.binding.xml.Exclude) obj;
214 }
215
216
217
218
219
220
221
222
223
224 public void setExclude(
225 final int index,
226 final org.exolab.castor.builder.binding.xml.Exclude vExclude)
227 throws java.lang.IndexOutOfBoundsException {
228
229 if (index < 0 || index >= this._excludeList.size()) {
230 throw new IndexOutOfBoundsException("setExclude: Index value '" + index + "' not in range [0.." + (this._excludeList.size() - 1) + "]");
231 }
232
233 this._excludeList.set(index, vExclude);
234 }
235
236
237
238
239
240
241 public void setExclude(
242 final org.exolab.castor.builder.binding.xml.Exclude[] vExcludeArray) {
243
244 _excludeList.clear();
245
246 for (int i = 0; i < vExcludeArray.length; i++) {
247 this._excludeList.add(vExcludeArray[i]);
248 }
249 }
250
251
252
253
254
255
256
257
258
259
260
261
262 public static org.exolab.castor.builder.binding.xml.Excludes unmarshalExcludes(
263 final java.io.Reader reader)
264 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
265 return (org.exolab.castor.builder.binding.xml.Excludes) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.Excludes.class, reader);
266 }
267
268
269
270
271
272
273
274 public void validate(
275 )
276 throws org.exolab.castor.xml.ValidationException {
277 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
278 validator.validate(this);
279 }
280
281 }