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
19 * Class JalviewModelSequence.
\r
21 * @version $Revision$ $Date$
\r
23 public class JalviewModelSequence
\r
24 implements java.io.Serializable
\r
27 //--------------------------/
\r
28 //- Class/Member Variables -/
\r
29 //--------------------------/
\r
34 private java.util.Vector _JSeqList;
\r
39 private java.util.Vector _JGroupList;
\r
42 * Field _viewportList
\r
44 private java.util.Vector _viewportList;
\r
47 * Field _userColoursList
\r
49 private java.util.Vector _userColoursList;
\r
54 private java.util.Vector _treeList;
\r
60 public JalviewModelSequence()
\r
63 _JSeqList = new Vector();
\r
64 _JGroupList = new Vector();
\r
65 _viewportList = new Vector();
\r
66 _userColoursList = new Vector();
\r
67 _treeList = new Vector();
\r
68 } //-- jalview.binding.JalviewModelSequence()
\r
81 public void addJGroup(jalview.binding.JGroup vJGroup)
\r
82 throws java.lang.IndexOutOfBoundsException
\r
84 _JGroupList.addElement(vJGroup);
\r
85 } //-- void addJGroup(jalview.binding.JGroup)
\r
95 public void addJGroup(int index, jalview.binding.JGroup vJGroup)
\r
96 throws java.lang.IndexOutOfBoundsException
\r
98 _JGroupList.insertElementAt(vJGroup, index);
\r
99 } //-- void addJGroup(int, jalview.binding.JGroup)
\r
108 public void addJSeq(jalview.binding.JSeq vJSeq)
\r
109 throws java.lang.IndexOutOfBoundsException
\r
111 _JSeqList.addElement(vJSeq);
\r
112 } //-- void addJSeq(jalview.binding.JSeq)
\r
122 public void addJSeq(int index, jalview.binding.JSeq vJSeq)
\r
123 throws java.lang.IndexOutOfBoundsException
\r
125 _JSeqList.insertElementAt(vJSeq, index);
\r
126 } //-- void addJSeq(int, jalview.binding.JSeq)
\r
135 public void addTree(jalview.binding.Tree vTree)
\r
136 throws java.lang.IndexOutOfBoundsException
\r
138 _treeList.addElement(vTree);
\r
139 } //-- void addTree(jalview.binding.Tree)
\r
149 public void addTree(int index, jalview.binding.Tree vTree)
\r
150 throws java.lang.IndexOutOfBoundsException
\r
152 _treeList.insertElementAt(vTree, index);
\r
153 } //-- void addTree(int, jalview.binding.Tree)
\r
156 * Method addUserColours
\r
160 * @param vUserColours
\r
162 public void addUserColours(jalview.binding.UserColours vUserColours)
\r
163 throws java.lang.IndexOutOfBoundsException
\r
165 _userColoursList.addElement(vUserColours);
\r
166 } //-- void addUserColours(jalview.binding.UserColours)
\r
169 * Method addUserColours
\r
174 * @param vUserColours
\r
176 public void addUserColours(int index,
\r
177 jalview.binding.UserColours vUserColours)
\r
178 throws java.lang.IndexOutOfBoundsException
\r
180 _userColoursList.insertElementAt(vUserColours, index);
\r
181 } //-- void addUserColours(int, jalview.binding.UserColours)
\r
184 * Method addViewport
\r
190 public void addViewport(jalview.binding.Viewport vViewport)
\r
191 throws java.lang.IndexOutOfBoundsException
\r
193 _viewportList.addElement(vViewport);
\r
194 } //-- void addViewport(jalview.binding.Viewport)
\r
197 * Method addViewport
\r
204 public void addViewport(int index, jalview.binding.Viewport vViewport)
\r
205 throws java.lang.IndexOutOfBoundsException
\r
207 _viewportList.insertElementAt(vViewport, index);
\r
208 } //-- void addViewport(int, jalview.binding.Viewport)
\r
211 * Method enumerateJGroup
\r
215 * @return Enumeration
\r
217 public java.util.Enumeration enumerateJGroup()
\r
219 return _JGroupList.elements();
\r
220 } //-- java.util.Enumeration enumerateJGroup()
\r
223 * Method enumerateJSeq
\r
227 * @return Enumeration
\r
229 public java.util.Enumeration enumerateJSeq()
\r
231 return _JSeqList.elements();
\r
232 } //-- java.util.Enumeration enumerateJSeq()
\r
235 * Method enumerateTree
\r
239 * @return Enumeration
\r
241 public java.util.Enumeration enumerateTree()
\r
243 return _treeList.elements();
\r
244 } //-- java.util.Enumeration enumerateTree()
\r
247 * Method enumerateUserColours
\r
251 * @return Enumeration
\r
253 public java.util.Enumeration enumerateUserColours()
\r
255 return _userColoursList.elements();
\r
256 } //-- java.util.Enumeration enumerateUserColours()
\r
259 * Method enumerateViewport
\r
263 * @return Enumeration
\r
265 public java.util.Enumeration enumerateViewport()
\r
267 return _viewportList.elements();
\r
268 } //-- java.util.Enumeration enumerateViewport()
\r
278 public jalview.binding.JGroup getJGroup(int index)
\r
279 throws java.lang.IndexOutOfBoundsException
\r
281 //-- check bounds for index
\r
282 if ( (index < 0) || (index > _JGroupList.size()))
\r
284 throw new IndexOutOfBoundsException();
\r
287 return (jalview.binding.JGroup) _JGroupList.elementAt(index);
\r
288 } //-- jalview.binding.JGroup getJGroup(int)
\r
297 public jalview.binding.JGroup[] getJGroup()
\r
299 int size = _JGroupList.size();
\r
300 jalview.binding.JGroup[] mArray = new jalview.binding.JGroup[size];
\r
301 for (int index = 0; index < size; index++)
\r
303 mArray[index] = (jalview.binding.JGroup) _JGroupList.elementAt(index);
\r
306 } //-- jalview.binding.JGroup[] getJGroup()
\r
309 * Method getJGroupCount
\r
315 public int getJGroupCount()
\r
317 return _JGroupList.size();
\r
318 } //-- int getJGroupCount()
\r
328 public jalview.binding.JSeq getJSeq(int index)
\r
329 throws java.lang.IndexOutOfBoundsException
\r
331 //-- check bounds for index
\r
332 if ( (index < 0) || (index > _JSeqList.size()))
\r
334 throw new IndexOutOfBoundsException();
\r
337 return (jalview.binding.JSeq) _JSeqList.elementAt(index);
\r
338 } //-- jalview.binding.JSeq getJSeq(int)
\r
347 public jalview.binding.JSeq[] getJSeq()
\r
349 int size = _JSeqList.size();
\r
350 jalview.binding.JSeq[] mArray = new jalview.binding.JSeq[size];
\r
351 for (int index = 0; index < size; index++)
\r
353 mArray[index] = (jalview.binding.JSeq) _JSeqList.elementAt(index);
\r
356 } //-- jalview.binding.JSeq[] getJSeq()
\r
359 * Method getJSeqCount
\r
365 public int getJSeqCount()
\r
367 return _JSeqList.size();
\r
368 } //-- int getJSeqCount()
\r
378 public jalview.binding.Tree getTree(int index)
\r
379 throws java.lang.IndexOutOfBoundsException
\r
381 //-- check bounds for index
\r
382 if ( (index < 0) || (index > _treeList.size()))
\r
384 throw new IndexOutOfBoundsException();
\r
387 return (jalview.binding.Tree) _treeList.elementAt(index);
\r
388 } //-- jalview.binding.Tree getTree(int)
\r
397 public jalview.binding.Tree[] getTree()
\r
399 int size = _treeList.size();
\r
400 jalview.binding.Tree[] mArray = new jalview.binding.Tree[size];
\r
401 for (int index = 0; index < size; index++)
\r
403 mArray[index] = (jalview.binding.Tree) _treeList.elementAt(index);
\r
406 } //-- jalview.binding.Tree[] getTree()
\r
409 * Method getTreeCount
\r
415 public int getTreeCount()
\r
417 return _treeList.size();
\r
418 } //-- int getTreeCount()
\r
421 * Method getUserColours
\r
426 * @return UserColours
\r
428 public jalview.binding.UserColours getUserColours(int index)
\r
429 throws java.lang.IndexOutOfBoundsException
\r
431 //-- check bounds for index
\r
432 if ( (index < 0) || (index > _userColoursList.size()))
\r
434 throw new IndexOutOfBoundsException();
\r
437 return (jalview.binding.UserColours) _userColoursList.elementAt(index);
\r
438 } //-- jalview.binding.UserColours getUserColours(int)
\r
441 * Method getUserColours
\r
445 * @return UserColours
\r
447 public jalview.binding.UserColours[] getUserColours()
\r
449 int size = _userColoursList.size();
\r
450 jalview.binding.UserColours[] mArray = new jalview.binding.UserColours[size];
\r
451 for (int index = 0; index < size; index++)
\r
453 mArray[index] = (jalview.binding.UserColours) _userColoursList.elementAt(
\r
457 } //-- jalview.binding.UserColours[] getUserColours()
\r
460 * Method getUserColoursCount
\r
466 public int getUserColoursCount()
\r
468 return _userColoursList.size();
\r
469 } //-- int getUserColoursCount()
\r
472 * Method getViewport
\r
479 public jalview.binding.Viewport getViewport(int index)
\r
480 throws java.lang.IndexOutOfBoundsException
\r
482 //-- check bounds for index
\r
483 if ( (index < 0) || (index > _viewportList.size()))
\r
485 throw new IndexOutOfBoundsException();
\r
488 return (jalview.binding.Viewport) _viewportList.elementAt(index);
\r
489 } //-- jalview.binding.Viewport getViewport(int)
\r
492 * Method getViewport
\r
498 public jalview.binding.Viewport[] getViewport()
\r
500 int size = _viewportList.size();
\r
501 jalview.binding.Viewport[] mArray = new jalview.binding.Viewport[size];
\r
502 for (int index = 0; index < size; index++)
\r
504 mArray[index] = (jalview.binding.Viewport) _viewportList.elementAt(index);
\r
507 } //-- jalview.binding.Viewport[] getViewport()
\r
510 * Method getViewportCount
\r
516 public int getViewportCount()
\r
518 return _viewportList.size();
\r
519 } //-- int getViewportCount()
\r
528 public boolean isValid()
\r
534 catch (org.exolab.castor.xml.ValidationException vex)
\r
539 } //-- boolean isValid()
\r
548 public void marshal(java.io.Writer out)
\r
549 throws org.exolab.castor.xml.MarshalException,
\r
550 org.exolab.castor.xml.ValidationException
\r
553 Marshaller.marshal(this, out);
\r
554 } //-- void marshal(java.io.Writer)
\r
563 public void marshal(org.xml.sax.ContentHandler handler)
\r
564 throws java.io.IOException, org.exolab.castor.xml.MarshalException,
\r
565 org.exolab.castor.xml.ValidationException
\r
568 Marshaller.marshal(this, handler);
\r
569 } //-- void marshal(org.xml.sax.ContentHandler)
\r
572 * Method removeAllJGroup
\r
575 public void removeAllJGroup()
\r
577 _JGroupList.removeAllElements();
\r
578 } //-- void removeAllJGroup()
\r
581 * Method removeAllJSeq
\r
584 public void removeAllJSeq()
\r
586 _JSeqList.removeAllElements();
\r
587 } //-- void removeAllJSeq()
\r
590 * Method removeAllTree
\r
593 public void removeAllTree()
\r
595 _treeList.removeAllElements();
\r
596 } //-- void removeAllTree()
\r
599 * Method removeAllUserColours
\r
602 public void removeAllUserColours()
\r
604 _userColoursList.removeAllElements();
\r
605 } //-- void removeAllUserColours()
\r
608 * Method removeAllViewport
\r
611 public void removeAllViewport()
\r
613 _viewportList.removeAllElements();
\r
614 } //-- void removeAllViewport()
\r
617 * Method removeJGroup
\r
624 public jalview.binding.JGroup removeJGroup(int index)
\r
626 java.lang.Object obj = _JGroupList.elementAt(index);
\r
627 _JGroupList.removeElementAt(index);
\r
628 return (jalview.binding.JGroup) obj;
\r
629 } //-- jalview.binding.JGroup removeJGroup(int)
\r
632 * Method removeJSeq
\r
639 public jalview.binding.JSeq removeJSeq(int index)
\r
641 java.lang.Object obj = _JSeqList.elementAt(index);
\r
642 _JSeqList.removeElementAt(index);
\r
643 return (jalview.binding.JSeq) obj;
\r
644 } //-- jalview.binding.JSeq removeJSeq(int)
\r
647 * Method removeTree
\r
654 public jalview.binding.Tree removeTree(int index)
\r
656 java.lang.Object obj = _treeList.elementAt(index);
\r
657 _treeList.removeElementAt(index);
\r
658 return (jalview.binding.Tree) obj;
\r
659 } //-- jalview.binding.Tree removeTree(int)
\r
662 * Method removeUserColours
\r
667 * @return UserColours
\r
669 public jalview.binding.UserColours removeUserColours(int index)
\r
671 java.lang.Object obj = _userColoursList.elementAt(index);
\r
672 _userColoursList.removeElementAt(index);
\r
673 return (jalview.binding.UserColours) obj;
\r
674 } //-- jalview.binding.UserColours removeUserColours(int)
\r
677 * Method removeViewport
\r
684 public jalview.binding.Viewport removeViewport(int index)
\r
686 java.lang.Object obj = _viewportList.elementAt(index);
\r
687 _viewportList.removeElementAt(index);
\r
688 return (jalview.binding.Viewport) obj;
\r
689 } //-- jalview.binding.Viewport removeViewport(int)
\r
699 public void setJGroup(int index, jalview.binding.JGroup vJGroup)
\r
700 throws java.lang.IndexOutOfBoundsException
\r
702 //-- check bounds for index
\r
703 if ( (index < 0) || (index > _JGroupList.size()))
\r
705 throw new IndexOutOfBoundsException();
\r
707 _JGroupList.setElementAt(vJGroup, index);
\r
708 } //-- void setJGroup(int, jalview.binding.JGroup)
\r
715 * @param JGroupArray
\r
717 public void setJGroup(jalview.binding.JGroup[] JGroupArray)
\r
720 _JGroupList.removeAllElements();
\r
721 for (int i = 0; i < JGroupArray.length; i++)
\r
723 _JGroupList.addElement(JGroupArray[i]);
\r
725 } //-- void setJGroup(jalview.binding.JGroup)
\r
735 public void setJSeq(int index, jalview.binding.JSeq vJSeq)
\r
736 throws java.lang.IndexOutOfBoundsException
\r
738 //-- check bounds for index
\r
739 if ( (index < 0) || (index > _JSeqList.size()))
\r
741 throw new IndexOutOfBoundsException();
\r
743 _JSeqList.setElementAt(vJSeq, index);
\r
744 } //-- void setJSeq(int, jalview.binding.JSeq)
\r
753 public void setJSeq(jalview.binding.JSeq[] JSeqArray)
\r
756 _JSeqList.removeAllElements();
\r
757 for (int i = 0; i < JSeqArray.length; i++)
\r
759 _JSeqList.addElement(JSeqArray[i]);
\r
761 } //-- void setJSeq(jalview.binding.JSeq)
\r
771 public void setTree(int index, jalview.binding.Tree vTree)
\r
772 throws java.lang.IndexOutOfBoundsException
\r
774 //-- check bounds for index
\r
775 if ( (index < 0) || (index > _treeList.size()))
\r
777 throw new IndexOutOfBoundsException();
\r
779 _treeList.setElementAt(vTree, index);
\r
780 } //-- void setTree(int, jalview.binding.Tree)
\r
789 public void setTree(jalview.binding.Tree[] treeArray)
\r
792 _treeList.removeAllElements();
\r
793 for (int i = 0; i < treeArray.length; i++)
\r
795 _treeList.addElement(treeArray[i]);
\r
797 } //-- void setTree(jalview.binding.Tree)
\r
800 * Method setUserColours
\r
805 * @param vUserColours
\r
807 public void setUserColours(int index,
\r
808 jalview.binding.UserColours vUserColours)
\r
809 throws java.lang.IndexOutOfBoundsException
\r
811 //-- check bounds for index
\r
812 if ( (index < 0) || (index > _userColoursList.size()))
\r
814 throw new IndexOutOfBoundsException();
\r
816 _userColoursList.setElementAt(vUserColours, index);
\r
817 } //-- void setUserColours(int, jalview.binding.UserColours)
\r
820 * Method setUserColours
\r
824 * @param userColoursArray
\r
826 public void setUserColours(jalview.binding.UserColours[] userColoursArray)
\r
829 _userColoursList.removeAllElements();
\r
830 for (int i = 0; i < userColoursArray.length; i++)
\r
832 _userColoursList.addElement(userColoursArray[i]);
\r
834 } //-- void setUserColours(jalview.binding.UserColours)
\r
837 * Method setViewport
\r
844 public void setViewport(int index, jalview.binding.Viewport vViewport)
\r
845 throws java.lang.IndexOutOfBoundsException
\r
847 //-- check bounds for index
\r
848 if ( (index < 0) || (index > _viewportList.size()))
\r
850 throw new IndexOutOfBoundsException();
\r
852 _viewportList.setElementAt(vViewport, index);
\r
853 } //-- void setViewport(int, jalview.binding.Viewport)
\r
856 * Method setViewport
\r
860 * @param viewportArray
\r
862 public void setViewport(jalview.binding.Viewport[] viewportArray)
\r
865 _viewportList.removeAllElements();
\r
866 for (int i = 0; i < viewportArray.length; i++)
\r
868 _viewportList.addElement(viewportArray[i]);
\r
870 } //-- void setViewport(jalview.binding.Viewport)
\r
880 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
881 throws org.exolab.castor.xml.MarshalException,
\r
882 org.exolab.castor.xml.ValidationException
\r
884 return (jalview.binding.JalviewModelSequence) Unmarshaller.unmarshal(
\r
885 jalview.binding.JalviewModelSequence.class, reader);
\r
886 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
892 public void validate()
\r
893 throws org.exolab.castor.xml.ValidationException
\r
895 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.
\r
897 validator.validate(this);
\r
898 } //-- void validate()
\r