JAL-1503 update version in GPL header
[jalview.git] / src / jalview / schemabinding / version2 / MapListType.java
index eca79ba..04de497 100644 (file)
-/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)\r
- * Copyright (C) 2009 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
-package jalview.schemabinding.version2;\r
-\r
-  //---------------------------------/\r
- //- Imported classes and packages -/\r
-//---------------------------------/\r
-\r
-import org.exolab.castor.xml.Marshaller;\r
-import org.exolab.castor.xml.Unmarshaller;\r
-\r
-/**\r
- * developed after mapRangeType from\r
- * http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes\r
- *  \r
- *  This effectively represents a java.util.MapList object\r
- *  \r
- * \r
- * @version $Revision$ $Date$\r
- */\r
-public class MapListType implements java.io.Serializable {\r
-\r
-\r
-      //--------------------------/\r
-     //- Class/Member Variables -/\r
-    //--------------------------/\r
-\r
-    /**\r
-     * number of dictionary symbol widths involved in each\r
-     *  mapped position on this sequence (for example, 3 for a dna\r
-     * sequence exon\r
-     *  region that is being mapped to a protein sequence). This is\r
-     * optional,\r
-     *  since the unit can be usually be inferred from the\r
-     * dictionary type of\r
-     *  each sequence involved in the mapping. \r
-     */\r
-    private long _mapFromUnit;\r
-\r
-    /**\r
-     * keeps track of state for field: _mapFromUnit\r
-     */\r
-    private boolean _has_mapFromUnit;\r
-\r
-    /**\r
-     * number of dictionary symbol widths involved in each\r
-     *  mapped position on this sequence (for example, 3 for a dna\r
-     * sequence exon\r
-     *  region that is being mapped to a protein sequence). This is\r
-     * optional,\r
-     *  since the unit can be usually be inferred from the\r
-     * dictionary type of\r
-     *  each sequence involved in the mapping. \r
-     */\r
-    private long _mapToUnit;\r
-\r
-    /**\r
-     * keeps track of state for field: _mapToUnit\r
-     */\r
-    private boolean _has_mapToUnit;\r
-\r
-    /**\r
-     * a region from start to end inclusive\r
-     */\r
-    private java.util.Vector _mapListFromList;\r
-\r
-    /**\r
-     * a region from start to end inclusive\r
-     */\r
-    private java.util.Vector _mapListToList;\r
-\r
-\r
-      //----------------/\r
-     //- Constructors -/\r
-    //----------------/\r
-\r
-    public MapListType() {\r
-        super();\r
-        this._mapListFromList = new java.util.Vector();\r
-        this._mapListToList = new java.util.Vector();\r
-    }\r
-\r
-\r
-      //-----------/\r
-     //- Methods -/\r
-    //-----------/\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vMapListFrom\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addMapListFrom(\r
-            final jalview.schemabinding.version2.MapListFrom vMapListFrom)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._mapListFromList.addElement(vMapListFrom);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vMapListFrom\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addMapListFrom(\r
-            final int index,\r
-            final jalview.schemabinding.version2.MapListFrom vMapListFrom)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._mapListFromList.add(index, vMapListFrom);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vMapListTo\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addMapListTo(\r
-            final jalview.schemabinding.version2.MapListTo vMapListTo)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._mapListToList.addElement(vMapListTo);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vMapListTo\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addMapListTo(\r
-            final int index,\r
-            final jalview.schemabinding.version2.MapListTo vMapListTo)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._mapListToList.add(index, vMapListTo);\r
-    }\r
-\r
-    /**\r
-     */\r
-    public void deleteMapFromUnit(\r
-    ) {\r
-        this._has_mapFromUnit= false;\r
-    }\r
-\r
-    /**\r
-     */\r
-    public void deleteMapToUnit(\r
-    ) {\r
-        this._has_mapToUnit= false;\r
-    }\r
-\r
-    /**\r
-     * Method enumerateMapListFrom.\r
-     * \r
-     * @return an Enumeration over all\r
-     * jalview.schemabinding.version2.MapListFrom elements\r
-     */\r
-    public java.util.Enumeration enumerateMapListFrom(\r
-    ) {\r
-        return this._mapListFromList.elements();\r
-    }\r
-\r
-    /**\r
-     * Method enumerateMapListTo.\r
-     * \r
-     * @return an Enumeration over all\r
-     * jalview.schemabinding.version2.MapListTo elements\r
-     */\r
-    public java.util.Enumeration enumerateMapListTo(\r
-    ) {\r
-        return this._mapListToList.elements();\r
-    }\r
-\r
-    /**\r
-     * Returns the value of field 'mapFromUnit'. The field\r
-     * 'mapFromUnit' has the following description: number of\r
-     * dictionary symbol widths involved in each\r
-     *  mapped position on this sequence (for example, 3 for a dna\r
-     * sequence exon\r
-     *  region that is being mapped to a protein sequence). This is\r
-     * optional,\r
-     *  since the unit can be usually be inferred from the\r
-     * dictionary type of\r
-     *  each sequence involved in the mapping. \r
-     * \r
-     * @return the value of field 'MapFromUnit'.\r
-     */\r
-    public long getMapFromUnit(\r
-    ) {\r
-        return this._mapFromUnit;\r
-    }\r
-\r
-    /**\r
-     * Method getMapListFrom.\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.MapListFrom at the given index\r
-     */\r
-    public jalview.schemabinding.version2.MapListFrom getMapListFrom(\r
-            final int index)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._mapListFromList.size()) {\r
-            throw new IndexOutOfBoundsException("getMapListFrom: Index value '" + index + "' not in range [0.." + (this._mapListFromList.size() - 1) + "]");\r
-        }\r
-        \r
-        return (jalview.schemabinding.version2.MapListFrom) _mapListFromList.get(index);\r
-    }\r
-\r
-    /**\r
-     * Method getMapListFrom.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.MapListFrom[] getMapListFrom(\r
-    ) {\r
-        jalview.schemabinding.version2.MapListFrom[] array = new jalview.schemabinding.version2.MapListFrom[0];\r
-        return (jalview.schemabinding.version2.MapListFrom[]) this._mapListFromList.toArray(array);\r
-    }\r
-\r
-    /**\r
-     * Method getMapListFromCount.\r
-     * \r
-     * @return the size of this collection\r
-     */\r
-    public int getMapListFromCount(\r
-    ) {\r
-        return this._mapListFromList.size();\r
-    }\r
-\r
-    /**\r
-     * Method getMapListTo.\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.MapListTo at the given index\r
-     */\r
-    public jalview.schemabinding.version2.MapListTo getMapListTo(\r
-            final int index)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._mapListToList.size()) {\r
-            throw new IndexOutOfBoundsException("getMapListTo: Index value '" + index + "' not in range [0.." + (this._mapListToList.size() - 1) + "]");\r
-        }\r
-        \r
-        return (jalview.schemabinding.version2.MapListTo) _mapListToList.get(index);\r
-    }\r
-\r
-    /**\r
-     * Method getMapListTo.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.MapListTo[] getMapListTo(\r
-    ) {\r
-        jalview.schemabinding.version2.MapListTo[] array = new jalview.schemabinding.version2.MapListTo[0];\r
-        return (jalview.schemabinding.version2.MapListTo[]) this._mapListToList.toArray(array);\r
-    }\r
-\r
-    /**\r
-     * Method getMapListToCount.\r
-     * \r
-     * @return the size of this collection\r
-     */\r
-    public int getMapListToCount(\r
-    ) {\r
-        return this._mapListToList.size();\r
-    }\r
-\r
-    /**\r
-     * Returns the value of field 'mapToUnit'. The field\r
-     * 'mapToUnit' has the following description: number of\r
-     * dictionary symbol widths involved in each\r
-     *  mapped position on this sequence (for example, 3 for a dna\r
-     * sequence exon\r
-     *  region that is being mapped to a protein sequence). This is\r
-     * optional,\r
-     *  since the unit can be usually be inferred from the\r
-     * dictionary type of\r
-     *  each sequence involved in the mapping. \r
-     * \r
-     * @return the value of field 'MapToUnit'.\r
-     */\r
-    public long getMapToUnit(\r
-    ) {\r
-        return this._mapToUnit;\r
-    }\r
-\r
-    /**\r
-     * Method hasMapFromUnit.\r
-     * \r
-     * @return true if at least one MapFromUnit has been added\r
-     */\r
-    public boolean hasMapFromUnit(\r
-    ) {\r
-        return this._has_mapFromUnit;\r
-    }\r
-\r
-    /**\r
-     * Method hasMapToUnit.\r
-     * \r
-     * @return true if at least one MapToUnit has been added\r
-     */\r
-    public boolean hasMapToUnit(\r
-    ) {\r
-        return this._has_mapToUnit;\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 removeAllMapListFrom(\r
-    ) {\r
-        this._mapListFromList.clear();\r
-    }\r
-\r
-    /**\r
-     */\r
-    public void removeAllMapListTo(\r
-    ) {\r
-        this._mapListToList.clear();\r
-    }\r
-\r
-    /**\r
-     * Method removeMapListFrom.\r
-     * \r
-     * @param vMapListFrom\r
-     * @return true if the object was removed from the collection.\r
-     */\r
-    public boolean removeMapListFrom(\r
-            final jalview.schemabinding.version2.MapListFrom vMapListFrom) {\r
-        boolean removed = _mapListFromList.remove(vMapListFrom);\r
-        return removed;\r
-    }\r
-\r
-    /**\r
-     * Method removeMapListFromAt.\r
-     * \r
-     * @param index\r
-     * @return the element removed from the collection\r
-     */\r
-    public jalview.schemabinding.version2.MapListFrom removeMapListFromAt(\r
-            final int index) {\r
-        java.lang.Object obj = this._mapListFromList.remove(index);\r
-        return (jalview.schemabinding.version2.MapListFrom) obj;\r
-    }\r
-\r
-    /**\r
-     * Method removeMapListTo.\r
-     * \r
-     * @param vMapListTo\r
-     * @return true if the object was removed from the collection.\r
-     */\r
-    public boolean removeMapListTo(\r
-            final jalview.schemabinding.version2.MapListTo vMapListTo) {\r
-        boolean removed = _mapListToList.remove(vMapListTo);\r
-        return removed;\r
-    }\r
-\r
-    /**\r
-     * Method removeMapListToAt.\r
-     * \r
-     * @param index\r
-     * @return the element removed from the collection\r
-     */\r
-    public jalview.schemabinding.version2.MapListTo removeMapListToAt(\r
-            final int index) {\r
-        java.lang.Object obj = this._mapListToList.remove(index);\r
-        return (jalview.schemabinding.version2.MapListTo) obj;\r
-    }\r
-\r
-    /**\r
-     * Sets the value of field 'mapFromUnit'. The field\r
-     * 'mapFromUnit' has the following description: number of\r
-     * dictionary symbol widths involved in each\r
-     *  mapped position on this sequence (for example, 3 for a dna\r
-     * sequence exon\r
-     *  region that is being mapped to a protein sequence). This is\r
-     * optional,\r
-     *  since the unit can be usually be inferred from the\r
-     * dictionary type of\r
-     *  each sequence involved in the mapping. \r
-     * \r
-     * @param mapFromUnit the value of field 'mapFromUnit'.\r
-     */\r
-    public void setMapFromUnit(\r
-            final long mapFromUnit) {\r
-        this._mapFromUnit = mapFromUnit;\r
-        this._has_mapFromUnit = true;\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vMapListFrom\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void setMapListFrom(\r
-            final int index,\r
-            final jalview.schemabinding.version2.MapListFrom vMapListFrom)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._mapListFromList.size()) {\r
-            throw new IndexOutOfBoundsException("setMapListFrom: Index value '" + index + "' not in range [0.." + (this._mapListFromList.size() - 1) + "]");\r
-        }\r
-        \r
-        this._mapListFromList.set(index, vMapListFrom);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vMapListFromArray\r
-     */\r
-    public void setMapListFrom(\r
-            final jalview.schemabinding.version2.MapListFrom[] vMapListFromArray) {\r
-        //-- copy array\r
-        _mapListFromList.clear();\r
-        \r
-        for (int i = 0; i < vMapListFromArray.length; i++) {\r
-                this._mapListFromList.add(vMapListFromArray[i]);\r
-        }\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vMapListTo\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void setMapListTo(\r
-            final int index,\r
-            final jalview.schemabinding.version2.MapListTo vMapListTo)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._mapListToList.size()) {\r
-            throw new IndexOutOfBoundsException("setMapListTo: Index value '" + index + "' not in range [0.." + (this._mapListToList.size() - 1) + "]");\r
-        }\r
-        \r
-        this._mapListToList.set(index, vMapListTo);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vMapListToArray\r
-     */\r
-    public void setMapListTo(\r
-            final jalview.schemabinding.version2.MapListTo[] vMapListToArray) {\r
-        //-- copy array\r
-        _mapListToList.clear();\r
-        \r
-        for (int i = 0; i < vMapListToArray.length; i++) {\r
-                this._mapListToList.add(vMapListToArray[i]);\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Sets the value of field 'mapToUnit'. The field 'mapToUnit'\r
-     * has the following description: number of dictionary symbol\r
-     * widths involved in each\r
-     *  mapped position on this sequence (for example, 3 for a dna\r
-     * sequence exon\r
-     *  region that is being mapped to a protein sequence). This is\r
-     * optional,\r
-     *  since the unit can be usually be inferred from the\r
-     * dictionary type of\r
-     *  each sequence involved in the mapping. \r
-     * \r
-     * @param mapToUnit the value of field 'mapToUnit'.\r
-     */\r
-    public void setMapToUnit(\r
-            final long mapToUnit) {\r
-        this._mapToUnit = mapToUnit;\r
-        this._has_mapToUnit = true;\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.MapListType\r
-     */\r
-    public static jalview.schemabinding.version2.MapListType unmarshal(\r
-            final java.io.Reader reader)\r
-    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
-        return (jalview.schemabinding.version2.MapListType) Unmarshaller.unmarshal(jalview.schemabinding.version2.MapListType.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
-\r
-}\r
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
+ * Copyright (C) 2014 The Jalview Authors
+ * 
+ * This file is part of Jalview.
+ * 
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License 
+ * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ *  
+ * Jalview is distributed in the hope that it will be useful, but 
+ * WITHOUT ANY WARRANTY; without even the implied warranty 
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ * PURPOSE.  See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along with Jalview.  
+ * If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ ******************************************************************************/
+/*
+ * This class was automatically generated with 
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
+ */
+
+package jalview.schemabinding.version2;
+
+//---------------------------------/
+//- Imported classes and packages -/
+//---------------------------------/
+
+import org.exolab.castor.xml.Marshaller;
+import org.exolab.castor.xml.Unmarshaller;
+
+/**
+ * developed after mapRangeType from
+ * http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes
+ * 
+ * This effectively represents a java.util.MapList object
+ * 
+ * 
+ * @version $Revision$ $Date$
+ */
+public class MapListType implements java.io.Serializable
+{
+
+  // --------------------------/
+  // - Class/Member Variables -/
+  // --------------------------/
+
+  /**
+   * number of dictionary symbol widths involved in each mapped position on this
+   * sequence (for example, 3 for a dna sequence exon region that is being
+   * mapped to a protein sequence). This is optional, since the unit can be
+   * usually be inferred from the dictionary type of each sequence involved in
+   * the mapping.
+   */
+  private long _mapFromUnit;
+
+  /**
+   * keeps track of state for field: _mapFromUnit
+   */
+  private boolean _has_mapFromUnit;
+
+  /**
+   * number of dictionary symbol widths involved in each mapped position on this
+   * sequence (for example, 3 for a dna sequence exon region that is being
+   * mapped to a protein sequence). This is optional, since the unit can be
+   * usually be inferred from the dictionary type of each sequence involved in
+   * the mapping.
+   */
+  private long _mapToUnit;
+
+  /**
+   * keeps track of state for field: _mapToUnit
+   */
+  private boolean _has_mapToUnit;
+
+  /**
+   * a region from start to end inclusive
+   */
+  private java.util.Vector _mapListFromList;
+
+  /**
+   * a region from start to end inclusive
+   */
+  private java.util.Vector _mapListToList;
+
+  // ----------------/
+  // - Constructors -/
+  // ----------------/
+
+  public MapListType()
+  {
+    super();
+    this._mapListFromList = new java.util.Vector();
+    this._mapListToList = new java.util.Vector();
+  }
+
+  // -----------/
+  // - Methods -/
+  // -----------/
+
+  /**
+   * 
+   * 
+   * @param vMapListFrom
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   */
+  public void addMapListFrom(
+          final jalview.schemabinding.version2.MapListFrom vMapListFrom)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    this._mapListFromList.addElement(vMapListFrom);
+  }
+
+  /**
+   * 
+   * 
+   * @param index
+   * @param vMapListFrom
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   */
+  public void addMapListFrom(final int index,
+          final jalview.schemabinding.version2.MapListFrom vMapListFrom)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    this._mapListFromList.add(index, vMapListFrom);
+  }
+
+  /**
+   * 
+   * 
+   * @param vMapListTo
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   */
+  public void addMapListTo(
+          final jalview.schemabinding.version2.MapListTo vMapListTo)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    this._mapListToList.addElement(vMapListTo);
+  }
+
+  /**
+   * 
+   * 
+   * @param index
+   * @param vMapListTo
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   */
+  public void addMapListTo(final int index,
+          final jalview.schemabinding.version2.MapListTo vMapListTo)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    this._mapListToList.add(index, vMapListTo);
+  }
+
+  /**
+     */
+  public void deleteMapFromUnit()
+  {
+    this._has_mapFromUnit = false;
+  }
+
+  /**
+     */
+  public void deleteMapToUnit()
+  {
+    this._has_mapToUnit = false;
+  }
+
+  /**
+   * Method enumerateMapListFrom.
+   * 
+   * @return an Enumeration over all jalview.schemabinding.version2.MapListFrom
+   *         elements
+   */
+  public java.util.Enumeration enumerateMapListFrom()
+  {
+    return this._mapListFromList.elements();
+  }
+
+  /**
+   * Method enumerateMapListTo.
+   * 
+   * @return an Enumeration over all jalview.schemabinding.version2.MapListTo
+   *         elements
+   */
+  public java.util.Enumeration enumerateMapListTo()
+  {
+    return this._mapListToList.elements();
+  }
+
+  /**
+   * Returns the value of field 'mapFromUnit'. The field 'mapFromUnit' has the
+   * following description: number of dictionary symbol widths involved in each
+   * mapped position on this sequence (for example, 3 for a dna sequence exon
+   * region that is being mapped to a protein sequence). This is optional, since
+   * the unit can be usually be inferred from the dictionary type of each
+   * sequence involved in the mapping.
+   * 
+   * @return the value of field 'MapFromUnit'.
+   */
+  public long getMapFromUnit()
+  {
+    return this._mapFromUnit;
+  }
+
+  /**
+   * Method getMapListFrom.
+   * 
+   * @param index
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   * @return the value of the jalview.schemabinding.version2.MapListFrom at the
+   *         given index
+   */
+  public jalview.schemabinding.version2.MapListFrom getMapListFrom(
+          final int index) throws java.lang.IndexOutOfBoundsException
+  {
+    // check bounds for index
+    if (index < 0 || index >= this._mapListFromList.size())
+    {
+      throw new IndexOutOfBoundsException("getMapListFrom: Index value '"
+              + index + "' not in range [0.."
+              + (this._mapListFromList.size() - 1) + "]");
+    }
+
+    return (jalview.schemabinding.version2.MapListFrom) _mapListFromList
+            .get(index);
+  }
+
+  /**
+   * Method getMapListFrom.Returns the contents of the collection in an Array.
+   * <p>
+   * Note: Just in case the collection contents are changing in another thread,
+   * we pass a 0-length Array of the correct type into the API call. This way we
+   * <i>know</i> that the Array returned is of exactly the correct length.
+   * 
+   * @return this collection as an Array
+   */
+  public jalview.schemabinding.version2.MapListFrom[] getMapListFrom()
+  {
+    jalview.schemabinding.version2.MapListFrom[] array = new jalview.schemabinding.version2.MapListFrom[0];
+    return (jalview.schemabinding.version2.MapListFrom[]) this._mapListFromList
+            .toArray(array);
+  }
+
+  /**
+   * Method getMapListFromCount.
+   * 
+   * @return the size of this collection
+   */
+  public int getMapListFromCount()
+  {
+    return this._mapListFromList.size();
+  }
+
+  /**
+   * Method getMapListTo.
+   * 
+   * @param index
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   * @return the value of the jalview.schemabinding.version2.MapListTo at the
+   *         given index
+   */
+  public jalview.schemabinding.version2.MapListTo getMapListTo(
+          final int index) throws java.lang.IndexOutOfBoundsException
+  {
+    // check bounds for index
+    if (index < 0 || index >= this._mapListToList.size())
+    {
+      throw new IndexOutOfBoundsException("getMapListTo: Index value '"
+              + index + "' not in range [0.."
+              + (this._mapListToList.size() - 1) + "]");
+    }
+
+    return (jalview.schemabinding.version2.MapListTo) _mapListToList
+            .get(index);
+  }
+
+  /**
+   * Method getMapListTo.Returns the contents of the collection in an Array.
+   * <p>
+   * Note: Just in case the collection contents are changing in another thread,
+   * we pass a 0-length Array of the correct type into the API call. This way we
+   * <i>know</i> that the Array returned is of exactly the correct length.
+   * 
+   * @return this collection as an Array
+   */
+  public jalview.schemabinding.version2.MapListTo[] getMapListTo()
+  {
+    jalview.schemabinding.version2.MapListTo[] array = new jalview.schemabinding.version2.MapListTo[0];
+    return (jalview.schemabinding.version2.MapListTo[]) this._mapListToList
+            .toArray(array);
+  }
+
+  /**
+   * Method getMapListToCount.
+   * 
+   * @return the size of this collection
+   */
+  public int getMapListToCount()
+  {
+    return this._mapListToList.size();
+  }
+
+  /**
+   * Returns the value of field 'mapToUnit'. The field 'mapToUnit' has the
+   * following description: number of dictionary symbol widths involved in each
+   * mapped position on this sequence (for example, 3 for a dna sequence exon
+   * region that is being mapped to a protein sequence). This is optional, since
+   * the unit can be usually be inferred from the dictionary type of each
+   * sequence involved in the mapping.
+   * 
+   * @return the value of field 'MapToUnit'.
+   */
+  public long getMapToUnit()
+  {
+    return this._mapToUnit;
+  }
+
+  /**
+   * Method hasMapFromUnit.
+   * 
+   * @return true if at least one MapFromUnit has been added
+   */
+  public boolean hasMapFromUnit()
+  {
+    return this._has_mapFromUnit;
+  }
+
+  /**
+   * Method hasMapToUnit.
+   * 
+   * @return true if at least one MapToUnit has been added
+   */
+  public boolean hasMapToUnit()
+  {
+    return this._has_mapToUnit;
+  }
+
+  /**
+   * Method isValid.
+   * 
+   * @return true if this object is valid according to the schema
+   */
+  public boolean isValid()
+  {
+    try
+    {
+      validate();
+    } catch (org.exolab.castor.xml.ValidationException vex)
+    {
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * 
+   * 
+   * @param out
+   * @throws org.exolab.castor.xml.MarshalException
+   *           if object is null or if any SAXException is thrown during
+   *           marshaling
+   * @throws org.exolab.castor.xml.ValidationException
+   *           if this object is an invalid instance according to the schema
+   */
+  public void marshal(final java.io.Writer out)
+          throws org.exolab.castor.xml.MarshalException,
+          org.exolab.castor.xml.ValidationException
+  {
+    Marshaller.marshal(this, out);
+  }
+
+  /**
+   * 
+   * 
+   * @param handler
+   * @throws java.io.IOException
+   *           if an IOException occurs during marshaling
+   * @throws org.exolab.castor.xml.ValidationException
+   *           if this object is an invalid instance according to the schema
+   * @throws org.exolab.castor.xml.MarshalException
+   *           if object is null or if any SAXException is thrown during
+   *           marshaling
+   */
+  public void marshal(final org.xml.sax.ContentHandler handler)
+          throws java.io.IOException,
+          org.exolab.castor.xml.MarshalException,
+          org.exolab.castor.xml.ValidationException
+  {
+    Marshaller.marshal(this, handler);
+  }
+
+  /**
+     */
+  public void removeAllMapListFrom()
+  {
+    this._mapListFromList.clear();
+  }
+
+  /**
+     */
+  public void removeAllMapListTo()
+  {
+    this._mapListToList.clear();
+  }
+
+  /**
+   * Method removeMapListFrom.
+   * 
+   * @param vMapListFrom
+   * @return true if the object was removed from the collection.
+   */
+  public boolean removeMapListFrom(
+          final jalview.schemabinding.version2.MapListFrom vMapListFrom)
+  {
+    boolean removed = _mapListFromList.remove(vMapListFrom);
+    return removed;
+  }
+
+  /**
+   * Method removeMapListFromAt.
+   * 
+   * @param index
+   * @return the element removed from the collection
+   */
+  public jalview.schemabinding.version2.MapListFrom removeMapListFromAt(
+          final int index)
+  {
+    java.lang.Object obj = this._mapListFromList.remove(index);
+    return (jalview.schemabinding.version2.MapListFrom) obj;
+  }
+
+  /**
+   * Method removeMapListTo.
+   * 
+   * @param vMapListTo
+   * @return true if the object was removed from the collection.
+   */
+  public boolean removeMapListTo(
+          final jalview.schemabinding.version2.MapListTo vMapListTo)
+  {
+    boolean removed = _mapListToList.remove(vMapListTo);
+    return removed;
+  }
+
+  /**
+   * Method removeMapListToAt.
+   * 
+   * @param index
+   * @return the element removed from the collection
+   */
+  public jalview.schemabinding.version2.MapListTo removeMapListToAt(
+          final int index)
+  {
+    java.lang.Object obj = this._mapListToList.remove(index);
+    return (jalview.schemabinding.version2.MapListTo) obj;
+  }
+
+  /**
+   * Sets the value of field 'mapFromUnit'. The field 'mapFromUnit' has the
+   * following description: number of dictionary symbol widths involved in each
+   * mapped position on this sequence (for example, 3 for a dna sequence exon
+   * region that is being mapped to a protein sequence). This is optional, since
+   * the unit can be usually be inferred from the dictionary type of each
+   * sequence involved in the mapping.
+   * 
+   * @param mapFromUnit
+   *          the value of field 'mapFromUnit'.
+   */
+  public void setMapFromUnit(final long mapFromUnit)
+  {
+    this._mapFromUnit = mapFromUnit;
+    this._has_mapFromUnit = true;
+  }
+
+  /**
+   * 
+   * 
+   * @param index
+   * @param vMapListFrom
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   */
+  public void setMapListFrom(final int index,
+          final jalview.schemabinding.version2.MapListFrom vMapListFrom)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    // check bounds for index
+    if (index < 0 || index >= this._mapListFromList.size())
+    {
+      throw new IndexOutOfBoundsException("setMapListFrom: Index value '"
+              + index + "' not in range [0.."
+              + (this._mapListFromList.size() - 1) + "]");
+    }
+
+    this._mapListFromList.set(index, vMapListFrom);
+  }
+
+  /**
+   * 
+   * 
+   * @param vMapListFromArray
+   */
+  public void setMapListFrom(
+          final jalview.schemabinding.version2.MapListFrom[] vMapListFromArray)
+  {
+    // -- copy array
+    _mapListFromList.clear();
+
+    for (int i = 0; i < vMapListFromArray.length; i++)
+    {
+      this._mapListFromList.add(vMapListFromArray[i]);
+    }
+  }
+
+  /**
+   * 
+   * 
+   * @param index
+   * @param vMapListTo
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   */
+  public void setMapListTo(final int index,
+          final jalview.schemabinding.version2.MapListTo vMapListTo)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    // check bounds for index
+    if (index < 0 || index >= this._mapListToList.size())
+    {
+      throw new IndexOutOfBoundsException("setMapListTo: Index value '"
+              + index + "' not in range [0.."
+              + (this._mapListToList.size() - 1) + "]");
+    }
+
+    this._mapListToList.set(index, vMapListTo);
+  }
+
+  /**
+   * 
+   * 
+   * @param vMapListToArray
+   */
+  public void setMapListTo(
+          final jalview.schemabinding.version2.MapListTo[] vMapListToArray)
+  {
+    // -- copy array
+    _mapListToList.clear();
+
+    for (int i = 0; i < vMapListToArray.length; i++)
+    {
+      this._mapListToList.add(vMapListToArray[i]);
+    }
+  }
+
+  /**
+   * Sets the value of field 'mapToUnit'. The field 'mapToUnit' has the
+   * following description: number of dictionary symbol widths involved in each
+   * mapped position on this sequence (for example, 3 for a dna sequence exon
+   * region that is being mapped to a protein sequence). This is optional, since
+   * the unit can be usually be inferred from the dictionary type of each
+   * sequence involved in the mapping.
+   * 
+   * @param mapToUnit
+   *          the value of field 'mapToUnit'.
+   */
+  public void setMapToUnit(final long mapToUnit)
+  {
+    this._mapToUnit = mapToUnit;
+    this._has_mapToUnit = true;
+  }
+
+  /**
+   * Method unmarshal.
+   * 
+   * @param reader
+   * @throws org.exolab.castor.xml.MarshalException
+   *           if object is null or if any SAXException is thrown during
+   *           marshaling
+   * @throws org.exolab.castor.xml.ValidationException
+   *           if this object is an invalid instance according to the schema
+   * @return the unmarshaled jalview.schemabinding.version2.MapListType
+   */
+  public static jalview.schemabinding.version2.MapListType unmarshal(
+          final java.io.Reader reader)
+          throws org.exolab.castor.xml.MarshalException,
+          org.exolab.castor.xml.ValidationException
+  {
+    return (jalview.schemabinding.version2.MapListType) Unmarshaller
+            .unmarshal(jalview.schemabinding.version2.MapListType.class,
+                    reader);
+  }
+
+  /**
+   * 
+   * 
+   * @throws org.exolab.castor.xml.ValidationException
+   *           if this object is an invalid instance according to the schema
+   */
+  public void validate() throws org.exolab.castor.xml.ValidationException
+  {
+    org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+    validator.validate(this);
+  }
+
+}