licencing and format applied (eclipse)
[jalview.git] / src / jalview / schemabinding / version2 / JalviewModelSequence.java
index cb66b37..8d5cda1 100755 (executable)
@@ -1,15 +1,26 @@
 /*\r
- * This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
- * Schema.\r
- * $Id$\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)\r
+ * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+ * \r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ * \r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
  */\r
-\r
 package jalview.schemabinding.version2;\r
 \r
-  //---------------------------------/\r
- //- Imported classes and packages -/\r
-//---------------------------------/\r
+// ---------------------------------/\r
+// - Imported classes and packages -/\r
+// ---------------------------------/\r
 \r
 import org.exolab.castor.xml.Marshaller;\r
 import org.exolab.castor.xml.Unmarshaller;\r
@@ -19,907 +30,972 @@ import org.exolab.castor.xml.Unmarshaller;
  * \r
  * @version $Revision$ $Date$\r
  */\r
-public class JalviewModelSequence implements java.io.Serializable {\r
-\r
-\r
-      //--------------------------/\r
-     //- Class/Member Variables -/\r
-    //--------------------------/\r
-\r
-    /**\r
-     * Field _JSeqList.\r
-     */\r
-    private java.util.Vector _JSeqList;\r
-\r
-    /**\r
-     * Field _JGroupList.\r
-     */\r
-    private java.util.Vector _JGroupList;\r
-\r
-    /**\r
-     * Field _viewportList.\r
-     */\r
-    private java.util.Vector _viewportList;\r
-\r
-    /**\r
-     * Field _userColoursList.\r
-     */\r
-    private java.util.Vector _userColoursList;\r
-\r
-    /**\r
-     * Field _treeList.\r
-     */\r
-    private java.util.Vector _treeList;\r
-\r
-    /**\r
-     * Field _featureSettings.\r
-     */\r
-    private jalview.schemabinding.version2.FeatureSettings _featureSettings;\r
-\r
-\r
-      //----------------/\r
-     //- Constructors -/\r
-    //----------------/\r
-\r
-    public JalviewModelSequence() {\r
-        super();\r
-        this._JSeqList = new java.util.Vector();\r
-        this._JGroupList = new java.util.Vector();\r
-        this._viewportList = new java.util.Vector();\r
-        this._userColoursList = new java.util.Vector();\r
-        this._treeList = new java.util.Vector();\r
-    }\r
-\r
-\r
-      //-----------/\r
-     //- Methods -/\r
-    //-----------/\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vJGroup\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addJGroup(\r
-            final jalview.schemabinding.version2.JGroup vJGroup)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._JGroupList.addElement(vJGroup);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vJGroup\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addJGroup(\r
-            final int index,\r
-            final jalview.schemabinding.version2.JGroup vJGroup)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._JGroupList.add(index, vJGroup);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vJSeq\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addJSeq(\r
-            final jalview.schemabinding.version2.JSeq vJSeq)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._JSeqList.addElement(vJSeq);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vJSeq\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addJSeq(\r
-            final int index,\r
-            final jalview.schemabinding.version2.JSeq vJSeq)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._JSeqList.add(index, vJSeq);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vTree\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addTree(\r
-            final jalview.schemabinding.version2.Tree vTree)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._treeList.addElement(vTree);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vTree\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addTree(\r
-            final int index,\r
-            final jalview.schemabinding.version2.Tree vTree)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._treeList.add(index, vTree);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vUserColours\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addUserColours(\r
-            final jalview.schemabinding.version2.UserColours vUserColours)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._userColoursList.addElement(vUserColours);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vUserColours\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addUserColours(\r
-            final int index,\r
-            final jalview.schemabinding.version2.UserColours vUserColours)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._userColoursList.add(index, vUserColours);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vViewport\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addViewport(\r
-            final jalview.schemabinding.version2.Viewport vViewport)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._viewportList.addElement(vViewport);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vViewport\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addViewport(\r
-            final int index,\r
-            final jalview.schemabinding.version2.Viewport vViewport)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._viewportList.add(index, vViewport);\r
-    }\r
-\r
-    /**\r
-     * Method enumerateJGroup.\r
-     * \r
-     * @return an Enumeration over all\r
-     * jalview.schemabinding.version2.JGroup elements\r
-     */\r
-    public java.util.Enumeration enumerateJGroup(\r
-    ) {\r
-        return this._JGroupList.elements();\r
-    }\r
-\r
-    /**\r
-     * Method enumerateJSeq.\r
-     * \r
-     * @return an Enumeration over all\r
-     * jalview.schemabinding.version2.JSeq elements\r
-     */\r
-    public java.util.Enumeration enumerateJSeq(\r
-    ) {\r
-        return this._JSeqList.elements();\r
-    }\r
-\r
-    /**\r
-     * Method enumerateTree.\r
-     * \r
-     * @return an Enumeration over all\r
-     * jalview.schemabinding.version2.Tree elements\r
-     */\r
-    public java.util.Enumeration enumerateTree(\r
-    ) {\r
-        return this._treeList.elements();\r
-    }\r
-\r
-    /**\r
-     * Method enumerateUserColours.\r
-     * \r
-     * @return an Enumeration over all\r
-     * jalview.schemabinding.version2.UserColours elements\r
-     */\r
-    public java.util.Enumeration enumerateUserColours(\r
-    ) {\r
-        return this._userColoursList.elements();\r
-    }\r
-\r
-    /**\r
-     * Method enumerateViewport.\r
-     * \r
-     * @return an Enumeration over all\r
-     * jalview.schemabinding.version2.Viewport elements\r
-     */\r
-    public java.util.Enumeration enumerateViewport(\r
-    ) {\r
-        return this._viewportList.elements();\r
-    }\r
-\r
-    /**\r
-     * Returns the value of field 'featureSettings'.\r
-     * \r
-     * @return the value of field 'FeatureSettings'.\r
-     */\r
-    public jalview.schemabinding.version2.FeatureSettings getFeatureSettings(\r
-    ) {\r
-        return this._featureSettings;\r
-    }\r
-\r
-    /**\r
-     * Method getJGroup.\r
-     * \r
-     * @param index\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     * @return the value of the\r
-     * jalview.schemabinding.version2.JGroup at the given index\r
-     */\r
-    public jalview.schemabinding.version2.JGroup getJGroup(\r
-            final int index)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._JGroupList.size()) {\r
-            throw new IndexOutOfBoundsException("getJGroup: Index value '" + index + "' not in range [0.." + (this._JGroupList.size() - 1) + "]");\r
-        }\r
-        \r
-        return (jalview.schemabinding.version2.JGroup) _JGroupList.get(index);\r
-    }\r
-\r
-    /**\r
-     * Method getJGroup.Returns the contents of the collection in\r
-     * an Array.  <p>Note:  Just in case the collection contents\r
-     * are changing in another thread, we pass a 0-length Array of\r
-     * the correct type into the API call.  This way we <i>know</i>\r
-     * that the Array returned is of exactly the correct length.\r
-     * \r
-     * @return this collection as an Array\r
-     */\r
-    public jalview.schemabinding.version2.JGroup[] getJGroup(\r
-    ) {\r
-        jalview.schemabinding.version2.JGroup[] array = new jalview.schemabinding.version2.JGroup[0];\r
-        return (jalview.schemabinding.version2.JGroup[]) this._JGroupList.toArray(array);\r
-    }\r
-\r
-    /**\r
-     * Method getJGroupCount.\r
-     * \r
-     * @return the size of this collection\r
-     */\r
-    public int getJGroupCount(\r
-    ) {\r
-        return this._JGroupList.size();\r
-    }\r
-\r
-    /**\r
-     * Method getJSeq.\r
-     * \r
-     * @param index\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     * @return the value of the jalview.schemabinding.version2.JSeq\r
-     * at the given index\r
-     */\r
-    public jalview.schemabinding.version2.JSeq getJSeq(\r
-            final int index)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._JSeqList.size()) {\r
-            throw new IndexOutOfBoundsException("getJSeq: Index value '" + index + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");\r
-        }\r
-        \r
-        return (jalview.schemabinding.version2.JSeq) _JSeqList.get(index);\r
-    }\r
-\r
-    /**\r
-     * Method getJSeq.Returns the contents of the collection in an\r
-     * Array.  <p>Note:  Just in case the collection contents are\r
-     * changing in another thread, we pass a 0-length Array of the\r
-     * correct type into the API call.  This way we <i>know</i>\r
-     * that the Array returned is of exactly the correct length.\r
-     * \r
-     * @return this collection as an Array\r
-     */\r
-    public jalview.schemabinding.version2.JSeq[] getJSeq(\r
-    ) {\r
-        jalview.schemabinding.version2.JSeq[] array = new jalview.schemabinding.version2.JSeq[0];\r
-        return (jalview.schemabinding.version2.JSeq[]) this._JSeqList.toArray(array);\r
-    }\r
-\r
-    /**\r
-     * Method getJSeqCount.\r
-     * \r
-     * @return the size of this collection\r
-     */\r
-    public int getJSeqCount(\r
-    ) {\r
-        return this._JSeqList.size();\r
-    }\r
-\r
-    /**\r
-     * Method getTree.\r
-     * \r
-     * @param index\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     * @return the value of the jalview.schemabinding.version2.Tree\r
-     * at the given index\r
-     */\r
-    public jalview.schemabinding.version2.Tree getTree(\r
-            final int index)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._treeList.size()) {\r
-            throw new IndexOutOfBoundsException("getTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");\r
-        }\r
-        \r
-        return (jalview.schemabinding.version2.Tree) _treeList.get(index);\r
-    }\r
-\r
-    /**\r
-     * Method getTree.Returns the contents of the collection in an\r
-     * Array.  <p>Note:  Just in case the collection contents are\r
-     * changing in another thread, we pass a 0-length Array of the\r
-     * correct type into the API call.  This way we <i>know</i>\r
-     * that the Array returned is of exactly the correct length.\r
-     * \r
-     * @return this collection as an Array\r
-     */\r
-    public jalview.schemabinding.version2.Tree[] getTree(\r
-    ) {\r
-        jalview.schemabinding.version2.Tree[] array = new jalview.schemabinding.version2.Tree[0];\r
-        return (jalview.schemabinding.version2.Tree[]) this._treeList.toArray(array);\r
-    }\r
-\r
-    /**\r
-     * Method getTreeCount.\r
-     * \r
-     * @return the size of this collection\r
-     */\r
-    public int getTreeCount(\r
-    ) {\r
-        return this._treeList.size();\r
-    }\r
-\r
-    /**\r
-     * Method getUserColours.\r
-     * \r
-     * @param index\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     * @return the value of the\r
-     * jalview.schemabinding.version2.UserColours at the given index\r
-     */\r
-    public jalview.schemabinding.version2.UserColours getUserColours(\r
-            final int index)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._userColoursList.size()) {\r
-            throw new IndexOutOfBoundsException("getUserColours: Index value '" + index + "' not in range [0.." + (this._userColoursList.size() - 1) + "]");\r
-        }\r
-        \r
-        return (jalview.schemabinding.version2.UserColours) _userColoursList.get(index);\r
-    }\r
-\r
-    /**\r
-     * Method getUserColours.Returns the contents of the collection\r
-     * in an Array.  <p>Note:  Just in case the collection contents\r
-     * are changing in another thread, we pass a 0-length Array of\r
-     * the correct type into the API call.  This way we <i>know</i>\r
-     * that the Array returned is of exactly the correct length.\r
-     * \r
-     * @return this collection as an Array\r
-     */\r
-    public jalview.schemabinding.version2.UserColours[] getUserColours(\r
-    ) {\r
-        jalview.schemabinding.version2.UserColours[] array = new jalview.schemabinding.version2.UserColours[0];\r
-        return (jalview.schemabinding.version2.UserColours[]) this._userColoursList.toArray(array);\r
-    }\r
-\r
-    /**\r
-     * Method getUserColoursCount.\r
-     * \r
-     * @return the size of this collection\r
-     */\r
-    public int getUserColoursCount(\r
-    ) {\r
-        return this._userColoursList.size();\r
-    }\r
-\r
-    /**\r
-     * Method getViewport.\r
-     * \r
-     * @param index\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     * @return the value of the\r
-     * jalview.schemabinding.version2.Viewport at the given index\r
-     */\r
-    public jalview.schemabinding.version2.Viewport getViewport(\r
-            final int index)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._viewportList.size()) {\r
-            throw new IndexOutOfBoundsException("getViewport: Index value '" + index + "' not in range [0.." + (this._viewportList.size() - 1) + "]");\r
-        }\r
-        \r
-        return (jalview.schemabinding.version2.Viewport) _viewportList.get(index);\r
-    }\r
-\r
-    /**\r
-     * Method getViewport.Returns the contents of the collection in\r
-     * an Array.  <p>Note:  Just in case the collection contents\r
-     * are changing in another thread, we pass a 0-length Array of\r
-     * the correct type into the API call.  This way we <i>know</i>\r
-     * that the Array returned is of exactly the correct length.\r
-     * \r
-     * @return this collection as an Array\r
-     */\r
-    public jalview.schemabinding.version2.Viewport[] getViewport(\r
-    ) {\r
-        jalview.schemabinding.version2.Viewport[] array = new jalview.schemabinding.version2.Viewport[0];\r
-        return (jalview.schemabinding.version2.Viewport[]) this._viewportList.toArray(array);\r
-    }\r
-\r
-    /**\r
-     * Method getViewportCount.\r
-     * \r
-     * @return the size of this collection\r
-     */\r
-    public int getViewportCount(\r
-    ) {\r
-        return this._viewportList.size();\r
-    }\r
-\r
-    /**\r
-     * Method isValid.\r
-     * \r
-     * @return true if this object is valid according to the schema\r
-     */\r
-    public boolean isValid(\r
-    ) {\r
-        try {\r
-            validate();\r
-        } catch (org.exolab.castor.xml.ValidationException vex) {\r
-            return false;\r
-        }\r
-        return true;\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param out\r
-     * @throws org.exolab.castor.xml.MarshalException if object is\r
-     * null or if any SAXException is thrown during marshaling\r
-     * @throws org.exolab.castor.xml.ValidationException if this\r
-     * object is an invalid instance according to the schema\r
-     */\r
-    public void marshal(\r
-            final java.io.Writer out)\r
-    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
-        Marshaller.marshal(this, out);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param handler\r
-     * @throws java.io.IOException if an IOException occurs during\r
-     * marshaling\r
-     * @throws org.exolab.castor.xml.ValidationException if this\r
-     * object is an invalid instance according to the schema\r
-     * @throws org.exolab.castor.xml.MarshalException if object is\r
-     * null or if any SAXException is thrown during marshaling\r
-     */\r
-    public void marshal(\r
-            final org.xml.sax.ContentHandler handler)\r
-    throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
-        Marshaller.marshal(this, handler);\r
-    }\r
-\r
-    /**\r
-     */\r
-    public void removeAllJGroup(\r
-    ) {\r
-        this._JGroupList.clear();\r
-    }\r
-\r
-    /**\r
-     */\r
-    public void removeAllJSeq(\r
-    ) {\r
-        this._JSeqList.clear();\r
-    }\r
-\r
-    /**\r
-     */\r
-    public void removeAllTree(\r
-    ) {\r
-        this._treeList.clear();\r
-    }\r
-\r
-    /**\r
-     */\r
-    public void removeAllUserColours(\r
-    ) {\r
-        this._userColoursList.clear();\r
-    }\r
-\r
-    /**\r
-     */\r
-    public void removeAllViewport(\r
-    ) {\r
-        this._viewportList.clear();\r
-    }\r
-\r
-    /**\r
-     * Method removeJGroup.\r
-     * \r
-     * @param vJGroup\r
-     * @return true if the object was removed from the collection.\r
-     */\r
-    public boolean removeJGroup(\r
-            final jalview.schemabinding.version2.JGroup vJGroup) {\r
-        boolean removed = _JGroupList.remove(vJGroup);\r
-        return removed;\r
-    }\r
-\r
-    /**\r
-     * Method removeJGroupAt.\r
-     * \r
-     * @param index\r
-     * @return the element removed from the collection\r
-     */\r
-    public jalview.schemabinding.version2.JGroup removeJGroupAt(\r
-            final int index) {\r
-        java.lang.Object obj = this._JGroupList.remove(index);\r
-        return (jalview.schemabinding.version2.JGroup) obj;\r
-    }\r
-\r
-    /**\r
-     * Method removeJSeq.\r
-     * \r
-     * @param vJSeq\r
-     * @return true if the object was removed from the collection.\r
-     */\r
-    public boolean removeJSeq(\r
-            final jalview.schemabinding.version2.JSeq vJSeq) {\r
-        boolean removed = _JSeqList.remove(vJSeq);\r
-        return removed;\r
-    }\r
-\r
-    /**\r
-     * Method removeJSeqAt.\r
-     * \r
-     * @param index\r
-     * @return the element removed from the collection\r
-     */\r
-    public jalview.schemabinding.version2.JSeq removeJSeqAt(\r
-            final int index) {\r
-        java.lang.Object obj = this._JSeqList.remove(index);\r
-        return (jalview.schemabinding.version2.JSeq) obj;\r
-    }\r
-\r
-    /**\r
-     * Method removeTree.\r
-     * \r
-     * @param vTree\r
-     * @return true if the object was removed from the collection.\r
-     */\r
-    public boolean removeTree(\r
-            final jalview.schemabinding.version2.Tree vTree) {\r
-        boolean removed = _treeList.remove(vTree);\r
-        return removed;\r
-    }\r
-\r
-    /**\r
-     * Method removeTreeAt.\r
-     * \r
-     * @param index\r
-     * @return the element removed from the collection\r
-     */\r
-    public jalview.schemabinding.version2.Tree removeTreeAt(\r
-            final int index) {\r
-        java.lang.Object obj = this._treeList.remove(index);\r
-        return (jalview.schemabinding.version2.Tree) obj;\r
-    }\r
-\r
-    /**\r
-     * Method removeUserColours.\r
-     * \r
-     * @param vUserColours\r
-     * @return true if the object was removed from the collection.\r
-     */\r
-    public boolean removeUserColours(\r
-            final jalview.schemabinding.version2.UserColours vUserColours) {\r
-        boolean removed = _userColoursList.remove(vUserColours);\r
-        return removed;\r
-    }\r
-\r
-    /**\r
-     * Method removeUserColoursAt.\r
-     * \r
-     * @param index\r
-     * @return the element removed from the collection\r
-     */\r
-    public jalview.schemabinding.version2.UserColours removeUserColoursAt(\r
-            final int index) {\r
-        java.lang.Object obj = this._userColoursList.remove(index);\r
-        return (jalview.schemabinding.version2.UserColours) obj;\r
-    }\r
-\r
-    /**\r
-     * Method removeViewport.\r
-     * \r
-     * @param vViewport\r
-     * @return true if the object was removed from the collection.\r
-     */\r
-    public boolean removeViewport(\r
-            final jalview.schemabinding.version2.Viewport vViewport) {\r
-        boolean removed = _viewportList.remove(vViewport);\r
-        return removed;\r
-    }\r
-\r
-    /**\r
-     * Method removeViewportAt.\r
-     * \r
-     * @param index\r
-     * @return the element removed from the collection\r
-     */\r
-    public jalview.schemabinding.version2.Viewport removeViewportAt(\r
-            final int index) {\r
-        java.lang.Object obj = this._viewportList.remove(index);\r
-        return (jalview.schemabinding.version2.Viewport) obj;\r
-    }\r
-\r
-    /**\r
-     * Sets the value of field 'featureSettings'.\r
-     * \r
-     * @param featureSettings the value of field 'featureSettings'.\r
-     */\r
-    public void setFeatureSettings(\r
-            final jalview.schemabinding.version2.FeatureSettings featureSettings) {\r
-        this._featureSettings = featureSettings;\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vJGroup\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void setJGroup(\r
-            final int index,\r
-            final jalview.schemabinding.version2.JGroup vJGroup)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._JGroupList.size()) {\r
-            throw new IndexOutOfBoundsException("setJGroup: Index value '" + index + "' not in range [0.." + (this._JGroupList.size() - 1) + "]");\r
-        }\r
-        \r
-        this._JGroupList.set(index, vJGroup);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vJGroupArray\r
-     */\r
-    public void setJGroup(\r
-            final jalview.schemabinding.version2.JGroup[] vJGroupArray) {\r
-        //-- copy array\r
-        _JGroupList.clear();\r
-        \r
-        for (int i = 0; i < vJGroupArray.length; i++) {\r
-                this._JGroupList.add(vJGroupArray[i]);\r
-        }\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vJSeq\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void setJSeq(\r
-            final int index,\r
-            final jalview.schemabinding.version2.JSeq vJSeq)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._JSeqList.size()) {\r
-            throw new IndexOutOfBoundsException("setJSeq: Index value '" + index + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");\r
-        }\r
-        \r
-        this._JSeqList.set(index, vJSeq);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vJSeqArray\r
-     */\r
-    public void setJSeq(\r
-            final jalview.schemabinding.version2.JSeq[] vJSeqArray) {\r
-        //-- copy array\r
-        _JSeqList.clear();\r
-        \r
-        for (int i = 0; i < vJSeqArray.length; i++) {\r
-                this._JSeqList.add(vJSeqArray[i]);\r
-        }\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vTree\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void setTree(\r
-            final int index,\r
-            final jalview.schemabinding.version2.Tree vTree)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._treeList.size()) {\r
-            throw new IndexOutOfBoundsException("setTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");\r
-        }\r
-        \r
-        this._treeList.set(index, vTree);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vTreeArray\r
-     */\r
-    public void setTree(\r
-            final jalview.schemabinding.version2.Tree[] vTreeArray) {\r
-        //-- copy array\r
-        _treeList.clear();\r
-        \r
-        for (int i = 0; i < vTreeArray.length; i++) {\r
-                this._treeList.add(vTreeArray[i]);\r
-        }\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vUserColours\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void setUserColours(\r
-            final int index,\r
-            final jalview.schemabinding.version2.UserColours vUserColours)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._userColoursList.size()) {\r
-            throw new IndexOutOfBoundsException("setUserColours: Index value '" + index + "' not in range [0.." + (this._userColoursList.size() - 1) + "]");\r
-        }\r
-        \r
-        this._userColoursList.set(index, vUserColours);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vUserColoursArray\r
-     */\r
-    public void setUserColours(\r
-            final jalview.schemabinding.version2.UserColours[] vUserColoursArray) {\r
-        //-- copy array\r
-        _userColoursList.clear();\r
-        \r
-        for (int i = 0; i < vUserColoursArray.length; i++) {\r
-                this._userColoursList.add(vUserColoursArray[i]);\r
-        }\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vViewport\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void setViewport(\r
-            final int index,\r
-            final jalview.schemabinding.version2.Viewport vViewport)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._viewportList.size()) {\r
-            throw new IndexOutOfBoundsException("setViewport: Index value '" + index + "' not in range [0.." + (this._viewportList.size() - 1) + "]");\r
-        }\r
-        \r
-        this._viewportList.set(index, vViewport);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vViewportArray\r
-     */\r
-    public void setViewport(\r
-            final jalview.schemabinding.version2.Viewport[] vViewportArray) {\r
-        //-- copy array\r
-        _viewportList.clear();\r
-        \r
-        for (int i = 0; i < vViewportArray.length; i++) {\r
-                this._viewportList.add(vViewportArray[i]);\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Method unmarshal.\r
-     * \r
-     * @param reader\r
-     * @throws org.exolab.castor.xml.MarshalException if object is\r
-     * null or if any SAXException is thrown during marshaling\r
-     * @throws org.exolab.castor.xml.ValidationException if this\r
-     * object is an invalid instance according to the schema\r
-     * @return the unmarshaled\r
-     * jalview.schemabinding.version2.JalviewModelSequence\r
-     */\r
-    public static jalview.schemabinding.version2.JalviewModelSequence unmarshal(\r
-            final java.io.Reader reader)\r
-    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
-        return (jalview.schemabinding.version2.JalviewModelSequence) Unmarshaller.unmarshal(jalview.schemabinding.version2.JalviewModelSequence.class, reader);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @throws org.exolab.castor.xml.ValidationException if this\r
-     * object is an invalid instance according to the schema\r
-     */\r
-    public void validate(\r
-    )\r
-    throws org.exolab.castor.xml.ValidationException {\r
-        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
-        validator.validate(this);\r
-    }\r
+public class JalviewModelSequence implements java.io.Serializable\r
+{\r
+\r
+  // --------------------------/\r
+  // - Class/Member Variables -/\r
+  // --------------------------/\r
+\r
+  /**\r
+   * Field _JSeqList.\r
+   */\r
+  private java.util.Vector _JSeqList;\r
+\r
+  /**\r
+   * Field _JGroupList.\r
+   */\r
+  private java.util.Vector _JGroupList;\r
+\r
+  /**\r
+   * Field _viewportList.\r
+   */\r
+  private java.util.Vector _viewportList;\r
+\r
+  /**\r
+   * Field _userColoursList.\r
+   */\r
+  private java.util.Vector _userColoursList;\r
+\r
+  /**\r
+   * Field _treeList.\r
+   */\r
+  private java.util.Vector _treeList;\r
+\r
+  /**\r
+   * Field _featureSettings.\r
+   */\r
+  private jalview.schemabinding.version2.FeatureSettings _featureSettings;\r
+\r
+  // ----------------/\r
+  // - Constructors -/\r
+  // ----------------/\r
+\r
+  public JalviewModelSequence()\r
+  {\r
+    super();\r
+    this._JSeqList = new java.util.Vector();\r
+    this._JGroupList = new java.util.Vector();\r
+    this._viewportList = new java.util.Vector();\r
+    this._userColoursList = new java.util.Vector();\r
+    this._treeList = new java.util.Vector();\r
+  }\r
+\r
+  // -----------/\r
+  // - Methods -/\r
+  // -----------/\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param vJGroup\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void addJGroup(final jalview.schemabinding.version2.JGroup vJGroup)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    this._JGroupList.addElement(vJGroup);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param index\r
+   * @param vJGroup\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void addJGroup(final int index,\r
+          final jalview.schemabinding.version2.JGroup vJGroup)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    this._JGroupList.add(index, vJGroup);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param vJSeq\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void addJSeq(final jalview.schemabinding.version2.JSeq vJSeq)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    this._JSeqList.addElement(vJSeq);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param index\r
+   * @param vJSeq\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void addJSeq(final int index,\r
+          final jalview.schemabinding.version2.JSeq vJSeq)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    this._JSeqList.add(index, vJSeq);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param vTree\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void addTree(final jalview.schemabinding.version2.Tree vTree)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    this._treeList.addElement(vTree);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param index\r
+   * @param vTree\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void addTree(final int index,\r
+          final jalview.schemabinding.version2.Tree vTree)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    this._treeList.add(index, vTree);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param vUserColours\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void addUserColours(\r
+          final jalview.schemabinding.version2.UserColours vUserColours)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    this._userColoursList.addElement(vUserColours);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param index\r
+   * @param vUserColours\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void addUserColours(final int index,\r
+          final jalview.schemabinding.version2.UserColours vUserColours)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    this._userColoursList.add(index, vUserColours);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param vViewport\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void addViewport(\r
+          final jalview.schemabinding.version2.Viewport vViewport)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    this._viewportList.addElement(vViewport);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param index\r
+   * @param vViewport\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void addViewport(final int index,\r
+          final jalview.schemabinding.version2.Viewport vViewport)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    this._viewportList.add(index, vViewport);\r
+  }\r
+\r
+  /**\r
+   * Method enumerateJGroup.\r
+   * \r
+   * @return an Enumeration over all jalview.schemabinding.version2.JGroup\r
+   *         elements\r
+   */\r
+  public java.util.Enumeration enumerateJGroup()\r
+  {\r
+    return this._JGroupList.elements();\r
+  }\r
+\r
+  /**\r
+   * Method enumerateJSeq.\r
+   * \r
+   * @return an Enumeration over all jalview.schemabinding.version2.JSeq\r
+   *         elements\r
+   */\r
+  public java.util.Enumeration enumerateJSeq()\r
+  {\r
+    return this._JSeqList.elements();\r
+  }\r
+\r
+  /**\r
+   * Method enumerateTree.\r
+   * \r
+   * @return an Enumeration over all jalview.schemabinding.version2.Tree\r
+   *         elements\r
+   */\r
+  public java.util.Enumeration enumerateTree()\r
+  {\r
+    return this._treeList.elements();\r
+  }\r
+\r
+  /**\r
+   * Method enumerateUserColours.\r
+   * \r
+   * @return an Enumeration over all jalview.schemabinding.version2.UserColours\r
+   *         elements\r
+   */\r
+  public java.util.Enumeration enumerateUserColours()\r
+  {\r
+    return this._userColoursList.elements();\r
+  }\r
+\r
+  /**\r
+   * Method enumerateViewport.\r
+   * \r
+   * @return an Enumeration over all jalview.schemabinding.version2.Viewport\r
+   *         elements\r
+   */\r
+  public java.util.Enumeration enumerateViewport()\r
+  {\r
+    return this._viewportList.elements();\r
+  }\r
+\r
+  /**\r
+   * Returns the value of field 'featureSettings'.\r
+   * \r
+   * @return the value of field 'FeatureSettings'.\r
+   */\r
+  public jalview.schemabinding.version2.FeatureSettings getFeatureSettings()\r
+  {\r
+    return this._featureSettings;\r
+  }\r
+\r
+  /**\r
+   * Method getJGroup.\r
+   * \r
+   * @param index\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   * @return the value of the jalview.schemabinding.version2.JGroup at the given\r
+   *         index\r
+   */\r
+  public jalview.schemabinding.version2.JGroup getJGroup(final int index)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    // check bounds for index\r
+    if (index < 0 || index >= this._JGroupList.size())\r
+    {\r
+      throw new IndexOutOfBoundsException("getJGroup: Index value '"\r
+              + index + "' not in range [0.."\r
+              + (this._JGroupList.size() - 1) + "]");\r
+    }\r
+\r
+    return (jalview.schemabinding.version2.JGroup) _JGroupList.get(index);\r
+  }\r
+\r
+  /**\r
+   * Method getJGroup.Returns the contents of the collection in an Array.\r
+   * <p>\r
+   * Note: Just in case the collection contents are changing in another thread,\r
+   * we pass a 0-length Array of the correct type into the API call. This way we\r
+   * <i>know</i> that the Array returned is of exactly the correct length.\r
+   * \r
+   * @return this collection as an Array\r
+   */\r
+  public jalview.schemabinding.version2.JGroup[] getJGroup()\r
+  {\r
+    jalview.schemabinding.version2.JGroup[] array = new jalview.schemabinding.version2.JGroup[0];\r
+    return (jalview.schemabinding.version2.JGroup[]) this._JGroupList\r
+            .toArray(array);\r
+  }\r
+\r
+  /**\r
+   * Method getJGroupCount.\r
+   * \r
+   * @return the size of this collection\r
+   */\r
+  public int getJGroupCount()\r
+  {\r
+    return this._JGroupList.size();\r
+  }\r
+\r
+  /**\r
+   * Method getJSeq.\r
+   * \r
+   * @param index\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   * @return the value of the jalview.schemabinding.version2.JSeq at the given\r
+   *         index\r
+   */\r
+  public jalview.schemabinding.version2.JSeq getJSeq(final int index)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    // check bounds for index\r
+    if (index < 0 || index >= this._JSeqList.size())\r
+    {\r
+      throw new IndexOutOfBoundsException("getJSeq: Index value '" + index\r
+              + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");\r
+    }\r
+\r
+    return (jalview.schemabinding.version2.JSeq) _JSeqList.get(index);\r
+  }\r
+\r
+  /**\r
+   * Method getJSeq.Returns the contents of the collection in an Array.\r
+   * <p>\r
+   * Note: Just in case the collection contents are changing in another thread,\r
+   * we pass a 0-length Array of the correct type into the API call. This way we\r
+   * <i>know</i> that the Array returned is of exactly the correct length.\r
+   * \r
+   * @return this collection as an Array\r
+   */\r
+  public jalview.schemabinding.version2.JSeq[] getJSeq()\r
+  {\r
+    jalview.schemabinding.version2.JSeq[] array = new jalview.schemabinding.version2.JSeq[0];\r
+    return (jalview.schemabinding.version2.JSeq[]) this._JSeqList\r
+            .toArray(array);\r
+  }\r
+\r
+  /**\r
+   * Method getJSeqCount.\r
+   * \r
+   * @return the size of this collection\r
+   */\r
+  public int getJSeqCount()\r
+  {\r
+    return this._JSeqList.size();\r
+  }\r
+\r
+  /**\r
+   * Method getTree.\r
+   * \r
+   * @param index\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   * @return the value of the jalview.schemabinding.version2.Tree at the given\r
+   *         index\r
+   */\r
+  public jalview.schemabinding.version2.Tree getTree(final int index)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    // check bounds for index\r
+    if (index < 0 || index >= this._treeList.size())\r
+    {\r
+      throw new IndexOutOfBoundsException("getTree: Index value '" + index\r
+              + "' not in range [0.." + (this._treeList.size() - 1) + "]");\r
+    }\r
+\r
+    return (jalview.schemabinding.version2.Tree) _treeList.get(index);\r
+  }\r
+\r
+  /**\r
+   * Method getTree.Returns the contents of the collection in an Array.\r
+   * <p>\r
+   * Note: Just in case the collection contents are changing in another thread,\r
+   * we pass a 0-length Array of the correct type into the API call. This way we\r
+   * <i>know</i> that the Array returned is of exactly the correct length.\r
+   * \r
+   * @return this collection as an Array\r
+   */\r
+  public jalview.schemabinding.version2.Tree[] getTree()\r
+  {\r
+    jalview.schemabinding.version2.Tree[] array = new jalview.schemabinding.version2.Tree[0];\r
+    return (jalview.schemabinding.version2.Tree[]) this._treeList\r
+            .toArray(array);\r
+  }\r
+\r
+  /**\r
+   * Method getTreeCount.\r
+   * \r
+   * @return the size of this collection\r
+   */\r
+  public int getTreeCount()\r
+  {\r
+    return this._treeList.size();\r
+  }\r
+\r
+  /**\r
+   * Method getUserColours.\r
+   * \r
+   * @param index\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   * @return the value of the jalview.schemabinding.version2.UserColours at the\r
+   *         given index\r
+   */\r
+  public jalview.schemabinding.version2.UserColours getUserColours(\r
+          final int index) throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    // check bounds for index\r
+    if (index < 0 || index >= this._userColoursList.size())\r
+    {\r
+      throw new IndexOutOfBoundsException("getUserColours: Index value '"\r
+              + index + "' not in range [0.."\r
+              + (this._userColoursList.size() - 1) + "]");\r
+    }\r
+\r
+    return (jalview.schemabinding.version2.UserColours) _userColoursList\r
+            .get(index);\r
+  }\r
+\r
+  /**\r
+   * Method getUserColours.Returns the contents of the collection in an Array.\r
+   * <p>\r
+   * Note: Just in case the collection contents are changing in another thread,\r
+   * we pass a 0-length Array of the correct type into the API call. This way we\r
+   * <i>know</i> that the Array returned is of exactly the correct length.\r
+   * \r
+   * @return this collection as an Array\r
+   */\r
+  public jalview.schemabinding.version2.UserColours[] getUserColours()\r
+  {\r
+    jalview.schemabinding.version2.UserColours[] array = new jalview.schemabinding.version2.UserColours[0];\r
+    return (jalview.schemabinding.version2.UserColours[]) this._userColoursList\r
+            .toArray(array);\r
+  }\r
+\r
+  /**\r
+   * Method getUserColoursCount.\r
+   * \r
+   * @return the size of this collection\r
+   */\r
+  public int getUserColoursCount()\r
+  {\r
+    return this._userColoursList.size();\r
+  }\r
+\r
+  /**\r
+   * Method getViewport.\r
+   * \r
+   * @param index\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   * @return the value of the jalview.schemabinding.version2.Viewport at the\r
+   *         given index\r
+   */\r
+  public jalview.schemabinding.version2.Viewport getViewport(final int index)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    // check bounds for index\r
+    if (index < 0 || index >= this._viewportList.size())\r
+    {\r
+      throw new IndexOutOfBoundsException("getViewport: Index value '"\r
+              + index + "' not in range [0.."\r
+              + (this._viewportList.size() - 1) + "]");\r
+    }\r
+\r
+    return (jalview.schemabinding.version2.Viewport) _viewportList\r
+            .get(index);\r
+  }\r
+\r
+  /**\r
+   * Method getViewport.Returns the contents of the collection in an Array.\r
+   * <p>\r
+   * Note: Just in case the collection contents are changing in another thread,\r
+   * we pass a 0-length Array of the correct type into the API call. This way we\r
+   * <i>know</i> that the Array returned is of exactly the correct length.\r
+   * \r
+   * @return this collection as an Array\r
+   */\r
+  public jalview.schemabinding.version2.Viewport[] getViewport()\r
+  {\r
+    jalview.schemabinding.version2.Viewport[] array = new jalview.schemabinding.version2.Viewport[0];\r
+    return (jalview.schemabinding.version2.Viewport[]) this._viewportList\r
+            .toArray(array);\r
+  }\r
+\r
+  /**\r
+   * Method getViewportCount.\r
+   * \r
+   * @return the size of this collection\r
+   */\r
+  public int getViewportCount()\r
+  {\r
+    return this._viewportList.size();\r
+  }\r
+\r
+  /**\r
+   * Method isValid.\r
+   * \r
+   * @return true if this object is valid according to the schema\r
+   */\r
+  public boolean isValid()\r
+  {\r
+    try\r
+    {\r
+      validate();\r
+    } catch (org.exolab.castor.xml.ValidationException vex)\r
+    {\r
+      return false;\r
+    }\r
+    return true;\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param out\r
+   * @throws org.exolab.castor.xml.MarshalException\r
+   *                 if object is null or if any SAXException is thrown during\r
+   *                 marshaling\r
+   * @throws org.exolab.castor.xml.ValidationException\r
+   *                 if this object is an invalid instance according to the\r
+   *                 schema\r
+   */\r
+  public void marshal(final java.io.Writer out)\r
+          throws org.exolab.castor.xml.MarshalException,\r
+          org.exolab.castor.xml.ValidationException\r
+  {\r
+    Marshaller.marshal(this, out);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param handler\r
+   * @throws java.io.IOException\r
+   *                 if an IOException occurs during marshaling\r
+   * @throws org.exolab.castor.xml.ValidationException\r
+   *                 if this object is an invalid instance according to the\r
+   *                 schema\r
+   * @throws org.exolab.castor.xml.MarshalException\r
+   *                 if object is null or if any SAXException is thrown during\r
+   *                 marshaling\r
+   */\r
+  public void marshal(final org.xml.sax.ContentHandler handler)\r
+          throws java.io.IOException,\r
+          org.exolab.castor.xml.MarshalException,\r
+          org.exolab.castor.xml.ValidationException\r
+  {\r
+    Marshaller.marshal(this, handler);\r
+  }\r
+\r
+  /**\r
+   */\r
+  public void removeAllJGroup()\r
+  {\r
+    this._JGroupList.clear();\r
+  }\r
+\r
+  /**\r
+   */\r
+  public void removeAllJSeq()\r
+  {\r
+    this._JSeqList.clear();\r
+  }\r
+\r
+  /**\r
+   */\r
+  public void removeAllTree()\r
+  {\r
+    this._treeList.clear();\r
+  }\r
+\r
+  /**\r
+   */\r
+  public void removeAllUserColours()\r
+  {\r
+    this._userColoursList.clear();\r
+  }\r
+\r
+  /**\r
+   */\r
+  public void removeAllViewport()\r
+  {\r
+    this._viewportList.clear();\r
+  }\r
+\r
+  /**\r
+   * Method removeJGroup.\r
+   * \r
+   * @param vJGroup\r
+   * @return true if the object was removed from the collection.\r
+   */\r
+  public boolean removeJGroup(\r
+          final jalview.schemabinding.version2.JGroup vJGroup)\r
+  {\r
+    boolean removed = _JGroupList.remove(vJGroup);\r
+    return removed;\r
+  }\r
+\r
+  /**\r
+   * Method removeJGroupAt.\r
+   * \r
+   * @param index\r
+   * @return the element removed from the collection\r
+   */\r
+  public jalview.schemabinding.version2.JGroup removeJGroupAt(\r
+          final int index)\r
+  {\r
+    java.lang.Object obj = this._JGroupList.remove(index);\r
+    return (jalview.schemabinding.version2.JGroup) obj;\r
+  }\r
+\r
+  /**\r
+   * Method removeJSeq.\r
+   * \r
+   * @param vJSeq\r
+   * @return true if the object was removed from the collection.\r
+   */\r
+  public boolean removeJSeq(final jalview.schemabinding.version2.JSeq vJSeq)\r
+  {\r
+    boolean removed = _JSeqList.remove(vJSeq);\r
+    return removed;\r
+  }\r
+\r
+  /**\r
+   * Method removeJSeqAt.\r
+   * \r
+   * @param index\r
+   * @return the element removed from the collection\r
+   */\r
+  public jalview.schemabinding.version2.JSeq removeJSeqAt(final int index)\r
+  {\r
+    java.lang.Object obj = this._JSeqList.remove(index);\r
+    return (jalview.schemabinding.version2.JSeq) obj;\r
+  }\r
+\r
+  /**\r
+   * Method removeTree.\r
+   * \r
+   * @param vTree\r
+   * @return true if the object was removed from the collection.\r
+   */\r
+  public boolean removeTree(final jalview.schemabinding.version2.Tree vTree)\r
+  {\r
+    boolean removed = _treeList.remove(vTree);\r
+    return removed;\r
+  }\r
+\r
+  /**\r
+   * Method removeTreeAt.\r
+   * \r
+   * @param index\r
+   * @return the element removed from the collection\r
+   */\r
+  public jalview.schemabinding.version2.Tree removeTreeAt(final int index)\r
+  {\r
+    java.lang.Object obj = this._treeList.remove(index);\r
+    return (jalview.schemabinding.version2.Tree) obj;\r
+  }\r
+\r
+  /**\r
+   * Method removeUserColours.\r
+   * \r
+   * @param vUserColours\r
+   * @return true if the object was removed from the collection.\r
+   */\r
+  public boolean removeUserColours(\r
+          final jalview.schemabinding.version2.UserColours vUserColours)\r
+  {\r
+    boolean removed = _userColoursList.remove(vUserColours);\r
+    return removed;\r
+  }\r
+\r
+  /**\r
+   * Method removeUserColoursAt.\r
+   * \r
+   * @param index\r
+   * @return the element removed from the collection\r
+   */\r
+  public jalview.schemabinding.version2.UserColours removeUserColoursAt(\r
+          final int index)\r
+  {\r
+    java.lang.Object obj = this._userColoursList.remove(index);\r
+    return (jalview.schemabinding.version2.UserColours) obj;\r
+  }\r
+\r
+  /**\r
+   * Method removeViewport.\r
+   * \r
+   * @param vViewport\r
+   * @return true if the object was removed from the collection.\r
+   */\r
+  public boolean removeViewport(\r
+          final jalview.schemabinding.version2.Viewport vViewport)\r
+  {\r
+    boolean removed = _viewportList.remove(vViewport);\r
+    return removed;\r
+  }\r
+\r
+  /**\r
+   * Method removeViewportAt.\r
+   * \r
+   * @param index\r
+   * @return the element removed from the collection\r
+   */\r
+  public jalview.schemabinding.version2.Viewport removeViewportAt(\r
+          final int index)\r
+  {\r
+    java.lang.Object obj = this._viewportList.remove(index);\r
+    return (jalview.schemabinding.version2.Viewport) obj;\r
+  }\r
+\r
+  /**\r
+   * Sets the value of field 'featureSettings'.\r
+   * \r
+   * @param featureSettings\r
+   *                the value of field 'featureSettings'.\r
+   */\r
+  public void setFeatureSettings(\r
+          final jalview.schemabinding.version2.FeatureSettings featureSettings)\r
+  {\r
+    this._featureSettings = featureSettings;\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param index\r
+   * @param vJGroup\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void setJGroup(final int index,\r
+          final jalview.schemabinding.version2.JGroup vJGroup)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    // check bounds for index\r
+    if (index < 0 || index >= this._JGroupList.size())\r
+    {\r
+      throw new IndexOutOfBoundsException("setJGroup: Index value '"\r
+              + index + "' not in range [0.."\r
+              + (this._JGroupList.size() - 1) + "]");\r
+    }\r
+\r
+    this._JGroupList.set(index, vJGroup);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param vJGroupArray\r
+   */\r
+  public void setJGroup(\r
+          final jalview.schemabinding.version2.JGroup[] vJGroupArray)\r
+  {\r
+    // -- copy array\r
+    _JGroupList.clear();\r
+\r
+    for (int i = 0; i < vJGroupArray.length; i++)\r
+    {\r
+      this._JGroupList.add(vJGroupArray[i]);\r
+    }\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param index\r
+   * @param vJSeq\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void setJSeq(final int index,\r
+          final jalview.schemabinding.version2.JSeq vJSeq)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    // check bounds for index\r
+    if (index < 0 || index >= this._JSeqList.size())\r
+    {\r
+      throw new IndexOutOfBoundsException("setJSeq: Index value '" + index\r
+              + "' not in range [0.." + (this._JSeqList.size() - 1) + "]");\r
+    }\r
+\r
+    this._JSeqList.set(index, vJSeq);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param vJSeqArray\r
+   */\r
+  public void setJSeq(final jalview.schemabinding.version2.JSeq[] vJSeqArray)\r
+  {\r
+    // -- copy array\r
+    _JSeqList.clear();\r
+\r
+    for (int i = 0; i < vJSeqArray.length; i++)\r
+    {\r
+      this._JSeqList.add(vJSeqArray[i]);\r
+    }\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param index\r
+   * @param vTree\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void setTree(final int index,\r
+          final jalview.schemabinding.version2.Tree vTree)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    // check bounds for index\r
+    if (index < 0 || index >= this._treeList.size())\r
+    {\r
+      throw new IndexOutOfBoundsException("setTree: Index value '" + index\r
+              + "' not in range [0.." + (this._treeList.size() - 1) + "]");\r
+    }\r
+\r
+    this._treeList.set(index, vTree);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param vTreeArray\r
+   */\r
+  public void setTree(final jalview.schemabinding.version2.Tree[] vTreeArray)\r
+  {\r
+    // -- copy array\r
+    _treeList.clear();\r
+\r
+    for (int i = 0; i < vTreeArray.length; i++)\r
+    {\r
+      this._treeList.add(vTreeArray[i]);\r
+    }\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param index\r
+   * @param vUserColours\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void setUserColours(final int index,\r
+          final jalview.schemabinding.version2.UserColours vUserColours)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    // check bounds for index\r
+    if (index < 0 || index >= this._userColoursList.size())\r
+    {\r
+      throw new IndexOutOfBoundsException("setUserColours: Index value '"\r
+              + index + "' not in range [0.."\r
+              + (this._userColoursList.size() - 1) + "]");\r
+    }\r
+\r
+    this._userColoursList.set(index, vUserColours);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param vUserColoursArray\r
+   */\r
+  public void setUserColours(\r
+          final jalview.schemabinding.version2.UserColours[] vUserColoursArray)\r
+  {\r
+    // -- copy array\r
+    _userColoursList.clear();\r
+\r
+    for (int i = 0; i < vUserColoursArray.length; i++)\r
+    {\r
+      this._userColoursList.add(vUserColoursArray[i]);\r
+    }\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param index\r
+   * @param vViewport\r
+   * @throws java.lang.IndexOutOfBoundsException\r
+   *                 if the index given is outside the bounds of the collection\r
+   */\r
+  public void setViewport(final int index,\r
+          final jalview.schemabinding.version2.Viewport vViewport)\r
+          throws java.lang.IndexOutOfBoundsException\r
+  {\r
+    // check bounds for index\r
+    if (index < 0 || index >= this._viewportList.size())\r
+    {\r
+      throw new IndexOutOfBoundsException("setViewport: Index value '"\r
+              + index + "' not in range [0.."\r
+              + (this._viewportList.size() - 1) + "]");\r
+    }\r
+\r
+    this._viewportList.set(index, vViewport);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @param vViewportArray\r
+   */\r
+  public void setViewport(\r
+          final jalview.schemabinding.version2.Viewport[] vViewportArray)\r
+  {\r
+    // -- copy array\r
+    _viewportList.clear();\r
+\r
+    for (int i = 0; i < vViewportArray.length; i++)\r
+    {\r
+      this._viewportList.add(vViewportArray[i]);\r
+    }\r
+  }\r
+\r
+  /**\r
+   * Method unmarshal.\r
+   * \r
+   * @param reader\r
+   * @throws org.exolab.castor.xml.MarshalException\r
+   *                 if object is null or if any SAXException is thrown during\r
+   *                 marshaling\r
+   * @throws org.exolab.castor.xml.ValidationException\r
+   *                 if this object is an invalid instance according to the\r
+   *                 schema\r
+   * @return the unmarshaled jalview.schemabinding.version2.JalviewModelSequence\r
+   */\r
+  public static jalview.schemabinding.version2.JalviewModelSequence unmarshal(\r
+          final java.io.Reader reader)\r
+          throws org.exolab.castor.xml.MarshalException,\r
+          org.exolab.castor.xml.ValidationException\r
+  {\r
+    return (jalview.schemabinding.version2.JalviewModelSequence) Unmarshaller\r
+            .unmarshal(\r
+                    jalview.schemabinding.version2.JalviewModelSequence.class,\r
+                    reader);\r
+  }\r
+\r
+  /**\r
+   * \r
+   * \r
+   * @throws org.exolab.castor.xml.ValidationException\r
+   *                 if this object is an invalid instance according to the\r
+   *                 schema\r
+   */\r
+  public void validate() throws org.exolab.castor.xml.ValidationException\r
+  {\r
+    org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+    validator.validate(this);\r
+  }\r
 \r
 }\r