JAL-3035 more dedasification
[jalview.git] / src / jalview / schemabinding / version2 / Annotation.java
index 0741387..2fead37 100644 (file)
@@ -1,31 +1,16 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * 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 jalview.util.MessageManager;
-
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -214,6 +199,11 @@ public class Annotation implements java.io.Serializable
    */
   private jalview.schemabinding.version2.ThresholdLine _thresholdLine;
 
+  /**
+   * Field _propertyList.
+   */
+  private java.util.Vector _propertyList;
+
   // ----------------/
   // - Constructors -/
   // ----------------/
@@ -222,6 +212,7 @@ public class Annotation implements java.io.Serializable
   {
     super();
     this._annotationElementList = new java.util.Vector();
+    this._propertyList = new java.util.Vector();
   }
 
   // -----------/
@@ -259,6 +250,35 @@ public class Annotation implements java.io.Serializable
   }
 
   /**
+   * 
+   * 
+   * @param vProperty
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   */
+  public void addProperty(
+          final jalview.schemabinding.version2.Property vProperty)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    this._propertyList.addElement(vProperty);
+  }
+
+  /**
+   * 
+   * 
+   * @param index
+   * @param vProperty
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   */
+  public void addProperty(final int index,
+          final jalview.schemabinding.version2.Property vProperty)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    this._propertyList.add(index, vProperty);
+  }
+
+  /**
      */
   public void deleteAutoCalculated()
   {
@@ -361,6 +381,17 @@ public class Annotation implements java.io.Serializable
   }
 
   /**
+   * Method enumerateProperty.
+   * 
+   * @return an Enumeration over all jalview.schemabinding.version2.Property
+   *         elements
+   */
+  public java.util.Enumeration enumerateProperty()
+  {
+    return this._propertyList.elements();
+  }
+
+  /**
    * Method getAnnotationElement.
    * 
    * @param index
@@ -375,11 +406,10 @@ public class Annotation implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._annotationElementList.size())
     {
-        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
-                         "getAnnotationElement",
-                         Integer.valueOf(index).toString(),
-                         Integer.valueOf((this._annotationElementList.size() - 1)).toString()
-          })); 
+      throw new IndexOutOfBoundsException(
+              "getAnnotationElement: Index value '" + index
+                      + "' not in range [0.."
+                      + (this._annotationElementList.size() - 1) + "]");
     }
 
     return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList
@@ -553,6 +583,56 @@ public class Annotation implements java.io.Serializable
   }
 
   /**
+   * Method getProperty.
+   * 
+   * @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.Property at the
+   *         given index
+   */
+  public jalview.schemabinding.version2.Property getProperty(final int index)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    // check bounds for index
+    if (index < 0 || index >= this._propertyList.size())
+    {
+      throw new IndexOutOfBoundsException("getProperty: Index value '"
+              + index + "' not in range [0.."
+              + (this._propertyList.size() - 1) + "]");
+    }
+
+    return (jalview.schemabinding.version2.Property) _propertyList
+            .get(index);
+  }
+
+  /**
+   * Method getProperty.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.Property[] getProperty()
+  {
+    jalview.schemabinding.version2.Property[] array = new jalview.schemabinding.version2.Property[0];
+    return (jalview.schemabinding.version2.Property[]) this._propertyList
+            .toArray(array);
+  }
+
+  /**
+   * Method getPropertyCount.
+   * 
+   * @return the size of this collection
+   */
+  public int getPropertyCount()
+  {
+    return this._propertyList.size();
+  }
+
+  /**
    * Returns the value of field 'scaleColLabels'.
    * 
    * @return the value of field 'ScaleColLabels'.
@@ -897,6 +977,13 @@ public class Annotation implements java.io.Serializable
   }
 
   /**
+     */
+  public void removeAllProperty()
+  {
+    this._propertyList.clear();
+  }
+
+  /**
    * Method removeAnnotationElement.
    * 
    * @param vAnnotationElement
@@ -923,6 +1010,32 @@ public class Annotation implements java.io.Serializable
   }
 
   /**
+   * Method removeProperty.
+   * 
+   * @param vProperty
+   * @return true if the object was removed from the collection.
+   */
+  public boolean removeProperty(
+          final jalview.schemabinding.version2.Property vProperty)
+  {
+    boolean removed = _propertyList.remove(vProperty);
+    return removed;
+  }
+
+  /**
+   * Method removePropertyAt.
+   * 
+   * @param index
+   * @return the element removed from the collection
+   */
+  public jalview.schemabinding.version2.Property removePropertyAt(
+          final int index)
+  {
+    java.lang.Object obj = this._propertyList.remove(index);
+    return (jalview.schemabinding.version2.Property) obj;
+  }
+
+  /**
    * 
    * 
    * @param index
@@ -938,11 +1051,10 @@ public class Annotation implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._annotationElementList.size())
     {
-        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
-                 "setAnnotationElement",
-                 Integer.valueOf(index).toString(),
-                 Integer.valueOf((this._annotationElementList.size() - 1)).toString()
-        })); 
+      throw new IndexOutOfBoundsException(
+              "setAnnotationElement: Index value '" + index
+                      + "' not in range [0.."
+                      + (this._annotationElementList.size() - 1) + "]");
     }
 
     this._annotationElementList.set(index, vAnnotationElement);
@@ -1126,6 +1238,46 @@ public class Annotation implements java.io.Serializable
   }
 
   /**
+   * 
+   * 
+   * @param index
+   * @param vProperty
+   * @throws java.lang.IndexOutOfBoundsException
+   *           if the index given is outside the bounds of the collection
+   */
+  public void setProperty(final int index,
+          final jalview.schemabinding.version2.Property vProperty)
+          throws java.lang.IndexOutOfBoundsException
+  {
+    // check bounds for index
+    if (index < 0 || index >= this._propertyList.size())
+    {
+      throw new IndexOutOfBoundsException("setProperty: Index value '"
+              + index + "' not in range [0.."
+              + (this._propertyList.size() - 1) + "]");
+    }
+
+    this._propertyList.set(index, vProperty);
+  }
+
+  /**
+   * 
+   * 
+   * @param vPropertyArray
+   */
+  public void setProperty(
+          final jalview.schemabinding.version2.Property[] vPropertyArray)
+  {
+    // -- copy array
+    _propertyList.clear();
+
+    for (int i = 0; i < vPropertyArray.length; i++)
+    {
+      this._propertyList.add(vPropertyArray[i]);
+    }
+  }
+
+  /**
    * Sets the value of field 'scaleColLabels'.
    * 
    * @param scaleColLabels