root / trunk / frameworks / _fwAndami / src / com / iver / andami / config / generate / AndamiConfig.java @ 11032
History | View | Annotate | Download (11 KB)
1 |
/*
|
---|---|
2 |
* This class was automatically generated with
|
3 |
* <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
|
4 |
* Schema.
|
5 |
* $Id: AndamiConfig.java 11032 2007-04-03 16:44:23Z cesar $
|
6 |
*/
|
7 |
|
8 |
package com.iver.andami.config.generate; |
9 |
|
10 |
//---------------------------------/
|
11 |
//- Imported classes and packages -/
|
12 |
//---------------------------------/
|
13 |
|
14 |
import java.io.IOException; |
15 |
import java.io.Reader; |
16 |
import java.io.Serializable; |
17 |
import java.io.Writer; |
18 |
import java.util.Enumeration; |
19 |
import java.util.Vector; |
20 |
import org.exolab.castor.xml.MarshalException; |
21 |
import org.exolab.castor.xml.Marshaller; |
22 |
import org.exolab.castor.xml.Unmarshaller; |
23 |
import org.exolab.castor.xml.ValidationException; |
24 |
import org.xml.sax.ContentHandler; |
25 |
|
26 |
/**
|
27 |
* Class AndamiConfig.
|
28 |
*
|
29 |
* @version $Revision: 11032 $ $Date: 2007-04-03 18:44:23 +0200 (Tue, 03 Apr 2007) $
|
30 |
*/
|
31 |
public class AndamiConfig implements java.io.Serializable { |
32 |
|
33 |
|
34 |
//--------------------------/
|
35 |
//- Class/Member Variables -/
|
36 |
//--------------------------/
|
37 |
|
38 |
/**
|
39 |
* Field _localeLanguage
|
40 |
*/
|
41 |
private java.lang.String _localeLanguage;
|
42 |
|
43 |
/**
|
44 |
* Field _localeCountry
|
45 |
*/
|
46 |
private java.lang.String _localeCountry;
|
47 |
|
48 |
/**
|
49 |
* Field _localeVariant
|
50 |
*/
|
51 |
private java.lang.String _localeVariant;
|
52 |
|
53 |
/**
|
54 |
* Field _lookAndFeel
|
55 |
*/
|
56 |
private java.lang.String _lookAndFeel;
|
57 |
|
58 |
/**
|
59 |
* Field _pluginsDirectory
|
60 |
*/
|
61 |
private java.lang.String _pluginsDirectory;
|
62 |
|
63 |
/**
|
64 |
* Field _andami
|
65 |
*/
|
66 |
private com.iver.andami.config.generate.Andami _andami;
|
67 |
|
68 |
/**
|
69 |
* Field _pluginList
|
70 |
*/
|
71 |
private java.util.Vector _pluginList;
|
72 |
|
73 |
/**
|
74 |
* Field _andamiOptions
|
75 |
*/
|
76 |
private com.iver.andami.config.generate.AndamiOptions _andamiOptions;
|
77 |
|
78 |
|
79 |
//----------------/
|
80 |
//- Constructors -/
|
81 |
//----------------/
|
82 |
|
83 |
public AndamiConfig() {
|
84 |
super();
|
85 |
_pluginList = new Vector(); |
86 |
} //-- com.iver.andami.config.generate.AndamiConfig()
|
87 |
|
88 |
|
89 |
//-----------/
|
90 |
//- Methods -/
|
91 |
//-----------/
|
92 |
|
93 |
/**
|
94 |
* Method addPlugin
|
95 |
*
|
96 |
* @param vPlugin
|
97 |
*/
|
98 |
public void addPlugin(com.iver.andami.config.generate.Plugin vPlugin) |
99 |
throws java.lang.IndexOutOfBoundsException
|
100 |
{ |
101 |
_pluginList.addElement(vPlugin); |
102 |
} //-- void addPlugin(com.iver.andami.config.generate.Plugin)
|
103 |
|
104 |
/**
|
105 |
* Method addPlugin
|
106 |
*
|
107 |
* @param index
|
108 |
* @param vPlugin
|
109 |
*/
|
110 |
public void addPlugin(int index, com.iver.andami.config.generate.Plugin vPlugin) |
111 |
throws java.lang.IndexOutOfBoundsException
|
112 |
{ |
113 |
_pluginList.insertElementAt(vPlugin, index); |
114 |
} //-- void addPlugin(int, com.iver.andami.config.generate.Plugin)
|
115 |
|
116 |
/**
|
117 |
* Method enumeratePlugin
|
118 |
*/
|
119 |
public java.util.Enumeration enumeratePlugin()
|
120 |
{ |
121 |
return _pluginList.elements();
|
122 |
} //-- java.util.Enumeration enumeratePlugin()
|
123 |
|
124 |
/**
|
125 |
* Returns the value of field 'andami'.
|
126 |
*
|
127 |
* @return the value of field 'andami'.
|
128 |
*/
|
129 |
public com.iver.andami.config.generate.Andami getAndami()
|
130 |
{ |
131 |
return this._andami; |
132 |
} //-- com.iver.andami.config.generate.Andami getAndami()
|
133 |
|
134 |
/**
|
135 |
* Returns the value of field 'andamiOptions'.
|
136 |
*
|
137 |
* @return the value of field 'andamiOptions'.
|
138 |
*/
|
139 |
public com.iver.andami.config.generate.AndamiOptions getAndamiOptions()
|
140 |
{ |
141 |
return this._andamiOptions; |
142 |
} //-- com.iver.andami.config.generate.AndamiOptions getAndamiOptions()
|
143 |
|
144 |
/**
|
145 |
* Returns the value of field 'localeCountry'.
|
146 |
*
|
147 |
* @return the value of field 'localeCountry'.
|
148 |
*/
|
149 |
public java.lang.String getLocaleCountry()
|
150 |
{ |
151 |
return this._localeCountry; |
152 |
} //-- java.lang.String getLocaleCountry()
|
153 |
|
154 |
/**
|
155 |
* Returns the value of field 'localeLanguage'.
|
156 |
*
|
157 |
* @return the value of field 'localeLanguage'.
|
158 |
*/
|
159 |
public java.lang.String getLocaleLanguage()
|
160 |
{ |
161 |
return this._localeLanguage; |
162 |
} //-- java.lang.String getLocaleLanguage()
|
163 |
|
164 |
/**
|
165 |
* Returns the value of field 'localeVariant'.
|
166 |
*
|
167 |
* @return the value of field 'localeVariant'.
|
168 |
*/
|
169 |
public java.lang.String getLocaleVariant()
|
170 |
{ |
171 |
return this._localeVariant; |
172 |
} //-- java.lang.String getLocaleVariant()
|
173 |
|
174 |
/**
|
175 |
* Returns the value of field 'lookAndFeel'.
|
176 |
*
|
177 |
* @return the value of field 'lookAndFeel'.
|
178 |
*/
|
179 |
public java.lang.String getLookAndFeel()
|
180 |
{ |
181 |
return this._lookAndFeel; |
182 |
} //-- java.lang.String getLookAndFeel()
|
183 |
|
184 |
/**
|
185 |
* Method getPlugin
|
186 |
*
|
187 |
* @param index
|
188 |
*/
|
189 |
public com.iver.andami.config.generate.Plugin getPlugin(int index) |
190 |
throws java.lang.IndexOutOfBoundsException
|
191 |
{ |
192 |
//-- check bounds for index
|
193 |
if ((index < 0) || (index > _pluginList.size())) { |
194 |
throw new IndexOutOfBoundsException(); |
195 |
} |
196 |
|
197 |
return (com.iver.andami.config.generate.Plugin) _pluginList.elementAt(index);
|
198 |
} //-- com.iver.andami.config.generate.Plugin getPlugin(int)
|
199 |
|
200 |
/**
|
201 |
* Method getPlugin
|
202 |
*/
|
203 |
public com.iver.andami.config.generate.Plugin[] getPlugin() |
204 |
{ |
205 |
int size = _pluginList.size();
|
206 |
com.iver.andami.config.generate.Plugin[] mArray = new com.iver.andami.config.generate.Plugin[size]; |
207 |
for (int index = 0; index < size; index++) { |
208 |
mArray[index] = (com.iver.andami.config.generate.Plugin) _pluginList.elementAt(index); |
209 |
} |
210 |
return mArray;
|
211 |
} //-- com.iver.andami.config.generate.Plugin[] getPlugin()
|
212 |
|
213 |
/**
|
214 |
* Method getPluginCount
|
215 |
*/
|
216 |
public int getPluginCount() |
217 |
{ |
218 |
return _pluginList.size();
|
219 |
} //-- int getPluginCount()
|
220 |
|
221 |
/**
|
222 |
* Returns the value of field 'pluginsDirectory'.
|
223 |
*
|
224 |
* @return the value of field 'pluginsDirectory'.
|
225 |
*/
|
226 |
public java.lang.String getPluginsDirectory()
|
227 |
{ |
228 |
return this._pluginsDirectory; |
229 |
} //-- java.lang.String getPluginsDirectory()
|
230 |
|
231 |
/**
|
232 |
* Method isValid
|
233 |
*/
|
234 |
public boolean isValid() |
235 |
{ |
236 |
try {
|
237 |
validate(); |
238 |
} |
239 |
catch (org.exolab.castor.xml.ValidationException vex) {
|
240 |
return false; |
241 |
} |
242 |
return true; |
243 |
} //-- boolean isValid()
|
244 |
|
245 |
/**
|
246 |
* Method marshal
|
247 |
*
|
248 |
* @param out
|
249 |
*/
|
250 |
public void marshal(java.io.Writer out) |
251 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
252 |
{ |
253 |
|
254 |
Marshaller.marshal(this, out);
|
255 |
} //-- void marshal(java.io.Writer)
|
256 |
|
257 |
/**
|
258 |
* Method marshal
|
259 |
*
|
260 |
* @param handler
|
261 |
*/
|
262 |
public void marshal(org.xml.sax.ContentHandler handler) |
263 |
throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
264 |
{ |
265 |
|
266 |
Marshaller.marshal(this, handler);
|
267 |
} //-- void marshal(org.xml.sax.ContentHandler)
|
268 |
|
269 |
/**
|
270 |
* Method removeAllPlugin
|
271 |
*/
|
272 |
public void removeAllPlugin() |
273 |
{ |
274 |
_pluginList.removeAllElements(); |
275 |
} //-- void removeAllPlugin()
|
276 |
|
277 |
/**
|
278 |
* Method removePlugin
|
279 |
*
|
280 |
* @param index
|
281 |
*/
|
282 |
public com.iver.andami.config.generate.Plugin removePlugin(int index) |
283 |
{ |
284 |
java.lang.Object obj = _pluginList.elementAt(index); |
285 |
_pluginList.removeElementAt(index); |
286 |
return (com.iver.andami.config.generate.Plugin) obj;
|
287 |
} //-- com.iver.andami.config.generate.Plugin removePlugin(int)
|
288 |
|
289 |
/**
|
290 |
* Sets the value of field 'andami'.
|
291 |
*
|
292 |
* @param andami the value of field 'andami'.
|
293 |
*/
|
294 |
public void setAndami(com.iver.andami.config.generate.Andami andami) |
295 |
{ |
296 |
this._andami = andami;
|
297 |
} //-- void setAndami(com.iver.andami.config.generate.Andami)
|
298 |
|
299 |
/**
|
300 |
* Sets the value of field 'andamiOptions'.
|
301 |
*
|
302 |
* @param andamiOptions the value of field 'andamiOptions'.
|
303 |
*/
|
304 |
public void setAndamiOptions(com.iver.andami.config.generate.AndamiOptions andamiOptions) |
305 |
{ |
306 |
this._andamiOptions = andamiOptions;
|
307 |
} //-- void setAndamiOptions(com.iver.andami.config.generate.AndamiOptions)
|
308 |
|
309 |
/**
|
310 |
* Sets the value of field 'localeCountry'.
|
311 |
*
|
312 |
* @param localeCountry the value of field 'localeCountry'.
|
313 |
*/
|
314 |
public void setLocaleCountry(java.lang.String localeCountry) |
315 |
{ |
316 |
this._localeCountry = localeCountry;
|
317 |
} //-- void setLocaleCountry(java.lang.String)
|
318 |
|
319 |
/**
|
320 |
* Sets the value of field 'localeLanguage'.
|
321 |
*
|
322 |
* @param localeLanguage the value of field 'localeLanguage'.
|
323 |
*/
|
324 |
public void setLocaleLanguage(java.lang.String localeLanguage) |
325 |
{ |
326 |
this._localeLanguage = localeLanguage;
|
327 |
} //-- void setLocaleLanguage(java.lang.String)
|
328 |
|
329 |
/**
|
330 |
* Sets the value of field 'localeVariant'.
|
331 |
*
|
332 |
* @param localeVariant the value of field 'localeVariant'.
|
333 |
*/
|
334 |
public void setLocaleVariant(java.lang.String localeVariant) |
335 |
{ |
336 |
this._localeVariant = localeVariant;
|
337 |
} //-- void setLocaleVariant(java.lang.String)
|
338 |
|
339 |
/**
|
340 |
* Sets the value of field 'lookAndFeel'.
|
341 |
*
|
342 |
* @param lookAndFeel the value of field 'lookAndFeel'.
|
343 |
*/
|
344 |
public void setLookAndFeel(java.lang.String lookAndFeel) |
345 |
{ |
346 |
this._lookAndFeel = lookAndFeel;
|
347 |
} //-- void setLookAndFeel(java.lang.String)
|
348 |
|
349 |
/**
|
350 |
* Method setPlugin
|
351 |
*
|
352 |
* @param index
|
353 |
* @param vPlugin
|
354 |
*/
|
355 |
public void setPlugin(int index, com.iver.andami.config.generate.Plugin vPlugin) |
356 |
throws java.lang.IndexOutOfBoundsException
|
357 |
{ |
358 |
//-- check bounds for index
|
359 |
if ((index < 0) || (index > _pluginList.size())) { |
360 |
throw new IndexOutOfBoundsException(); |
361 |
} |
362 |
_pluginList.setElementAt(vPlugin, index); |
363 |
} //-- void setPlugin(int, com.iver.andami.config.generate.Plugin)
|
364 |
|
365 |
/**
|
366 |
* Method setPlugin
|
367 |
*
|
368 |
* @param pluginArray
|
369 |
*/
|
370 |
public void setPlugin(com.iver.andami.config.generate.Plugin[] pluginArray) |
371 |
{ |
372 |
//-- copy array
|
373 |
_pluginList.removeAllElements(); |
374 |
for (int i = 0; i < pluginArray.length; i++) { |
375 |
_pluginList.addElement(pluginArray[i]); |
376 |
} |
377 |
} //-- void setPlugin(com.iver.andami.config.generate.Plugin)
|
378 |
|
379 |
/**
|
380 |
* Sets the value of field 'pluginsDirectory'.
|
381 |
*
|
382 |
* @param pluginsDirectory the value of field 'pluginsDirectory'
|
383 |
*/
|
384 |
public void setPluginsDirectory(java.lang.String pluginsDirectory) |
385 |
{ |
386 |
this._pluginsDirectory = pluginsDirectory;
|
387 |
} //-- void setPluginsDirectory(java.lang.String)
|
388 |
|
389 |
/**
|
390 |
* Method unmarshal
|
391 |
*
|
392 |
* @param reader
|
393 |
*/
|
394 |
public static java.lang.Object unmarshal(java.io.Reader reader) |
395 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
|
396 |
{ |
397 |
return (com.iver.andami.config.generate.AndamiConfig) Unmarshaller.unmarshal(com.iver.andami.config.generate.AndamiConfig.class, reader);
|
398 |
} //-- java.lang.Object unmarshal(java.io.Reader)
|
399 |
|
400 |
/**
|
401 |
* Method validate
|
402 |
*/
|
403 |
public void validate() |
404 |
throws org.exolab.castor.xml.ValidationException
|
405 |
{ |
406 |
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
|
407 |
validator.validate(this);
|
408 |
} //-- void validate()
|
409 |
|
410 |
} |