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
14 import java.io.IOException;
\r
15 import java.io.Reader;
\r
16 import java.io.Serializable;
\r
17 import java.io.Writer;
\r
18 import java.util.Enumeration;
\r
19 import java.util.Vector;
\r
20 import org.exolab.castor.xml.MarshalException;
\r
21 import org.exolab.castor.xml.Marshaller;
\r
22 import org.exolab.castor.xml.Unmarshaller;
\r
23 import org.exolab.castor.xml.ValidationException;
\r
24 import org.xml.sax.ContentHandler;
\r
29 * @version $Revision$ $Date$
\r
31 public class VAMSAS implements java.io.Serializable {
\r
34 //--------------------------/
\r
35 //- Class/Member Variables -/
\r
36 //--------------------------/
\r
39 * Field _alignmentList
\r
41 private java.util.Vector _alignmentList;
\r
46 private java.util.Vector _treeList;
\r
49 * Field _sequenceSetList
\r
51 private java.util.Vector _sequenceSetList;
\r
60 _alignmentList = new Vector();
\r
61 _treeList = new Vector();
\r
62 _sequenceSetList = new Vector();
\r
63 } //-- jalview.binding.VAMSAS()
\r
71 * Method addAlignment
\r
77 public void addAlignment(jalview.binding.Alignment vAlignment)
\r
78 throws java.lang.IndexOutOfBoundsException
\r
80 _alignmentList.addElement(vAlignment);
\r
81 } //-- void addAlignment(jalview.binding.Alignment)
\r
84 * Method addAlignment
\r
91 public void addAlignment(int index, jalview.binding.Alignment vAlignment)
\r
92 throws java.lang.IndexOutOfBoundsException
\r
94 _alignmentList.insertElementAt(vAlignment, index);
\r
95 } //-- void addAlignment(int, jalview.binding.Alignment)
\r
98 * Method addSequenceSet
\r
102 * @param vSequenceSet
\r
104 public void addSequenceSet(jalview.binding.SequenceSet vSequenceSet)
\r
105 throws java.lang.IndexOutOfBoundsException
\r
107 _sequenceSetList.addElement(vSequenceSet);
\r
108 } //-- void addSequenceSet(jalview.binding.SequenceSet)
\r
111 * Method addSequenceSet
\r
116 * @param vSequenceSet
\r
118 public void addSequenceSet(int index, jalview.binding.SequenceSet vSequenceSet)
\r
119 throws java.lang.IndexOutOfBoundsException
\r
121 _sequenceSetList.insertElementAt(vSequenceSet, index);
\r
122 } //-- void addSequenceSet(int, jalview.binding.SequenceSet)
\r
131 public void addTree(java.lang.String vTree)
\r
132 throws java.lang.IndexOutOfBoundsException
\r
134 _treeList.addElement(vTree);
\r
135 } //-- void addTree(java.lang.String)
\r
145 public void addTree(int index, java.lang.String vTree)
\r
146 throws java.lang.IndexOutOfBoundsException
\r
148 _treeList.insertElementAt(vTree, index);
\r
149 } //-- void addTree(int, java.lang.String)
\r
152 * Method enumerateAlignment
\r
156 * @return Enumeration
\r
158 public java.util.Enumeration enumerateAlignment()
\r
160 return _alignmentList.elements();
\r
161 } //-- java.util.Enumeration enumerateAlignment()
\r
164 * Method enumerateSequenceSet
\r
168 * @return Enumeration
\r
170 public java.util.Enumeration enumerateSequenceSet()
\r
172 return _sequenceSetList.elements();
\r
173 } //-- java.util.Enumeration enumerateSequenceSet()
\r
176 * Method enumerateTree
\r
180 * @return Enumeration
\r
182 public java.util.Enumeration enumerateTree()
\r
184 return _treeList.elements();
\r
185 } //-- java.util.Enumeration enumerateTree()
\r
188 * Method getAlignment
\r
193 * @return Alignment
\r
195 public jalview.binding.Alignment getAlignment(int index)
\r
196 throws java.lang.IndexOutOfBoundsException
\r
198 //-- check bounds for index
\r
199 if ((index < 0) || (index > _alignmentList.size())) {
\r
200 throw new IndexOutOfBoundsException();
\r
203 return (jalview.binding.Alignment) _alignmentList.elementAt(index);
\r
204 } //-- jalview.binding.Alignment getAlignment(int)
\r
207 * Method getAlignment
\r
211 * @return Alignment
\r
213 public jalview.binding.Alignment[] getAlignment()
\r
215 int size = _alignmentList.size();
\r
216 jalview.binding.Alignment[] mArray = new jalview.binding.Alignment[size];
\r
217 for (int index = 0; index < size; index++) {
\r
218 mArray[index] = (jalview.binding.Alignment) _alignmentList.elementAt(index);
\r
221 } //-- jalview.binding.Alignment[] getAlignment()
\r
224 * Method getAlignmentCount
\r
230 public int getAlignmentCount()
\r
232 return _alignmentList.size();
\r
233 } //-- int getAlignmentCount()
\r
236 * Method getSequenceSet
\r
241 * @return SequenceSet
\r
243 public jalview.binding.SequenceSet getSequenceSet(int index)
\r
244 throws java.lang.IndexOutOfBoundsException
\r
246 //-- check bounds for index
\r
247 if ((index < 0) || (index > _sequenceSetList.size())) {
\r
248 throw new IndexOutOfBoundsException();
\r
251 return (jalview.binding.SequenceSet) _sequenceSetList.elementAt(index);
\r
252 } //-- jalview.binding.SequenceSet getSequenceSet(int)
\r
255 * Method getSequenceSet
\r
259 * @return SequenceSet
\r
261 public jalview.binding.SequenceSet[] getSequenceSet()
\r
263 int size = _sequenceSetList.size();
\r
264 jalview.binding.SequenceSet[] mArray = new jalview.binding.SequenceSet[size];
\r
265 for (int index = 0; index < size; index++) {
\r
266 mArray[index] = (jalview.binding.SequenceSet) _sequenceSetList.elementAt(index);
\r
269 } //-- jalview.binding.SequenceSet[] getSequenceSet()
\r
272 * Method getSequenceSetCount
\r
278 public int getSequenceSetCount()
\r
280 return _sequenceSetList.size();
\r
281 } //-- int getSequenceSetCount()
\r
291 public java.lang.String getTree(int index)
\r
292 throws java.lang.IndexOutOfBoundsException
\r
294 //-- check bounds for index
\r
295 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
314 mArray[index] = (String)_treeList.elementAt(index);
\r
317 } //-- java.lang.String[] getTree()
\r
320 * Method getTreeCount
\r
326 public int getTreeCount()
\r
328 return _treeList.size();
\r
329 } //-- int getTreeCount()
\r
338 public boolean isValid()
\r
343 catch (org.exolab.castor.xml.ValidationException vex) {
\r
347 } //-- boolean isValid()
\r
356 public void marshal(java.io.Writer out)
\r
357 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
360 Marshaller.marshal(this, out);
\r
361 } //-- void marshal(java.io.Writer)
\r
370 public void marshal(org.xml.sax.ContentHandler handler)
\r
371 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
374 Marshaller.marshal(this, handler);
\r
375 } //-- void marshal(org.xml.sax.ContentHandler)
\r
378 * Method removeAlignment
\r
383 * @return Alignment
\r
385 public jalview.binding.Alignment removeAlignment(int index)
\r
387 java.lang.Object obj = _alignmentList.elementAt(index);
\r
388 _alignmentList.removeElementAt(index);
\r
389 return (jalview.binding.Alignment) obj;
\r
390 } //-- jalview.binding.Alignment removeAlignment(int)
\r
393 * Method removeAllAlignment
\r
396 public void removeAllAlignment()
\r
398 _alignmentList.removeAllElements();
\r
399 } //-- void removeAllAlignment()
\r
402 * Method removeAllSequenceSet
\r
405 public void removeAllSequenceSet()
\r
407 _sequenceSetList.removeAllElements();
\r
408 } //-- void removeAllSequenceSet()
\r
411 * Method removeAllTree
\r
414 public void removeAllTree()
\r
416 _treeList.removeAllElements();
\r
417 } //-- void removeAllTree()
\r
420 * Method removeSequenceSet
\r
425 * @return SequenceSet
\r
427 public jalview.binding.SequenceSet removeSequenceSet(int index)
\r
429 java.lang.Object obj = _sequenceSetList.elementAt(index);
\r
430 _sequenceSetList.removeElementAt(index);
\r
431 return (jalview.binding.SequenceSet) obj;
\r
432 } //-- jalview.binding.SequenceSet removeSequenceSet(int)
\r
435 * Method removeTree
\r
442 public java.lang.String removeTree(int index)
\r
444 java.lang.Object obj = _treeList.elementAt(index);
\r
445 _treeList.removeElementAt(index);
\r
446 return (String)obj;
\r
447 } //-- java.lang.String removeTree(int)
\r
450 * Method setAlignment
\r
455 * @param vAlignment
\r
457 public void setAlignment(int index, jalview.binding.Alignment vAlignment)
\r
458 throws java.lang.IndexOutOfBoundsException
\r
460 //-- check bounds for index
\r
461 if ((index < 0) || (index > _alignmentList.size())) {
\r
462 throw new IndexOutOfBoundsException();
\r
464 _alignmentList.setElementAt(vAlignment, index);
\r
465 } //-- void setAlignment(int, jalview.binding.Alignment)
\r
468 * Method setAlignment
\r
472 * @param alignmentArray
\r
474 public void setAlignment(jalview.binding.Alignment[] alignmentArray)
\r
477 _alignmentList.removeAllElements();
\r
478 for (int i = 0; i < alignmentArray.length; i++) {
\r
479 _alignmentList.addElement(alignmentArray[i]);
\r
481 } //-- void setAlignment(jalview.binding.Alignment)
\r
484 * Method setSequenceSet
\r
489 * @param vSequenceSet
\r
491 public void setSequenceSet(int index, jalview.binding.SequenceSet vSequenceSet)
\r
492 throws java.lang.IndexOutOfBoundsException
\r
494 //-- check bounds for index
\r
495 if ((index < 0) || (index > _sequenceSetList.size())) {
\r
496 throw new IndexOutOfBoundsException();
\r
498 _sequenceSetList.setElementAt(vSequenceSet, index);
\r
499 } //-- void setSequenceSet(int, jalview.binding.SequenceSet)
\r
502 * Method setSequenceSet
\r
506 * @param sequenceSetArray
\r
508 public void setSequenceSet(jalview.binding.SequenceSet[] sequenceSetArray)
\r
511 _sequenceSetList.removeAllElements();
\r
512 for (int i = 0; i < sequenceSetArray.length; i++) {
\r
513 _sequenceSetList.addElement(sequenceSetArray[i]);
\r
515 } //-- void setSequenceSet(jalview.binding.SequenceSet)
\r
525 public void setTree(int index, java.lang.String vTree)
\r
526 throws java.lang.IndexOutOfBoundsException
\r
528 //-- check bounds for index
\r
529 if ((index < 0) || (index > _treeList.size())) {
\r
530 throw new IndexOutOfBoundsException();
\r
532 _treeList.setElementAt(vTree, index);
\r
533 } //-- void setTree(int, java.lang.String)
\r
542 public void setTree(java.lang.String[] treeArray)
\r
545 _treeList.removeAllElements();
\r
546 for (int i = 0; i < treeArray.length; i++) {
\r
547 _treeList.addElement(treeArray[i]);
\r
549 } //-- void setTree(java.lang.String)
\r
559 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
560 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
562 return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(jalview.binding.VAMSAS.class, reader);
\r
563 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
569 public void validate()
\r
570 throws org.exolab.castor.xml.ValidationException
\r
572 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
573 validator.validate(this);
\r
574 } //-- void validate()
\r