Statistics
| Revision:

root / trunk / frameworks / _fwAndami / src / com / iver / andami / config / generate / AndamiOptions.java @ 11032

History | View | Annotate | Download (7 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$
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 AndamiOptions.
28
 * 
29
 * @version $Revision$ $Date$
30
 */
31
public class AndamiOptions implements java.io.Serializable {
32

    
33

    
34
      //--------------------------/
35
     //- Class/Member Variables -/
36
    //--------------------------/
37

    
38
    /**
39
     * Field _optionList
40
     */
41
    private java.util.Vector _optionList;
42

    
43
    /**
44
     * Field _iconTheme
45
     */
46
    private com.iver.andami.config.generate.IconTheme _iconTheme;
47

    
48

    
49
      //----------------/
50
     //- Constructors -/
51
    //----------------/
52

    
53
    public AndamiOptions() {
54
        super();
55
        _optionList = new Vector();
56
    } //-- com.iver.andami.config.generate.AndamiOptions()
57

    
58

    
59
      //-----------/
60
     //- Methods -/
61
    //-----------/
62

    
63
    /**
64
     * Method addOption
65
     * 
66
     * @param vOption
67
     */
68
    public void addOption(com.iver.andami.config.generate.Option vOption)
69
        throws java.lang.IndexOutOfBoundsException
70
    {
71
        _optionList.addElement(vOption);
72
    } //-- void addOption(com.iver.andami.config.generate.Option) 
73

    
74
    /**
75
     * Method addOption
76
     * 
77
     * @param index
78
     * @param vOption
79
     */
80
    public void addOption(int index, com.iver.andami.config.generate.Option vOption)
81
        throws java.lang.IndexOutOfBoundsException
82
    {
83
        _optionList.insertElementAt(vOption, index);
84
    } //-- void addOption(int, com.iver.andami.config.generate.Option) 
85

    
86
    /**
87
     * Method enumerateOption
88
     */
89
    public java.util.Enumeration enumerateOption()
90
    {
91
        return _optionList.elements();
92
    } //-- java.util.Enumeration enumerateOption() 
93

    
94
    /**
95
     * Returns the value of field 'iconTheme'.
96
     * 
97
     * @return the value of field 'iconTheme'.
98
     */
99
    public com.iver.andami.config.generate.IconTheme getIconTheme()
100
    {
101
        return this._iconTheme;
102
    } //-- com.iver.andami.config.generate.IconTheme getIconTheme() 
103

    
104
    /**
105
     * Method getOption
106
     * 
107
     * @param index
108
     */
109
    public com.iver.andami.config.generate.Option getOption(int index)
110
        throws java.lang.IndexOutOfBoundsException
111
    {
112
        //-- check bounds for index
113
        if ((index < 0) || (index > _optionList.size())) {
114
            throw new IndexOutOfBoundsException();
115
        }
116
        
117
        return (com.iver.andami.config.generate.Option) _optionList.elementAt(index);
118
    } //-- com.iver.andami.config.generate.Option getOption(int) 
119

    
120
    /**
121
     * Method getOption
122
     */
123
    public com.iver.andami.config.generate.Option[] getOption()
124
    {
125
        int size = _optionList.size();
126
        com.iver.andami.config.generate.Option[] mArray = new com.iver.andami.config.generate.Option[size];
127
        for (int index = 0; index < size; index++) {
128
            mArray[index] = (com.iver.andami.config.generate.Option) _optionList.elementAt(index);
129
        }
130
        return mArray;
131
    } //-- com.iver.andami.config.generate.Option[] getOption() 
132

    
133
    /**
134
     * Method getOptionCount
135
     */
136
    public int getOptionCount()
137
    {
138
        return _optionList.size();
139
    } //-- int getOptionCount() 
140

    
141
    /**
142
     * Method isValid
143
     */
144
    public boolean isValid()
145
    {
146
        try {
147
            validate();
148
        }
149
        catch (org.exolab.castor.xml.ValidationException vex) {
150
            return false;
151
        }
152
        return true;
153
    } //-- boolean isValid() 
154

    
155
    /**
156
     * Method marshal
157
     * 
158
     * @param out
159
     */
160
    public void marshal(java.io.Writer out)
161
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
162
    {
163
        
164
        Marshaller.marshal(this, out);
165
    } //-- void marshal(java.io.Writer) 
166

    
167
    /**
168
     * Method marshal
169
     * 
170
     * @param handler
171
     */
172
    public void marshal(org.xml.sax.ContentHandler handler)
173
        throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
174
    {
175
        
176
        Marshaller.marshal(this, handler);
177
    } //-- void marshal(org.xml.sax.ContentHandler) 
178

    
179
    /**
180
     * Method removeAllOption
181
     */
182
    public void removeAllOption()
183
    {
184
        _optionList.removeAllElements();
185
    } //-- void removeAllOption() 
186

    
187
    /**
188
     * Method removeOption
189
     * 
190
     * @param index
191
     */
192
    public com.iver.andami.config.generate.Option removeOption(int index)
193
    {
194
        java.lang.Object obj = _optionList.elementAt(index);
195
        _optionList.removeElementAt(index);
196
        return (com.iver.andami.config.generate.Option) obj;
197
    } //-- com.iver.andami.config.generate.Option removeOption(int) 
198

    
199
    /**
200
     * Sets the value of field 'iconTheme'.
201
     * 
202
     * @param iconTheme the value of field 'iconTheme'.
203
     */
204
    public void setIconTheme(com.iver.andami.config.generate.IconTheme iconTheme)
205
    {
206
        this._iconTheme = iconTheme;
207
    } //-- void setIconTheme(com.iver.andami.config.generate.IconTheme) 
208

    
209
    /**
210
     * Method setOption
211
     * 
212
     * @param index
213
     * @param vOption
214
     */
215
    public void setOption(int index, com.iver.andami.config.generate.Option vOption)
216
        throws java.lang.IndexOutOfBoundsException
217
    {
218
        //-- check bounds for index
219
        if ((index < 0) || (index > _optionList.size())) {
220
            throw new IndexOutOfBoundsException();
221
        }
222
        _optionList.setElementAt(vOption, index);
223
    } //-- void setOption(int, com.iver.andami.config.generate.Option) 
224

    
225
    /**
226
     * Method setOption
227
     * 
228
     * @param optionArray
229
     */
230
    public void setOption(com.iver.andami.config.generate.Option[] optionArray)
231
    {
232
        //-- copy array
233
        _optionList.removeAllElements();
234
        for (int i = 0; i < optionArray.length; i++) {
235
            _optionList.addElement(optionArray[i]);
236
        }
237
    } //-- void setOption(com.iver.andami.config.generate.Option) 
238

    
239
    /**
240
     * Method unmarshal
241
     * 
242
     * @param reader
243
     */
244
    public static java.lang.Object unmarshal(java.io.Reader reader)
245
        throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
246
    {
247
        return (com.iver.andami.config.generate.AndamiOptions) Unmarshaller.unmarshal(com.iver.andami.config.generate.AndamiOptions.class, reader);
248
    } //-- java.lang.Object unmarshal(java.io.Reader) 
249

    
250
    /**
251
     * Method validate
252
     */
253
    public void validate()
254
        throws org.exolab.castor.xml.ValidationException
255
    {
256
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
257
        validator.validate(this);
258
    } //-- void validate() 
259

    
260
}