update author list in license for (JAL-826)
[jalview.git] / src / jalview / schemabinding / version2 / MapListType.java
index 696df36..1afc99f 100644 (file)
-/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
- * \r
- * This file is part of Jalview.\r
- * \r
- * Jalview 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 3 of the License, or (at your option) any later version.\r
- * \r
- * Jalview is distributed in the hope that it will be useful, but \r
- * WITHOUT ANY WARRANTY; without even the implied warranty \r
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR \r
- * PURPOSE.  See the GNU General Public License for more details.\r
- * \r
- * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.\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 mapped position on this\r
-   * sequence (for example, 3 for a dna sequence exon region that is being\r
-   * mapped to a protein sequence). This is optional, since the unit can be\r
-   * usually be inferred from the dictionary type of each sequence involved in\r
-   * 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 mapped position on this\r
-   * sequence (for example, 3 for a dna sequence exon region that is being\r
-   * mapped to a protein sequence). This is optional, since the unit can be\r
-   * usually be inferred from the dictionary type of each sequence involved in\r
-   * 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
-  // - Constructors -/\r
-  // ----------------/\r
-\r
-  public MapListType()\r
-  {\r
-    super();\r
-    this._mapListFromList = new java.util.Vector();\r
-    this._mapListToList = new java.util.Vector();\r
-  }\r
-\r
-  // -----------/\r
-  // - Methods -/\r
-  // -----------/\r
-\r
-  /**\r
-   * \r
-   * \r
-   * @param vMapListFrom\r
-   * @throws java.lang.IndexOutOfBoundsException\r
-   *           if the index 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
-  {\r
-    this._mapListFromList.addElement(vMapListFrom);\r
-  }\r
-\r
-  /**\r
-   * \r
-   * \r
-   * @param index\r
-   * @param vMapListFrom\r
-   * @throws java.lang.IndexOutOfBoundsException\r
-   *           if the index given is outside the bounds of the collection\r
-   */\r
-  public void addMapListFrom(final int index,\r
-          final jalview.schemabinding.version2.MapListFrom vMapListFrom)\r
-          throws java.lang.IndexOutOfBoundsException\r
-  {\r
-    this._mapListFromList.add(index, vMapListFrom);\r
-  }\r
-\r
-  /**\r
-   * \r
-   * \r
-   * @param vMapListTo\r
-   * @throws java.lang.IndexOutOfBoundsException\r
-   *           if the index 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
-  {\r
-    this._mapListToList.addElement(vMapListTo);\r
-  }\r
-\r
-  /**\r
-   * \r
-   * \r
-   * @param index\r
-   * @param vMapListTo\r
-   * @throws java.lang.IndexOutOfBoundsException\r
-   *           if the index given is outside the bounds of the collection\r
-   */\r
-  public void addMapListTo(final int index,\r
-          final jalview.schemabinding.version2.MapListTo vMapListTo)\r
-          throws java.lang.IndexOutOfBoundsException\r
-  {\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 jalview.schemabinding.version2.MapListFrom\r
-   *         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 jalview.schemabinding.version2.MapListTo\r
-   *         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 'mapFromUnit' has the\r
-   * following description: number of dictionary symbol widths involved in each\r
-   * mapped position on this sequence (for example, 3 for a dna sequence exon\r
-   * region that is being mapped to a protein sequence). This is optional, since\r
-   * the unit can be usually be inferred from the dictionary type of each\r
-   * 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\r
-   *           if the index given is outside the bounds of the collection\r
-   * @return the value of the jalview.schemabinding.version2.MapListFrom at the\r
-   *         given index\r
-   */\r
-  public jalview.schemabinding.version2.MapListFrom getMapListFrom(\r
-          final int index) throws java.lang.IndexOutOfBoundsException\r
-  {\r
-    // check bounds for index\r
-    if (index < 0 || index >= this._mapListFromList.size())\r
-    {\r
-      throw new IndexOutOfBoundsException("getMapListFrom: Index value '"\r
-              + index + "' not in range [0.."\r
-              + (this._mapListFromList.size() - 1) + "]");\r
-    }\r
-\r
-    return (jalview.schemabinding.version2.MapListFrom) _mapListFromList\r
-            .get(index);\r
-  }\r
-\r
-  /**\r
-   * Method getMapListFrom.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.MapListFrom[] getMapListFrom()\r
-  {\r
-    jalview.schemabinding.version2.MapListFrom[] array = new jalview.schemabinding.version2.MapListFrom[0];\r
-    return (jalview.schemabinding.version2.MapListFrom[]) this._mapListFromList\r
-            .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\r
-   *           if the index given is outside the bounds of the collection\r
-   * @return the value of the jalview.schemabinding.version2.MapListTo at the\r
-   *         given index\r
-   */\r
-  public jalview.schemabinding.version2.MapListTo getMapListTo(\r
-          final int index) throws java.lang.IndexOutOfBoundsException\r
-  {\r
-    // check bounds for index\r
-    if (index < 0 || index >= this._mapListToList.size())\r
-    {\r
-      throw new IndexOutOfBoundsException("getMapListTo: Index value '"\r
-              + index + "' not in range [0.."\r
-              + (this._mapListToList.size() - 1) + "]");\r
-    }\r
-\r
-    return (jalview.schemabinding.version2.MapListTo) _mapListToList\r
-            .get(index);\r
-  }\r
-\r
-  /**\r
-   * Method getMapListTo.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.MapListTo[] getMapListTo()\r
-  {\r
-    jalview.schemabinding.version2.MapListTo[] array = new jalview.schemabinding.version2.MapListTo[0];\r
-    return (jalview.schemabinding.version2.MapListTo[]) this._mapListToList\r
-            .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 'mapToUnit' has the\r
-   * following description: number of dictionary symbol widths involved in each\r
-   * mapped position on this sequence (for example, 3 for a dna sequence exon\r
-   * region that is being mapped to a protein sequence). This is optional, since\r
-   * the unit can be usually be inferred from the dictionary type of each\r
-   * 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
-    {\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 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 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 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
-  {\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
-  {\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
-  {\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
-  {\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 'mapFromUnit' has the\r
-   * following description: number of dictionary symbol widths involved in each\r
-   * mapped position on this sequence (for example, 3 for a dna sequence exon\r
-   * region that is being mapped to a protein sequence). This is optional, since\r
-   * the unit can be usually be inferred from the dictionary type of each\r
-   * sequence involved in the mapping.\r
-   * \r
-   * @param mapFromUnit\r
-   *          the value of field 'mapFromUnit'.\r
-   */\r
-  public void setMapFromUnit(final long mapFromUnit)\r
-  {\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\r
-   *           if the index given is outside the bounds of the collection\r
-   */\r
-  public void setMapListFrom(final int index,\r
-          final jalview.schemabinding.version2.MapListFrom vMapListFrom)\r
-          throws java.lang.IndexOutOfBoundsException\r
-  {\r
-    // check bounds for index\r
-    if (index < 0 || index >= this._mapListFromList.size())\r
-    {\r
-      throw new IndexOutOfBoundsException("setMapListFrom: Index value '"\r
-              + index + "' not in range [0.."\r
-              + (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
-  {\r
-    // -- copy array\r
-    _mapListFromList.clear();\r
-\r
-    for (int i = 0; i < vMapListFromArray.length; i++)\r
-    {\r
-      this._mapListFromList.add(vMapListFromArray[i]);\r
-    }\r
-  }\r
-\r
-  /**\r
-   * \r
-   * \r
-   * @param index\r
-   * @param vMapListTo\r
-   * @throws java.lang.IndexOutOfBoundsException\r
-   *           if the index given is outside the bounds of the collection\r
-   */\r
-  public void setMapListTo(final int index,\r
-          final jalview.schemabinding.version2.MapListTo vMapListTo)\r
-          throws java.lang.IndexOutOfBoundsException\r
-  {\r
-    // check bounds for index\r
-    if (index < 0 || index >= this._mapListToList.size())\r
-    {\r
-      throw new IndexOutOfBoundsException("setMapListTo: Index value '"\r
-              + index + "' not in range [0.."\r
-              + (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
-  {\r
-    // -- copy array\r
-    _mapListToList.clear();\r
-\r
-    for (int i = 0; i < vMapListToArray.length; i++)\r
-    {\r
-      this._mapListToList.add(vMapListToArray[i]);\r
-    }\r
-  }\r
-\r
-  /**\r
-   * Sets the value of field 'mapToUnit'. The field 'mapToUnit' has the\r
-   * following description: number of dictionary symbol widths involved in each\r
-   * mapped position on this sequence (for example, 3 for a dna sequence exon\r
-   * region that is being mapped to a protein sequence). This is optional, since\r
-   * the unit can be usually be inferred from the dictionary type of each\r
-   * sequence involved in the mapping.\r
-   * \r
-   * @param mapToUnit\r
-   *          the value of field 'mapToUnit'.\r
-   */\r
-  public void setMapToUnit(final long mapToUnit)\r
-  {\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\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 schema\r
-   * @return the unmarshaled 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,\r
-          org.exolab.castor.xml.ValidationException\r
-  {\r
-    return (jalview.schemabinding.version2.MapListType) Unmarshaller\r
-            .unmarshal(jalview.schemabinding.version2.MapListType.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 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
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
+ *
+ * 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/>.
+ *******************************************************************************/
+/*
+ * 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);
+    }
+
+}