2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
\r
8 package jalview.schemabinding.version2;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import org.exolab.castor.xml.Marshaller;
\r
15 import org.exolab.castor.xml.Unmarshaller;
\r
18 * Class AlcodonFrame.
\r
20 * @version $Revision$ $Date$
\r
22 public class AlcodonFrame implements java.io.Serializable {
\r
25 //--------------------------/
\r
26 //- Class/Member Variables -/
\r
27 //--------------------------/
\r
30 * Field _alcodonList.
\r
32 private java.util.Vector _alcodonList;
\r
35 * Field _alcodMapList.
\r
37 private java.util.Vector _alcodMapList;
\r
44 public AlcodonFrame() {
\r
46 this._alcodonList = new java.util.Vector();
\r
47 this._alcodMapList = new java.util.Vector();
\r
59 * @throws java.lang.IndexOutOfBoundsException if the index
\r
60 * given is outside the bounds of the collection
\r
62 public void addAlcodMap(
\r
63 final jalview.schemabinding.version2.AlcodMap vAlcodMap)
\r
64 throws java.lang.IndexOutOfBoundsException {
\r
65 this._alcodMapList.addElement(vAlcodMap);
\r
73 * @throws java.lang.IndexOutOfBoundsException if the index
\r
74 * given is outside the bounds of the collection
\r
76 public void addAlcodMap(
\r
78 final jalview.schemabinding.version2.AlcodMap vAlcodMap)
\r
79 throws java.lang.IndexOutOfBoundsException {
\r
80 this._alcodMapList.add(index, vAlcodMap);
\r
87 * @throws java.lang.IndexOutOfBoundsException if the index
\r
88 * given is outside the bounds of the collection
\r
90 public void addAlcodon(
\r
91 final jalview.schemabinding.version2.Alcodon vAlcodon)
\r
92 throws java.lang.IndexOutOfBoundsException {
\r
93 this._alcodonList.addElement(vAlcodon);
\r
101 * @throws java.lang.IndexOutOfBoundsException if the index
\r
102 * given is outside the bounds of the collection
\r
104 public void addAlcodon(
\r
106 final jalview.schemabinding.version2.Alcodon vAlcodon)
\r
107 throws java.lang.IndexOutOfBoundsException {
\r
108 this._alcodonList.add(index, vAlcodon);
\r
112 * Method enumerateAlcodMap.
\r
114 * @return an Enumeration over all
\r
115 * jalview.schemabinding.version2.AlcodMap elements
\r
117 public java.util.Enumeration enumerateAlcodMap(
\r
119 return this._alcodMapList.elements();
\r
123 * Method enumerateAlcodon.
\r
125 * @return an Enumeration over all
\r
126 * jalview.schemabinding.version2.Alcodon elements
\r
128 public java.util.Enumeration enumerateAlcodon(
\r
130 return this._alcodonList.elements();
\r
134 * Method getAlcodMap.
\r
137 * @throws java.lang.IndexOutOfBoundsException if the index
\r
138 * given is outside the bounds of the collection
\r
139 * @return the value of the
\r
140 * jalview.schemabinding.version2.AlcodMap at the given index
\r
142 public jalview.schemabinding.version2.AlcodMap getAlcodMap(
\r
144 throws java.lang.IndexOutOfBoundsException {
\r
145 // check bounds for index
\r
146 if (index < 0 || index >= this._alcodMapList.size()) {
\r
147 throw new IndexOutOfBoundsException("getAlcodMap: Index value '" + index + "' not in range [0.." + (this._alcodMapList.size() - 1) + "]");
\r
150 return (jalview.schemabinding.version2.AlcodMap) _alcodMapList.get(index);
\r
154 * Method getAlcodMap.Returns the contents of the collection in
\r
155 * an Array. <p>Note: Just in case the collection contents
\r
156 * are changing in another thread, we pass a 0-length Array of
\r
157 * the correct type into the API call. This way we <i>know</i>
\r
158 * that the Array returned is of exactly the correct length.
\r
160 * @return this collection as an Array
\r
162 public jalview.schemabinding.version2.AlcodMap[] getAlcodMap(
\r
164 jalview.schemabinding.version2.AlcodMap[] array = new jalview.schemabinding.version2.AlcodMap[0];
\r
165 return (jalview.schemabinding.version2.AlcodMap[]) this._alcodMapList.toArray(array);
\r
169 * Method getAlcodMapCount.
\r
171 * @return the size of this collection
\r
173 public int getAlcodMapCount(
\r
175 return this._alcodMapList.size();
\r
179 * Method getAlcodon.
\r
182 * @throws java.lang.IndexOutOfBoundsException if the index
\r
183 * given is outside the bounds of the collection
\r
184 * @return the value of the
\r
185 * jalview.schemabinding.version2.Alcodon at the given index
\r
187 public jalview.schemabinding.version2.Alcodon getAlcodon(
\r
189 throws java.lang.IndexOutOfBoundsException {
\r
190 // check bounds for index
\r
191 if (index < 0 || index >= this._alcodonList.size()) {
\r
192 throw new IndexOutOfBoundsException("getAlcodon: Index value '" + index + "' not in range [0.." + (this._alcodonList.size() - 1) + "]");
\r
195 return (jalview.schemabinding.version2.Alcodon) _alcodonList.get(index);
\r
199 * Method getAlcodon.Returns the contents of the collection in
\r
200 * an Array. <p>Note: Just in case the collection contents
\r
201 * are changing in another thread, we pass a 0-length Array of
\r
202 * the correct type into the API call. This way we <i>know</i>
\r
203 * that the Array returned is of exactly the correct length.
\r
205 * @return this collection as an Array
\r
207 public jalview.schemabinding.version2.Alcodon[] getAlcodon(
\r
209 jalview.schemabinding.version2.Alcodon[] array = new jalview.schemabinding.version2.Alcodon[0];
\r
210 return (jalview.schemabinding.version2.Alcodon[]) this._alcodonList.toArray(array);
\r
214 * Method getAlcodonCount.
\r
216 * @return the size of this collection
\r
218 public int getAlcodonCount(
\r
220 return this._alcodonList.size();
\r
226 * @return true if this object is valid according to the schema
\r
228 public boolean isValid(
\r
232 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
242 * @throws org.exolab.castor.xml.MarshalException if object is
\r
243 * null or if any SAXException is thrown during marshaling
\r
244 * @throws org.exolab.castor.xml.ValidationException if this
\r
245 * object is an invalid instance according to the schema
\r
247 public void marshal(
\r
248 final java.io.Writer out)
\r
249 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
250 Marshaller.marshal(this, out);
\r
257 * @throws java.io.IOException if an IOException occurs during
\r
259 * @throws org.exolab.castor.xml.ValidationException if this
\r
260 * object is an invalid instance according to the schema
\r
261 * @throws org.exolab.castor.xml.MarshalException if object is
\r
262 * null or if any SAXException is thrown during marshaling
\r
264 public void marshal(
\r
265 final org.xml.sax.ContentHandler handler)
\r
266 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
267 Marshaller.marshal(this, handler);
\r
271 * Method removeAlcodMap.
\r
274 * @return true if the object was removed from the collection.
\r
276 public boolean removeAlcodMap(
\r
277 final jalview.schemabinding.version2.AlcodMap vAlcodMap) {
\r
278 boolean removed = _alcodMapList.remove(vAlcodMap);
\r
283 * Method removeAlcodMapAt.
\r
286 * @return the element removed from the collection
\r
288 public jalview.schemabinding.version2.AlcodMap removeAlcodMapAt(
\r
290 java.lang.Object obj = this._alcodMapList.remove(index);
\r
291 return (jalview.schemabinding.version2.AlcodMap) obj;
\r
295 * Method removeAlcodon.
\r
298 * @return true if the object was removed from the collection.
\r
300 public boolean removeAlcodon(
\r
301 final jalview.schemabinding.version2.Alcodon vAlcodon) {
\r
302 boolean removed = _alcodonList.remove(vAlcodon);
\r
307 * Method removeAlcodonAt.
\r
310 * @return the element removed from the collection
\r
312 public jalview.schemabinding.version2.Alcodon removeAlcodonAt(
\r
314 java.lang.Object obj = this._alcodonList.remove(index);
\r
315 return (jalview.schemabinding.version2.Alcodon) obj;
\r
320 public void removeAllAlcodMap(
\r
322 this._alcodMapList.clear();
\r
327 public void removeAllAlcodon(
\r
329 this._alcodonList.clear();
\r
337 * @throws java.lang.IndexOutOfBoundsException if the index
\r
338 * given is outside the bounds of the collection
\r
340 public void setAlcodMap(
\r
342 final jalview.schemabinding.version2.AlcodMap vAlcodMap)
\r
343 throws java.lang.IndexOutOfBoundsException {
\r
344 // check bounds for index
\r
345 if (index < 0 || index >= this._alcodMapList.size()) {
\r
346 throw new IndexOutOfBoundsException("setAlcodMap: Index value '" + index + "' not in range [0.." + (this._alcodMapList.size() - 1) + "]");
\r
349 this._alcodMapList.set(index, vAlcodMap);
\r
355 * @param vAlcodMapArray
\r
357 public void setAlcodMap(
\r
358 final jalview.schemabinding.version2.AlcodMap[] vAlcodMapArray) {
\r
360 _alcodMapList.clear();
\r
362 for (int i = 0; i < vAlcodMapArray.length; i++) {
\r
363 this._alcodMapList.add(vAlcodMapArray[i]);
\r
372 * @throws java.lang.IndexOutOfBoundsException if the index
\r
373 * given is outside the bounds of the collection
\r
375 public void setAlcodon(
\r
377 final jalview.schemabinding.version2.Alcodon vAlcodon)
\r
378 throws java.lang.IndexOutOfBoundsException {
\r
379 // check bounds for index
\r
380 if (index < 0 || index >= this._alcodonList.size()) {
\r
381 throw new IndexOutOfBoundsException("setAlcodon: Index value '" + index + "' not in range [0.." + (this._alcodonList.size() - 1) + "]");
\r
384 this._alcodonList.set(index, vAlcodon);
\r
390 * @param vAlcodonArray
\r
392 public void setAlcodon(
\r
393 final jalview.schemabinding.version2.Alcodon[] vAlcodonArray) {
\r
395 _alcodonList.clear();
\r
397 for (int i = 0; i < vAlcodonArray.length; i++) {
\r
398 this._alcodonList.add(vAlcodonArray[i]);
\r
403 * Method unmarshal.
\r
406 * @throws org.exolab.castor.xml.MarshalException if object is
\r
407 * null or if any SAXException is thrown during marshaling
\r
408 * @throws org.exolab.castor.xml.ValidationException if this
\r
409 * object is an invalid instance according to the schema
\r
410 * @return the unmarshaled
\r
411 * jalview.schemabinding.version2.AlcodonFrame
\r
413 public static jalview.schemabinding.version2.AlcodonFrame unmarshal(
\r
414 final java.io.Reader reader)
\r
415 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
416 return (jalview.schemabinding.version2.AlcodonFrame) Unmarshaller.unmarshal(jalview.schemabinding.version2.AlcodonFrame.class, reader);
\r
422 * @throws org.exolab.castor.xml.ValidationException if this
\r
423 * object is an invalid instance according to the schema
\r
425 public void validate(
\r
427 throws org.exolab.castor.xml.ValidationException {
\r
428 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
429 validator.validate(this);
\r