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.schemabinding.version2;
\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
57 * Field _featureSettings
\r
59 private jalview.schemabinding.version2.FeatureSettings _featureSettings;
\r
65 public JalviewModelSequence()
\r
68 _JSeqList = new Vector();
\r
69 _JGroupList = new Vector();
\r
70 _viewportList = new Vector();
\r
71 _userColoursList = new Vector();
\r
72 _treeList = new Vector();
\r
73 } //-- jalview.schemabinding.version2.JalviewModelSequence()
\r
86 public void addJGroup(jalview.schemabinding.version2.JGroup vJGroup)
\r
87 throws java.lang.IndexOutOfBoundsException
\r
89 _JGroupList.addElement(vJGroup);
\r
90 } //-- void addJGroup(jalview.schemabinding.version2.JGroup)
\r
100 public void addJGroup(int index,
\r
101 jalview.schemabinding.version2.JGroup vJGroup)
\r
102 throws java.lang.IndexOutOfBoundsException
\r
104 _JGroupList.insertElementAt(vJGroup, index);
\r
105 } //-- void addJGroup(int, jalview.schemabinding.version2.JGroup)
\r
114 public void addJSeq(jalview.schemabinding.version2.JSeq vJSeq)
\r
115 throws java.lang.IndexOutOfBoundsException
\r
117 _JSeqList.addElement(vJSeq);
\r
118 } //-- void addJSeq(jalview.schemabinding.version2.JSeq)
\r
128 public void addJSeq(int index, jalview.schemabinding.version2.JSeq vJSeq)
\r
129 throws java.lang.IndexOutOfBoundsException
\r
131 _JSeqList.insertElementAt(vJSeq, index);
\r
132 } //-- void addJSeq(int, jalview.schemabinding.version2.JSeq)
\r
141 public void addTree(jalview.schemabinding.version2.Tree vTree)
\r
142 throws java.lang.IndexOutOfBoundsException
\r
144 _treeList.addElement(vTree);
\r
145 } //-- void addTree(jalview.schemabinding.version2.Tree)
\r
155 public void addTree(int index, jalview.schemabinding.version2.Tree vTree)
\r
156 throws java.lang.IndexOutOfBoundsException
\r
158 _treeList.insertElementAt(vTree, index);
\r
159 } //-- void addTree(int, jalview.schemabinding.version2.Tree)
\r
162 * Method addUserColours
\r
166 * @param vUserColours
\r
168 public void addUserColours(jalview.schemabinding.version2.UserColours
\r
170 throws java.lang.IndexOutOfBoundsException
\r
172 _userColoursList.addElement(vUserColours);
\r
173 } //-- void addUserColours(jalview.schemabinding.version2.UserColours)
\r
176 * Method addUserColours
\r
181 * @param vUserColours
\r
183 public void addUserColours(int index,
\r
184 jalview.schemabinding.version2.UserColours
\r
186 throws java.lang.IndexOutOfBoundsException
\r
188 _userColoursList.insertElementAt(vUserColours, index);
\r
189 } //-- void addUserColours(int, jalview.schemabinding.version2.UserColours)
\r
192 * Method addViewport
\r
198 public void addViewport(jalview.schemabinding.version2.Viewport vViewport)
\r
199 throws java.lang.IndexOutOfBoundsException
\r
201 _viewportList.addElement(vViewport);
\r
202 } //-- void addViewport(jalview.schemabinding.version2.Viewport)
\r
205 * Method addViewport
\r
212 public void addViewport(int index,
\r
213 jalview.schemabinding.version2.Viewport vViewport)
\r
214 throws java.lang.IndexOutOfBoundsException
\r
216 _viewportList.insertElementAt(vViewport, index);
\r
217 } //-- void addViewport(int, jalview.schemabinding.version2.Viewport)
\r
220 * Method enumerateJGroup
\r
224 * @return Enumeration
\r
226 public java.util.Enumeration enumerateJGroup()
\r
228 return _JGroupList.elements();
\r
229 } //-- java.util.Enumeration enumerateJGroup()
\r
232 * Method enumerateJSeq
\r
236 * @return Enumeration
\r
238 public java.util.Enumeration enumerateJSeq()
\r
240 return _JSeqList.elements();
\r
241 } //-- java.util.Enumeration enumerateJSeq()
\r
244 * Method enumerateTree
\r
248 * @return Enumeration
\r
250 public java.util.Enumeration enumerateTree()
\r
252 return _treeList.elements();
\r
253 } //-- java.util.Enumeration enumerateTree()
\r
256 * Method enumerateUserColours
\r
260 * @return Enumeration
\r
262 public java.util.Enumeration enumerateUserColours()
\r
264 return _userColoursList.elements();
\r
265 } //-- java.util.Enumeration enumerateUserColours()
\r
268 * Method enumerateViewport
\r
272 * @return Enumeration
\r
274 public java.util.Enumeration enumerateViewport()
\r
276 return _viewportList.elements();
\r
277 } //-- java.util.Enumeration enumerateViewport()
\r
280 * Returns the value of field 'featureSettings'.
\r
282 * @return FeatureSettings
\r
283 * @return the value of field 'featureSettings'.
\r
285 public jalview.schemabinding.version2.FeatureSettings getFeatureSettings()
\r
287 return this._featureSettings;
\r
288 } //-- jalview.schemabinding.version2.FeatureSettings getFeatureSettings()
\r
298 public jalview.schemabinding.version2.JGroup getJGroup(int index)
\r
299 throws java.lang.IndexOutOfBoundsException
\r
301 //-- check bounds for index
\r
302 if ( (index < 0) || (index > _JGroupList.size()))
\r
304 throw new IndexOutOfBoundsException();
\r
307 return (jalview.schemabinding.version2.JGroup) _JGroupList.elementAt(index);
\r
308 } //-- jalview.schemabinding.version2.JGroup getJGroup(int)
\r
317 public jalview.schemabinding.version2.JGroup[] getJGroup()
\r
319 int size = _JGroupList.size();
\r
320 jalview.schemabinding.version2.JGroup[] mArray = new jalview.schemabinding.
\r
321 version2.JGroup[size];
\r
322 for (int index = 0; index < size; index++)
\r
324 mArray[index] = (jalview.schemabinding.version2.JGroup) _JGroupList.
\r
328 } //-- jalview.schemabinding.version2.JGroup[] getJGroup()
\r
331 * Method getJGroupCount
\r
337 public int getJGroupCount()
\r
339 return _JGroupList.size();
\r
340 } //-- int getJGroupCount()
\r
350 public jalview.schemabinding.version2.JSeq getJSeq(int index)
\r
351 throws java.lang.IndexOutOfBoundsException
\r
353 //-- check bounds for index
\r
354 if ( (index < 0) || (index > _JSeqList.size()))
\r
356 throw new IndexOutOfBoundsException();
\r
359 return (jalview.schemabinding.version2.JSeq) _JSeqList.elementAt(index);
\r
360 } //-- jalview.schemabinding.version2.JSeq getJSeq(int)
\r
369 public jalview.schemabinding.version2.JSeq[] getJSeq()
\r
371 int size = _JSeqList.size();
\r
372 jalview.schemabinding.version2.JSeq[] mArray = new jalview.schemabinding.
\r
373 version2.JSeq[size];
\r
374 for (int index = 0; index < size; index++)
\r
376 mArray[index] = (jalview.schemabinding.version2.JSeq) _JSeqList.elementAt(
\r
380 } //-- jalview.schemabinding.version2.JSeq[] getJSeq()
\r
383 * Method getJSeqCount
\r
389 public int getJSeqCount()
\r
391 return _JSeqList.size();
\r
392 } //-- int getJSeqCount()
\r
402 public jalview.schemabinding.version2.Tree getTree(int index)
\r
403 throws java.lang.IndexOutOfBoundsException
\r
405 //-- check bounds for index
\r
406 if ( (index < 0) || (index > _treeList.size()))
\r
408 throw new IndexOutOfBoundsException();
\r
411 return (jalview.schemabinding.version2.Tree) _treeList.elementAt(index);
\r
412 } //-- jalview.schemabinding.version2.Tree getTree(int)
\r
421 public jalview.schemabinding.version2.Tree[] getTree()
\r
423 int size = _treeList.size();
\r
424 jalview.schemabinding.version2.Tree[] mArray = new jalview.schemabinding.
\r
425 version2.Tree[size];
\r
426 for (int index = 0; index < size; index++)
\r
428 mArray[index] = (jalview.schemabinding.version2.Tree) _treeList.elementAt(
\r
432 } //-- jalview.schemabinding.version2.Tree[] getTree()
\r
435 * Method getTreeCount
\r
441 public int getTreeCount()
\r
443 return _treeList.size();
\r
444 } //-- int getTreeCount()
\r
447 * Method getUserColours
\r
452 * @return UserColours
\r
454 public jalview.schemabinding.version2.UserColours getUserColours(int index)
\r
455 throws java.lang.IndexOutOfBoundsException
\r
457 //-- check bounds for index
\r
458 if ( (index < 0) || (index > _userColoursList.size()))
\r
460 throw new IndexOutOfBoundsException();
\r
463 return (jalview.schemabinding.version2.UserColours) _userColoursList.
\r
465 } //-- jalview.schemabinding.version2.UserColours getUserColours(int)
\r
468 * Method getUserColours
\r
472 * @return UserColours
\r
474 public jalview.schemabinding.version2.UserColours[] getUserColours()
\r
476 int size = _userColoursList.size();
\r
477 jalview.schemabinding.version2.UserColours[] mArray = new jalview.
\r
478 schemabinding.version2.UserColours[size];
\r
479 for (int index = 0; index < size; index++)
\r
481 mArray[index] = (jalview.schemabinding.version2.UserColours)
\r
482 _userColoursList.elementAt(index);
\r
485 } //-- jalview.schemabinding.version2.UserColours[] getUserColours()
\r
488 * Method getUserColoursCount
\r
494 public int getUserColoursCount()
\r
496 return _userColoursList.size();
\r
497 } //-- int getUserColoursCount()
\r
500 * Method getViewport
\r
507 public jalview.schemabinding.version2.Viewport getViewport(int index)
\r
508 throws java.lang.IndexOutOfBoundsException
\r
510 //-- check bounds for index
\r
511 if ( (index < 0) || (index > _viewportList.size()))
\r
513 throw new IndexOutOfBoundsException();
\r
516 return (jalview.schemabinding.version2.Viewport) _viewportList.elementAt(
\r
518 } //-- jalview.schemabinding.version2.Viewport getViewport(int)
\r
521 * Method getViewport
\r
527 public jalview.schemabinding.version2.Viewport[] getViewport()
\r
529 int size = _viewportList.size();
\r
530 jalview.schemabinding.version2.Viewport[] mArray = new jalview.
\r
531 schemabinding.version2.Viewport[size];
\r
532 for (int index = 0; index < size; index++)
\r
534 mArray[index] = (jalview.schemabinding.version2.Viewport) _viewportList.
\r
538 } //-- jalview.schemabinding.version2.Viewport[] getViewport()
\r
541 * Method getViewportCount
\r
547 public int getViewportCount()
\r
549 return _viewportList.size();
\r
550 } //-- int getViewportCount()
\r
559 public boolean isValid()
\r
565 catch (org.exolab.castor.xml.ValidationException vex)
\r
570 } //-- boolean isValid()
\r
579 public void marshal(java.io.Writer out)
\r
580 throws org.exolab.castor.xml.MarshalException,
\r
581 org.exolab.castor.xml.ValidationException
\r
584 Marshaller.marshal(this, out);
\r
585 } //-- void marshal(java.io.Writer)
\r
594 public void marshal(org.xml.sax.ContentHandler handler)
\r
595 throws java.io.IOException, org.exolab.castor.xml.MarshalException,
\r
596 org.exolab.castor.xml.ValidationException
\r
599 Marshaller.marshal(this, handler);
\r
600 } //-- void marshal(org.xml.sax.ContentHandler)
\r
603 * Method removeAllJGroup
\r
606 public void removeAllJGroup()
\r
608 _JGroupList.removeAllElements();
\r
609 } //-- void removeAllJGroup()
\r
612 * Method removeAllJSeq
\r
615 public void removeAllJSeq()
\r
617 _JSeqList.removeAllElements();
\r
618 } //-- void removeAllJSeq()
\r
621 * Method removeAllTree
\r
624 public void removeAllTree()
\r
626 _treeList.removeAllElements();
\r
627 } //-- void removeAllTree()
\r
630 * Method removeAllUserColours
\r
633 public void removeAllUserColours()
\r
635 _userColoursList.removeAllElements();
\r
636 } //-- void removeAllUserColours()
\r
639 * Method removeAllViewport
\r
642 public void removeAllViewport()
\r
644 _viewportList.removeAllElements();
\r
645 } //-- void removeAllViewport()
\r
648 * Method removeJGroup
\r
655 public jalview.schemabinding.version2.JGroup removeJGroup(int index)
\r
657 java.lang.Object obj = _JGroupList.elementAt(index);
\r
658 _JGroupList.removeElementAt(index);
\r
659 return (jalview.schemabinding.version2.JGroup) obj;
\r
660 } //-- jalview.schemabinding.version2.JGroup removeJGroup(int)
\r
663 * Method removeJSeq
\r
670 public jalview.schemabinding.version2.JSeq removeJSeq(int index)
\r
672 java.lang.Object obj = _JSeqList.elementAt(index);
\r
673 _JSeqList.removeElementAt(index);
\r
674 return (jalview.schemabinding.version2.JSeq) obj;
\r
675 } //-- jalview.schemabinding.version2.JSeq removeJSeq(int)
\r
678 * Method removeTree
\r
685 public jalview.schemabinding.version2.Tree removeTree(int index)
\r
687 java.lang.Object obj = _treeList.elementAt(index);
\r
688 _treeList.removeElementAt(index);
\r
689 return (jalview.schemabinding.version2.Tree) obj;
\r
690 } //-- jalview.schemabinding.version2.Tree removeTree(int)
\r
693 * Method removeUserColours
\r
698 * @return UserColours
\r
700 public jalview.schemabinding.version2.UserColours removeUserColours(int index)
\r
702 java.lang.Object obj = _userColoursList.elementAt(index);
\r
703 _userColoursList.removeElementAt(index);
\r
704 return (jalview.schemabinding.version2.UserColours) obj;
\r
705 } //-- jalview.schemabinding.version2.UserColours removeUserColours(int)
\r
708 * Method removeViewport
\r
715 public jalview.schemabinding.version2.Viewport removeViewport(int index)
\r
717 java.lang.Object obj = _viewportList.elementAt(index);
\r
718 _viewportList.removeElementAt(index);
\r
719 return (jalview.schemabinding.version2.Viewport) obj;
\r
720 } //-- jalview.schemabinding.version2.Viewport removeViewport(int)
\r
723 * Sets the value of field 'featureSettings'.
\r
725 * @param featureSettings the value of field 'featureSettings'.
\r
727 public void setFeatureSettings(jalview.schemabinding.version2.FeatureSettings
\r
730 this._featureSettings = featureSettings;
\r
731 } //-- void setFeatureSettings(jalview.schemabinding.version2.FeatureSettings)
\r
741 public void setJGroup(int index,
\r
742 jalview.schemabinding.version2.JGroup vJGroup)
\r
743 throws java.lang.IndexOutOfBoundsException
\r
745 //-- check bounds for index
\r
746 if ( (index < 0) || (index > _JGroupList.size()))
\r
748 throw new IndexOutOfBoundsException();
\r
750 _JGroupList.setElementAt(vJGroup, index);
\r
751 } //-- void setJGroup(int, jalview.schemabinding.version2.JGroup)
\r
758 * @param JGroupArray
\r
760 public void setJGroup(jalview.schemabinding.version2.JGroup[] JGroupArray)
\r
763 _JGroupList.removeAllElements();
\r
764 for (int i = 0; i < JGroupArray.length; i++)
\r
766 _JGroupList.addElement(JGroupArray[i]);
\r
768 } //-- void setJGroup(jalview.schemabinding.version2.JGroup)
\r
778 public void setJSeq(int index, jalview.schemabinding.version2.JSeq vJSeq)
\r
779 throws java.lang.IndexOutOfBoundsException
\r
781 //-- check bounds for index
\r
782 if ( (index < 0) || (index > _JSeqList.size()))
\r
784 throw new IndexOutOfBoundsException();
\r
786 _JSeqList.setElementAt(vJSeq, index);
\r
787 } //-- void setJSeq(int, jalview.schemabinding.version2.JSeq)
\r
796 public void setJSeq(jalview.schemabinding.version2.JSeq[] JSeqArray)
\r
799 _JSeqList.removeAllElements();
\r
800 for (int i = 0; i < JSeqArray.length; i++)
\r
802 _JSeqList.addElement(JSeqArray[i]);
\r
804 } //-- void setJSeq(jalview.schemabinding.version2.JSeq)
\r
814 public void setTree(int index, jalview.schemabinding.version2.Tree vTree)
\r
815 throws java.lang.IndexOutOfBoundsException
\r
817 //-- check bounds for index
\r
818 if ( (index < 0) || (index > _treeList.size()))
\r
820 throw new IndexOutOfBoundsException();
\r
822 _treeList.setElementAt(vTree, index);
\r
823 } //-- void setTree(int, jalview.schemabinding.version2.Tree)
\r
832 public void setTree(jalview.schemabinding.version2.Tree[] treeArray)
\r
835 _treeList.removeAllElements();
\r
836 for (int i = 0; i < treeArray.length; i++)
\r
838 _treeList.addElement(treeArray[i]);
\r
840 } //-- void setTree(jalview.schemabinding.version2.Tree)
\r
843 * Method setUserColours
\r
848 * @param vUserColours
\r
850 public void setUserColours(int index,
\r
851 jalview.schemabinding.version2.UserColours
\r
853 throws java.lang.IndexOutOfBoundsException
\r
855 //-- check bounds for index
\r
856 if ( (index < 0) || (index > _userColoursList.size()))
\r
858 throw new IndexOutOfBoundsException();
\r
860 _userColoursList.setElementAt(vUserColours, index);
\r
861 } //-- void setUserColours(int, jalview.schemabinding.version2.UserColours)
\r
864 * Method setUserColours
\r
868 * @param userColoursArray
\r
870 public void setUserColours(jalview.schemabinding.version2.UserColours[]
\r
874 _userColoursList.removeAllElements();
\r
875 for (int i = 0; i < userColoursArray.length; i++)
\r
877 _userColoursList.addElement(userColoursArray[i]);
\r
879 } //-- void setUserColours(jalview.schemabinding.version2.UserColours)
\r
882 * Method setViewport
\r
889 public void setViewport(int index,
\r
890 jalview.schemabinding.version2.Viewport vViewport)
\r
891 throws java.lang.IndexOutOfBoundsException
\r
893 //-- check bounds for index
\r
894 if ( (index < 0) || (index > _viewportList.size()))
\r
896 throw new IndexOutOfBoundsException();
\r
898 _viewportList.setElementAt(vViewport, index);
\r
899 } //-- void setViewport(int, jalview.schemabinding.version2.Viewport)
\r
902 * Method setViewport
\r
906 * @param viewportArray
\r
908 public void setViewport(jalview.schemabinding.version2.Viewport[]
\r
912 _viewportList.removeAllElements();
\r
913 for (int i = 0; i < viewportArray.length; i++)
\r
915 _viewportList.addElement(viewportArray[i]);
\r
917 } //-- void setViewport(jalview.schemabinding.version2.Viewport)
\r
927 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
928 throws org.exolab.castor.xml.MarshalException,
\r
929 org.exolab.castor.xml.ValidationException
\r
931 return (jalview.schemabinding.version2.JalviewModelSequence) Unmarshaller.
\r
932 unmarshal(jalview.schemabinding.version2.JalviewModelSequence.class,
\r
934 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
940 public void validate()
\r
941 throws org.exolab.castor.xml.ValidationException
\r
943 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.
\r
945 validator.validate(this);
\r
946 } //-- void validate()
\r