2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML
\r
8 package jalview.binding;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
16 import org.exolab.castor.xml.*;
\r
21 * @version $Revision$ $Date$
\r
24 implements java.io.Serializable
\r
27 //--------------------------/
\r
28 //- Class/Member Variables -/
\r
29 //--------------------------/
\r
32 * Field _alignmentList
\r
34 private java.util.Vector _alignmentList;
\r
39 private java.util.Vector _treeList;
\r
42 * Field _sequenceSetList
\r
44 private java.util.Vector _sequenceSetList;
\r
53 _alignmentList = new Vector();
\r
54 _treeList = new Vector();
\r
55 _sequenceSetList = new Vector();
\r
56 } //-- jalview.binding.VAMSAS()
\r
63 * Method addAlignment
\r
69 public void addAlignment(jalview.binding.Alignment vAlignment)
\r
70 throws java.lang.IndexOutOfBoundsException
\r
72 _alignmentList.addElement(vAlignment);
\r
73 } //-- void addAlignment(jalview.binding.Alignment)
\r
76 * Method addAlignment
\r
83 public void addAlignment(int index, jalview.binding.Alignment vAlignment)
\r
84 throws java.lang.IndexOutOfBoundsException
\r
86 _alignmentList.insertElementAt(vAlignment, index);
\r
87 } //-- void addAlignment(int, jalview.binding.Alignment)
\r
90 * Method addSequenceSet
\r
94 * @param vSequenceSet
\r
96 public void addSequenceSet(jalview.binding.SequenceSet vSequenceSet)
\r
97 throws java.lang.IndexOutOfBoundsException
\r
99 _sequenceSetList.addElement(vSequenceSet);
\r
100 } //-- void addSequenceSet(jalview.binding.SequenceSet)
\r
103 * Method addSequenceSet
\r
108 * @param vSequenceSet
\r
110 public void addSequenceSet(int index,
\r
111 jalview.binding.SequenceSet vSequenceSet)
\r
112 throws java.lang.IndexOutOfBoundsException
\r
114 _sequenceSetList.insertElementAt(vSequenceSet, index);
\r
115 } //-- void addSequenceSet(int, jalview.binding.SequenceSet)
\r
124 public void addTree(java.lang.String vTree)
\r
125 throws java.lang.IndexOutOfBoundsException
\r
127 _treeList.addElement(vTree);
\r
128 } //-- void addTree(java.lang.String)
\r
138 public void addTree(int index, java.lang.String vTree)
\r
139 throws java.lang.IndexOutOfBoundsException
\r
141 _treeList.insertElementAt(vTree, index);
\r
142 } //-- void addTree(int, java.lang.String)
\r
145 * Method enumerateAlignment
\r
149 * @return Enumeration
\r
151 public java.util.Enumeration enumerateAlignment()
\r
153 return _alignmentList.elements();
\r
154 } //-- java.util.Enumeration enumerateAlignment()
\r
157 * Method enumerateSequenceSet
\r
161 * @return Enumeration
\r
163 public java.util.Enumeration enumerateSequenceSet()
\r
165 return _sequenceSetList.elements();
\r
166 } //-- java.util.Enumeration enumerateSequenceSet()
\r
169 * Method enumerateTree
\r
173 * @return Enumeration
\r
175 public java.util.Enumeration enumerateTree()
\r
177 return _treeList.elements();
\r
178 } //-- java.util.Enumeration enumerateTree()
\r
181 * Method getAlignment
\r
186 * @return Alignment
\r
188 public jalview.binding.Alignment getAlignment(int index)
\r
189 throws java.lang.IndexOutOfBoundsException
\r
191 //-- check bounds for index
\r
192 if ( (index < 0) || (index > _alignmentList.size()))
\r
194 throw new IndexOutOfBoundsException();
\r
197 return (jalview.binding.Alignment) _alignmentList.elementAt(index);
\r
198 } //-- jalview.binding.Alignment getAlignment(int)
\r
201 * Method getAlignment
\r
205 * @return Alignment
\r
207 public jalview.binding.Alignment[] getAlignment()
\r
209 int size = _alignmentList.size();
\r
210 jalview.binding.Alignment[] mArray = new jalview.binding.Alignment[size];
\r
211 for (int index = 0; index < size; index++)
\r
213 mArray[index] = (jalview.binding.Alignment) _alignmentList.elementAt(
\r
217 } //-- jalview.binding.Alignment[] getAlignment()
\r
220 * Method getAlignmentCount
\r
226 public int getAlignmentCount()
\r
228 return _alignmentList.size();
\r
229 } //-- int getAlignmentCount()
\r
232 * Method getSequenceSet
\r
237 * @return SequenceSet
\r
239 public jalview.binding.SequenceSet getSequenceSet(int index)
\r
240 throws java.lang.IndexOutOfBoundsException
\r
242 //-- check bounds for index
\r
243 if ( (index < 0) || (index > _sequenceSetList.size()))
\r
245 throw new IndexOutOfBoundsException();
\r
248 return (jalview.binding.SequenceSet) _sequenceSetList.elementAt(index);
\r
249 } //-- jalview.binding.SequenceSet getSequenceSet(int)
\r
252 * Method getSequenceSet
\r
256 * @return SequenceSet
\r
258 public jalview.binding.SequenceSet[] getSequenceSet()
\r
260 int size = _sequenceSetList.size();
\r
261 jalview.binding.SequenceSet[] mArray = new jalview.binding.SequenceSet[size];
\r
262 for (int index = 0; index < size; index++)
\r
264 mArray[index] = (jalview.binding.SequenceSet) _sequenceSetList.elementAt(
\r
268 } //-- jalview.binding.SequenceSet[] getSequenceSet()
\r
271 * Method getSequenceSetCount
\r
277 public int getSequenceSetCount()
\r
279 return _sequenceSetList.size();
\r
280 } //-- int getSequenceSetCount()
\r
290 public java.lang.String getTree(int index)
\r
291 throws java.lang.IndexOutOfBoundsException
\r
293 //-- check bounds for index
\r
294 if ( (index < 0) || (index > _treeList.size()))
\r
296 throw new IndexOutOfBoundsException();
\r
299 return (String) _treeList.elementAt(index);
\r
300 } //-- java.lang.String getTree(int)
\r
309 public java.lang.String[] getTree()
\r
311 int size = _treeList.size();
\r
312 java.lang.String[] mArray = new java.lang.String[size];
\r
313 for (int index = 0; index < size; index++)
\r
315 mArray[index] = (String) _treeList.elementAt(index);
\r
318 } //-- java.lang.String[] getTree()
\r
321 * Method getTreeCount
\r
327 public int getTreeCount()
\r
329 return _treeList.size();
\r
330 } //-- int getTreeCount()
\r
339 public boolean isValid()
\r
345 catch (org.exolab.castor.xml.ValidationException vex)
\r
350 } //-- boolean isValid()
\r
359 public void marshal(java.io.Writer out)
\r
360 throws org.exolab.castor.xml.MarshalException,
\r
361 org.exolab.castor.xml.ValidationException
\r
364 Marshaller.marshal(this, out);
\r
365 } //-- void marshal(java.io.Writer)
\r
374 public void marshal(org.xml.sax.ContentHandler handler)
\r
375 throws java.io.IOException, org.exolab.castor.xml.MarshalException,
\r
376 org.exolab.castor.xml.ValidationException
\r
379 Marshaller.marshal(this, handler);
\r
380 } //-- void marshal(org.xml.sax.ContentHandler)
\r
383 * Method removeAlignment
\r
388 * @return Alignment
\r
390 public jalview.binding.Alignment removeAlignment(int index)
\r
392 java.lang.Object obj = _alignmentList.elementAt(index);
\r
393 _alignmentList.removeElementAt(index);
\r
394 return (jalview.binding.Alignment) obj;
\r
395 } //-- jalview.binding.Alignment removeAlignment(int)
\r
398 * Method removeAllAlignment
\r
401 public void removeAllAlignment()
\r
403 _alignmentList.removeAllElements();
\r
404 } //-- void removeAllAlignment()
\r
407 * Method removeAllSequenceSet
\r
410 public void removeAllSequenceSet()
\r
412 _sequenceSetList.removeAllElements();
\r
413 } //-- void removeAllSequenceSet()
\r
416 * Method removeAllTree
\r
419 public void removeAllTree()
\r
421 _treeList.removeAllElements();
\r
422 } //-- void removeAllTree()
\r
425 * Method removeSequenceSet
\r
430 * @return SequenceSet
\r
432 public jalview.binding.SequenceSet removeSequenceSet(int index)
\r
434 java.lang.Object obj = _sequenceSetList.elementAt(index);
\r
435 _sequenceSetList.removeElementAt(index);
\r
436 return (jalview.binding.SequenceSet) obj;
\r
437 } //-- jalview.binding.SequenceSet removeSequenceSet(int)
\r
440 * Method removeTree
\r
447 public java.lang.String removeTree(int index)
\r
449 java.lang.Object obj = _treeList.elementAt(index);
\r
450 _treeList.removeElementAt(index);
\r
451 return (String) obj;
\r
452 } //-- java.lang.String removeTree(int)
\r
455 * Method setAlignment
\r
460 * @param vAlignment
\r
462 public void setAlignment(int index, jalview.binding.Alignment vAlignment)
\r
463 throws java.lang.IndexOutOfBoundsException
\r
465 //-- check bounds for index
\r
466 if ( (index < 0) || (index > _alignmentList.size()))
\r
468 throw new IndexOutOfBoundsException();
\r
470 _alignmentList.setElementAt(vAlignment, index);
\r
471 } //-- void setAlignment(int, jalview.binding.Alignment)
\r
474 * Method setAlignment
\r
478 * @param alignmentArray
\r
480 public void setAlignment(jalview.binding.Alignment[] alignmentArray)
\r
483 _alignmentList.removeAllElements();
\r
484 for (int i = 0; i < alignmentArray.length; i++)
\r
486 _alignmentList.addElement(alignmentArray[i]);
\r
488 } //-- void setAlignment(jalview.binding.Alignment)
\r
491 * Method setSequenceSet
\r
496 * @param vSequenceSet
\r
498 public void setSequenceSet(int index,
\r
499 jalview.binding.SequenceSet vSequenceSet)
\r
500 throws java.lang.IndexOutOfBoundsException
\r
502 //-- check bounds for index
\r
503 if ( (index < 0) || (index > _sequenceSetList.size()))
\r
505 throw new IndexOutOfBoundsException();
\r
507 _sequenceSetList.setElementAt(vSequenceSet, index);
\r
508 } //-- void setSequenceSet(int, jalview.binding.SequenceSet)
\r
511 * Method setSequenceSet
\r
515 * @param sequenceSetArray
\r
517 public void setSequenceSet(jalview.binding.SequenceSet[] sequenceSetArray)
\r
520 _sequenceSetList.removeAllElements();
\r
521 for (int i = 0; i < sequenceSetArray.length; i++)
\r
523 _sequenceSetList.addElement(sequenceSetArray[i]);
\r
525 } //-- void setSequenceSet(jalview.binding.SequenceSet)
\r
535 public void setTree(int index, java.lang.String vTree)
\r
536 throws java.lang.IndexOutOfBoundsException
\r
538 //-- check bounds for index
\r
539 if ( (index < 0) || (index > _treeList.size()))
\r
541 throw new IndexOutOfBoundsException();
\r
543 _treeList.setElementAt(vTree, index);
\r
544 } //-- void setTree(int, java.lang.String)
\r
553 public void setTree(java.lang.String[] treeArray)
\r
556 _treeList.removeAllElements();
\r
557 for (int i = 0; i < treeArray.length; i++)
\r
559 _treeList.addElement(treeArray[i]);
\r
561 } //-- void setTree(java.lang.String)
\r
571 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
572 throws org.exolab.castor.xml.MarshalException,
\r
573 org.exolab.castor.xml.ValidationException
\r
575 return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(jalview.binding.
\r
576 VAMSAS.class, reader);
\r
577 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
583 public void validate()
\r
584 throws org.exolab.castor.xml.ValidationException
\r
586 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.
\r
588 validator.validate(this);
\r
589 } //-- void validate()
\r