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
20 * @version $Revision$ $Date$
\r
22 public class VAMSAS implements java.io.Serializable {
\r
25 //--------------------------/
\r
26 //- Class/Member Variables -/
\r
27 //--------------------------/
\r
32 private java.util.Vector _treeList;
\r
35 * Field _sequenceSetList.
\r
37 private java.util.Vector _sequenceSetList;
\r
46 this._treeList = new java.util.Vector();
\r
47 this._sequenceSetList = new java.util.Vector();
\r
58 * @param vSequenceSet
\r
59 * @throws java.lang.IndexOutOfBoundsException if the index
\r
60 * given is outside the bounds of the collection
\r
62 public void addSequenceSet(
\r
63 final jalview.schemabinding.version2.SequenceSet vSequenceSet)
\r
64 throws java.lang.IndexOutOfBoundsException {
\r
65 this._sequenceSetList.addElement(vSequenceSet);
\r
72 * @param vSequenceSet
\r
73 * @throws java.lang.IndexOutOfBoundsException if the index
\r
74 * given is outside the bounds of the collection
\r
76 public void addSequenceSet(
\r
78 final jalview.schemabinding.version2.SequenceSet vSequenceSet)
\r
79 throws java.lang.IndexOutOfBoundsException {
\r
80 this._sequenceSetList.add(index, vSequenceSet);
\r
87 * @throws java.lang.IndexOutOfBoundsException if the index
\r
88 * given is outside the bounds of the collection
\r
90 public void addTree(
\r
91 final java.lang.String vTree)
\r
92 throws java.lang.IndexOutOfBoundsException {
\r
93 this._treeList.addElement(vTree);
\r
101 * @throws java.lang.IndexOutOfBoundsException if the index
\r
102 * given is outside the bounds of the collection
\r
104 public void addTree(
\r
106 final java.lang.String vTree)
\r
107 throws java.lang.IndexOutOfBoundsException {
\r
108 this._treeList.add(index, vTree);
\r
112 * Method enumerateSequenceSet.
\r
114 * @return an Enumeration over all
\r
115 * jalview.schemabinding.version2.SequenceSet elements
\r
117 public java.util.Enumeration enumerateSequenceSet(
\r
119 return this._sequenceSetList.elements();
\r
123 * Method enumerateTree.
\r
125 * @return an Enumeration over all java.lang.String elements
\r
127 public java.util.Enumeration enumerateTree(
\r
129 return this._treeList.elements();
\r
133 * Method getSequenceSet.
\r
136 * @throws java.lang.IndexOutOfBoundsException if the index
\r
137 * given is outside the bounds of the collection
\r
138 * @return the value of the
\r
139 * jalview.schemabinding.version2.SequenceSet at the given index
\r
141 public jalview.schemabinding.version2.SequenceSet getSequenceSet(
\r
143 throws java.lang.IndexOutOfBoundsException {
\r
144 // check bounds for index
\r
145 if (index < 0 || index >= this._sequenceSetList.size()) {
\r
146 throw new IndexOutOfBoundsException("getSequenceSet: Index value '" + index + "' not in range [0.." + (this._sequenceSetList.size() - 1) + "]");
\r
149 return (jalview.schemabinding.version2.SequenceSet) _sequenceSetList.get(index);
\r
153 * Method getSequenceSet.Returns the contents of the collection
\r
154 * in an Array. <p>Note: Just in case the collection contents
\r
155 * are changing in another thread, we pass a 0-length Array of
\r
156 * the correct type into the API call. This way we <i>know</i>
\r
157 * that the Array returned is of exactly the correct length.
\r
159 * @return this collection as an Array
\r
161 public jalview.schemabinding.version2.SequenceSet[] getSequenceSet(
\r
163 jalview.schemabinding.version2.SequenceSet[] array = new jalview.schemabinding.version2.SequenceSet[0];
\r
164 return (jalview.schemabinding.version2.SequenceSet[]) this._sequenceSetList.toArray(array);
\r
168 * Method getSequenceSetCount.
\r
170 * @return the size of this collection
\r
172 public int getSequenceSetCount(
\r
174 return this._sequenceSetList.size();
\r
181 * @throws java.lang.IndexOutOfBoundsException if the index
\r
182 * given is outside the bounds of the collection
\r
183 * @return the value of the java.lang.String at the given index
\r
185 public java.lang.String getTree(
\r
187 throws java.lang.IndexOutOfBoundsException {
\r
188 // check bounds for index
\r
189 if (index < 0 || index >= this._treeList.size()) {
\r
190 throw new IndexOutOfBoundsException("getTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
\r
193 return (java.lang.String) _treeList.get(index);
\r
197 * Method getTree.Returns the contents of the collection in an
\r
198 * Array. <p>Note: Just in case the collection contents are
\r
199 * changing in another thread, we pass a 0-length Array of the
\r
200 * correct type into the API call. This way we <i>know</i>
\r
201 * that the Array returned is of exactly the correct length.
\r
203 * @return this collection as an Array
\r
205 public java.lang.String[] getTree(
\r
207 java.lang.String[] array = new java.lang.String[0];
\r
208 return (java.lang.String[]) this._treeList.toArray(array);
\r
212 * Method getTreeCount.
\r
214 * @return the size of this collection
\r
216 public int getTreeCount(
\r
218 return this._treeList.size();
\r
224 * @return true if this object is valid according to the schema
\r
226 public boolean isValid(
\r
230 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
240 * @throws org.exolab.castor.xml.MarshalException if object is
\r
241 * null or if any SAXException is thrown during marshaling
\r
242 * @throws org.exolab.castor.xml.ValidationException if this
\r
243 * object is an invalid instance according to the schema
\r
245 public void marshal(
\r
246 final java.io.Writer out)
\r
247 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
248 Marshaller.marshal(this, out);
\r
255 * @throws java.io.IOException if an IOException occurs during
\r
257 * @throws org.exolab.castor.xml.ValidationException if this
\r
258 * object is an invalid instance according to the schema
\r
259 * @throws org.exolab.castor.xml.MarshalException if object is
\r
260 * null or if any SAXException is thrown during marshaling
\r
262 public void marshal(
\r
263 final org.xml.sax.ContentHandler handler)
\r
264 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
265 Marshaller.marshal(this, handler);
\r
270 public void removeAllSequenceSet(
\r
272 this._sequenceSetList.clear();
\r
277 public void removeAllTree(
\r
279 this._treeList.clear();
\r
283 * Method removeSequenceSet.
\r
285 * @param vSequenceSet
\r
286 * @return true if the object was removed from the collection.
\r
288 public boolean removeSequenceSet(
\r
289 final jalview.schemabinding.version2.SequenceSet vSequenceSet) {
\r
290 boolean removed = _sequenceSetList.remove(vSequenceSet);
\r
295 * Method removeSequenceSetAt.
\r
298 * @return the element removed from the collection
\r
300 public jalview.schemabinding.version2.SequenceSet removeSequenceSetAt(
\r
302 java.lang.Object obj = this._sequenceSetList.remove(index);
\r
303 return (jalview.schemabinding.version2.SequenceSet) obj;
\r
307 * Method removeTree.
\r
310 * @return true if the object was removed from the collection.
\r
312 public boolean removeTree(
\r
313 final java.lang.String vTree) {
\r
314 boolean removed = _treeList.remove(vTree);
\r
319 * Method removeTreeAt.
\r
322 * @return the element removed from the collection
\r
324 public java.lang.String removeTreeAt(
\r
326 java.lang.Object obj = this._treeList.remove(index);
\r
327 return (java.lang.String) obj;
\r
334 * @param vSequenceSet
\r
335 * @throws java.lang.IndexOutOfBoundsException if the index
\r
336 * given is outside the bounds of the collection
\r
338 public void setSequenceSet(
\r
340 final jalview.schemabinding.version2.SequenceSet vSequenceSet)
\r
341 throws java.lang.IndexOutOfBoundsException {
\r
342 // check bounds for index
\r
343 if (index < 0 || index >= this._sequenceSetList.size()) {
\r
344 throw new IndexOutOfBoundsException("setSequenceSet: Index value '" + index + "' not in range [0.." + (this._sequenceSetList.size() - 1) + "]");
\r
347 this._sequenceSetList.set(index, vSequenceSet);
\r
353 * @param vSequenceSetArray
\r
355 public void setSequenceSet(
\r
356 final jalview.schemabinding.version2.SequenceSet[] vSequenceSetArray) {
\r
358 _sequenceSetList.clear();
\r
360 for (int i = 0; i < vSequenceSetArray.length; i++) {
\r
361 this._sequenceSetList.add(vSequenceSetArray[i]);
\r
370 * @throws java.lang.IndexOutOfBoundsException if the index
\r
371 * given is outside the bounds of the collection
\r
373 public void setTree(
\r
375 final java.lang.String vTree)
\r
376 throws java.lang.IndexOutOfBoundsException {
\r
377 // check bounds for index
\r
378 if (index < 0 || index >= this._treeList.size()) {
\r
379 throw new IndexOutOfBoundsException("setTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
\r
382 this._treeList.set(index, vTree);
\r
388 * @param vTreeArray
\r
390 public void setTree(
\r
391 final java.lang.String[] vTreeArray) {
\r
395 for (int i = 0; i < vTreeArray.length; i++) {
\r
396 this._treeList.add(vTreeArray[i]);
\r
401 * Method unmarshal.
\r
404 * @throws org.exolab.castor.xml.MarshalException if object is
\r
405 * null or if any SAXException is thrown during marshaling
\r
406 * @throws org.exolab.castor.xml.ValidationException if this
\r
407 * object is an invalid instance according to the schema
\r
408 * @return the unmarshaled jalview.schemabinding.version2.VAMSAS
\r
410 public static jalview.schemabinding.version2.VAMSAS unmarshal(
\r
411 final java.io.Reader reader)
\r
412 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
413 return (jalview.schemabinding.version2.VAMSAS) Unmarshaller.unmarshal(jalview.schemabinding.version2.VAMSAS.class, reader);
\r
419 * @throws org.exolab.castor.xml.ValidationException if this
\r
420 * object is an invalid instance according to the schema
\r
422 public void validate(
\r
424 throws org.exolab.castor.xml.ValidationException {
\r
425 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
426 validator.validate(this);
\r