Statistics
| Revision:

root / trunk / frameworks / _fwAndami / src / com / iver / andami / config / generate / AndamiConfig.java @ 9956

History | View | Annotate | Download (10.2 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 9956 2007-01-29 11:50:30Z caballero $
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: 9956 $ $Date: 2007-01-29 12:50:30 +0100 (Mon, 29 Jan 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
      //----------------/
75
     //- Constructors -/
76
    //----------------/
77

    
78
    public AndamiConfig() {
79
        super();
80
        _pluginList = new Vector();
81
    } //-- com.iver.andami.config.generate.AndamiConfig()
82

    
83

    
84
      //-----------/
85
     //- Methods -/
86
    //-----------/
87

    
88
    /**
89
     * Method addPlugin
90
     * 
91
     * @param vPlugin
92
     */
93
    public void addPlugin(com.iver.andami.config.generate.Plugin vPlugin)
94
        throws java.lang.IndexOutOfBoundsException
95
    {
96
        _pluginList.addElement(vPlugin);
97
    } //-- void addPlugin(com.iver.andami.config.generate.Plugin) 
98

    
99
    /**
100
     * Method addPlugin
101
     * 
102
     * @param index
103
     * @param vPlugin
104
     */
105
    public void addPlugin(int index, com.iver.andami.config.generate.Plugin vPlugin)
106
        throws java.lang.IndexOutOfBoundsException
107
    {
108
        _pluginList.insertElementAt(vPlugin, index);
109
    } //-- void addPlugin(int, com.iver.andami.config.generate.Plugin) 
110

    
111
    /**
112
     * Method enumeratePlugin
113
     */
114
    public java.util.Enumeration enumeratePlugin()
115
    {
116
        return _pluginList.elements();
117
    } //-- java.util.Enumeration enumeratePlugin() 
118

    
119
    /**
120
     * Returns the value of field 'andami'.
121
     * 
122
     * @return the value of field 'andami'.
123
     */
124
    public com.iver.andami.config.generate.Andami getAndami()
125
    {
126
        return this._andami;
127
    } //-- com.iver.andami.config.generate.Andami getAndami() 
128

    
129
    /**
130
     * Returns the value of field 'localeCountry'.
131
     * 
132
     * @return the value of field 'localeCountry'.
133
     */
134
    public java.lang.String getLocaleCountry()
135
    {
136
        return this._localeCountry;
137
    } //-- java.lang.String getLocaleCountry() 
138

    
139
    /**
140
     * Returns the value of field 'localeLanguage'.
141
     * 
142
     * @return the value of field 'localeLanguage'.
143
     */
144
    public java.lang.String getLocaleLanguage()
145
    {
146
        return this._localeLanguage;
147
    } //-- java.lang.String getLocaleLanguage() 
148

    
149
    /**
150
     * Returns the value of field 'localeVariant'.
151
     * 
152
     * @return the value of field 'localeVariant'.
153
     */
154
    public java.lang.String getLocaleVariant()
155
    {
156
        return this._localeVariant;
157
    } //-- java.lang.String getLocaleVariant() 
158

    
159
    /**
160
     * Returns the value of field 'lookAndFeel'.
161
     * 
162
     * @return the value of field 'lookAndFeel'.
163
     */
164
    public java.lang.String getLookAndFeel()
165
    {
166
        return this._lookAndFeel;
167
    } //-- java.lang.String getLookAndFeel() 
168

    
169
    /**
170
     * Method getPlugin
171
     * 
172
     * @param index
173
     */
174
    public com.iver.andami.config.generate.Plugin getPlugin(int index)
175
        throws java.lang.IndexOutOfBoundsException
176
    {
177
        //-- check bounds for index
178
        if ((index < 0) || (index > _pluginList.size())) {
179
            throw new IndexOutOfBoundsException();
180
        }
181
        
182
        return (com.iver.andami.config.generate.Plugin) _pluginList.elementAt(index);
183
    } //-- com.iver.andami.config.generate.Plugin getPlugin(int) 
184

    
185
    /**
186
     * Method getPlugin
187
     */
188
    public com.iver.andami.config.generate.Plugin[] getPlugin()
189
    {
190
        int size = _pluginList.size();
191
        com.iver.andami.config.generate.Plugin[] mArray = new com.iver.andami.config.generate.Plugin[size];
192
        for (int index = 0; index < size; index++) {
193
            mArray[index] = (com.iver.andami.config.generate.Plugin) _pluginList.elementAt(index);
194
        }
195
        return mArray;
196
    } //-- com.iver.andami.config.generate.Plugin[] getPlugin() 
197

    
198
    /**
199
     * Method getPluginCount
200
     */
201
    public int getPluginCount()
202
    {
203
        return _pluginList.size();
204
    } //-- int getPluginCount() 
205

    
206
    /**
207
     * Returns the value of field 'pluginsDirectory'.
208
     * 
209
     * @return the value of field 'pluginsDirectory'.
210
     */
211
    public java.lang.String getPluginsDirectory()
212
    {
213
        return this._pluginsDirectory;
214
    } //-- java.lang.String getPluginsDirectory() 
215

    
216
    /**
217
     * Method isValid
218
     */
219
    public boolean isValid()
220
    {
221
        try {
222
            validate();
223
        }
224
        catch (org.exolab.castor.xml.ValidationException vex) {
225
            return false;
226
        }
227
        return true;
228
    } //-- boolean isValid() 
229

    
230
    /**
231
     * Method marshal
232
     * 
233
     * @param out
234
     */
235
    public void marshal(java.io.Writer out)
236
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
237
    {
238
        
239
        Marshaller.marshal(this, out);
240
    } //-- void marshal(java.io.Writer) 
241

    
242
    /**
243
     * Method marshal
244
     * 
245
     * @param handler
246
     */
247
    public void marshal(org.xml.sax.ContentHandler handler)
248
        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
249
    {
250
        
251
        Marshaller.marshal(this, handler);
252
    } //-- void marshal(org.xml.sax.ContentHandler) 
253

    
254
    /**
255
     * Method removeAllPlugin
256
     */
257
    public void removeAllPlugin()
258
    {
259
        _pluginList.removeAllElements();
260
    } //-- void removeAllPlugin() 
261

    
262
    /**
263
     * Method removePlugin
264
     * 
265
     * @param index
266
     */
267
    public com.iver.andami.config.generate.Plugin removePlugin(int index)
268
    {
269
        java.lang.Object obj = _pluginList.elementAt(index);
270
        _pluginList.removeElementAt(index);
271
        return (com.iver.andami.config.generate.Plugin) obj;
272
    } //-- com.iver.andami.config.generate.Plugin removePlugin(int) 
273

    
274
    /**
275
     * Sets the value of field 'andami'.
276
     * 
277
     * @param andami the value of field 'andami'.
278
     */
279
    public void setAndami(com.iver.andami.config.generate.Andami andami)
280
    {
281
        this._andami = andami;
282
    } //-- void setAndami(com.iver.andami.config.generate.Andami) 
283

    
284
    /**
285
     * Sets the value of field 'localeCountry'.
286
     * 
287
     * @param localeCountry the value of field 'localeCountry'.
288
     */
289
    public void setLocaleCountry(java.lang.String localeCountry)
290
    {
291
        this._localeCountry = localeCountry;
292
    } //-- void setLocaleCountry(java.lang.String) 
293

    
294
    /**
295
     * Sets the value of field 'localeLanguage'.
296
     * 
297
     * @param localeLanguage the value of field 'localeLanguage'.
298
     */
299
    public void setLocaleLanguage(java.lang.String localeLanguage)
300
    {
301
        this._localeLanguage = localeLanguage;
302
    } //-- void setLocaleLanguage(java.lang.String) 
303

    
304
    /**
305
     * Sets the value of field 'localeVariant'.
306
     * 
307
     * @param localeVariant the value of field 'localeVariant'.
308
     */
309
    public void setLocaleVariant(java.lang.String localeVariant)
310
    {
311
        this._localeVariant = localeVariant;
312
    } //-- void setLocaleVariant(java.lang.String) 
313

    
314
    /**
315
     * Sets the value of field 'lookAndFeel'.
316
     * 
317
     * @param lookAndFeel the value of field 'lookAndFeel'.
318
     */
319
    public void setLookAndFeel(java.lang.String lookAndFeel)
320
    {
321
        this._lookAndFeel = lookAndFeel;
322
    } //-- void setLookAndFeel(java.lang.String) 
323

    
324
    /**
325
     * Method setPlugin
326
     * 
327
     * @param index
328
     * @param vPlugin
329
     */
330
    public void setPlugin(int index, com.iver.andami.config.generate.Plugin vPlugin)
331
        throws java.lang.IndexOutOfBoundsException
332
    {
333
        //-- check bounds for index
334
        if ((index < 0) || (index > _pluginList.size())) {
335
            throw new IndexOutOfBoundsException();
336
        }
337
        _pluginList.setElementAt(vPlugin, index);
338
    } //-- void setPlugin(int, com.iver.andami.config.generate.Plugin) 
339

    
340
    /**
341
     * Method setPlugin
342
     * 
343
     * @param pluginArray
344
     */
345
    public void setPlugin(com.iver.andami.config.generate.Plugin[] pluginArray)
346
    {
347
        //-- copy array
348
        _pluginList.removeAllElements();
349
        for (int i = 0; i < pluginArray.length; i++) {
350
            _pluginList.addElement(pluginArray[i]);
351
        }
352
    } //-- void setPlugin(com.iver.andami.config.generate.Plugin) 
353

    
354
    /**
355
     * Sets the value of field 'pluginsDirectory'.
356
     * 
357
     * @param pluginsDirectory the value of field 'pluginsDirectory'
358
     */
359
    public void setPluginsDirectory(java.lang.String pluginsDirectory)
360
    {
361
        this._pluginsDirectory = pluginsDirectory;
362
    } //-- void setPluginsDirectory(java.lang.String) 
363

    
364
    /**
365
     * Method unmarshal
366
     * 
367
     * @param reader
368
     */
369
    public static java.lang.Object unmarshal(java.io.Reader reader)
370
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
371
    {
372
        return (com.iver.andami.config.generate.AndamiConfig) Unmarshaller.unmarshal(com.iver.andami.config.generate.AndamiConfig.class, reader);
373
    } //-- java.lang.Object unmarshal(java.io.Reader) 
374

    
375
    /**
376
     * Method validate
377
     */
378
    public void validate()
379
        throws org.exolab.castor.xml.ValidationException
380
    {
381
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
382
        validator.validate(this);
383
    } //-- void validate() 
384

    
385
}