private boolean _has_graph;\r
\r
/**\r
+ * annotation is associated with a\r
+ * range on a particular group of alignment sequences\r
+ */\r
+ private java.util.Vector _seqrefs;\r
+\r
+ /**\r
* Field _provenance.\r
*/\r
private uk.ac.vamsas.objects.core.Provenance _provenance;\r
\r
public AlignmentAnnotation() {\r
super();\r
+ this._seqrefs = new java.util.Vector();\r
}\r
\r
\r
//-----------/\r
\r
/**\r
+ * \r
+ * \r
+ * @param vSeqrefs\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addSeqrefs(\r
+ final java.lang.Object vSeqrefs)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._seqrefs.addElement(vSeqrefs);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param index\r
+ * @param vSeqrefs\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addSeqrefs(\r
+ final int index,\r
+ final java.lang.Object vSeqrefs)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._seqrefs.add(index, vSeqrefs);\r
+ }\r
+\r
+ /**\r
*/\r
public void deleteGraph(\r
) {\r
}\r
\r
/**\r
+ * Method enumerateSeqrefs.\r
+ * \r
+ * @return an Enumeration over all java.lang.Object elements\r
+ */\r
+ public java.util.Enumeration enumerateSeqrefs(\r
+ ) {\r
+ return this._seqrefs.elements();\r
+ }\r
+\r
+ /**\r
* Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
return false;\r
if (this._has_graph != temp._has_graph)\r
return false;\r
+ if (this._seqrefs != null) {\r
+ if (temp._seqrefs == null) return false;\r
+ else if (!(this._seqrefs.equals(temp._seqrefs))) \r
+ return false;\r
+ }\r
+ else if (temp._seqrefs != null)\r
+ return false;\r
if (this._provenance != null) {\r
if (temp._provenance == null) return false;\r
else if (!(this._provenance.equals(temp._provenance))) \r
}\r
\r
/**\r
+ * Method getSeqrefs.\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 java.lang.Object at the given index\r
+ */\r
+ public java.lang.Object getSeqrefs(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._seqrefs.size()) {\r
+ throw new IndexOutOfBoundsException("getSeqrefs: Index value '" + index + "' not in range [0.." + (this._seqrefs.size() - 1) + "]");\r
+ }\r
+ \r
+ return _seqrefs.get(index);\r
+ }\r
+\r
+ /**\r
+ * Method getSeqrefs.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 java.lang.Object[] getSeqrefs(\r
+ ) {\r
+ java.lang.Object[] array = new java.lang.Object[0];\r
+ return (java.lang.Object[]) this._seqrefs.toArray(array);\r
+ }\r
+\r
+ /**\r
+ * Method getSeqrefsAsReference.Returns a reference to\r
+ * '_seqrefs'. No type checking is performed on any\r
+ * modifications to the Vector.\r
+ * \r
+ * @return a reference to the Vector backing this class\r
+ */\r
+ public java.util.Vector getSeqrefsAsReference(\r
+ ) {\r
+ return this._seqrefs;\r
+ }\r
+\r
+ /**\r
+ * Method getSeqrefsCount.\r
+ * \r
+ * @return the size of this collection\r
+ */\r
+ public int getSeqrefsCount(\r
+ ) {\r
+ return this._seqrefs.size();\r
+ }\r
+\r
+ /**\r
* Method hasGraph.\r
* \r
* @return true if at least one Graph has been added\r
\r
long tmp;\r
result = 37 * result + (_graph?0:1);\r
+ if (_seqrefs != null) {\r
+ result = 37 * result + _seqrefs.hashCode();\r
+ }\r
if (_provenance != null) {\r
result = 37 * result + _provenance.hashCode();\r
}\r
}\r
\r
/**\r
+ */\r
+ public void removeAllSeqrefs(\r
+ ) {\r
+ this._seqrefs.clear();\r
+ }\r
+\r
+ /**\r
+ * Method removeSeqrefs.\r
+ * \r
+ * @param vSeqrefs\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removeSeqrefs(\r
+ final java.lang.Object vSeqrefs) {\r
+ boolean removed = _seqrefs.remove(vSeqrefs);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removeSeqrefsAt.\r
+ * \r
+ * @param index\r
+ * @return the element removed from the collection\r
+ */\r
+ public java.lang.Object removeSeqrefsAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._seqrefs.remove(index);\r
+ return obj;\r
+ }\r
+\r
+ /**\r
* Sets the value of field 'graph'. The field 'graph' has the\r
* following description: TODO: decide if this flag is\r
* redundant - when true it would suggest that\r
}\r
\r
/**\r
+ * \r
+ * \r
+ * @param index\r
+ * @param vSeqrefs\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void setSeqrefs(\r
+ final int index,\r
+ final java.lang.Object vSeqrefs)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._seqrefs.size()) {\r
+ throw new IndexOutOfBoundsException("setSeqrefs: Index value '" + index + "' not in range [0.." + (this._seqrefs.size() - 1) + "]");\r
+ }\r
+ \r
+ this._seqrefs.set(index, vSeqrefs);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param vSeqrefsArray\r
+ */\r
+ public void setSeqrefs(\r
+ final java.lang.Object[] vSeqrefsArray) {\r
+ //-- copy array\r
+ _seqrefs.clear();\r
+ \r
+ for (int i = 0; i < vSeqrefsArray.length; i++) {\r
+ this._seqrefs.add(vSeqrefsArray[i]);\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_seqrefs' by copying the given Vector.\r
+ * All elements will be checked for type safety.\r
+ * \r
+ * @param vSeqrefsList the Vector to copy.\r
+ */\r
+ public void setSeqrefs(\r
+ final java.util.Vector vSeqrefsList) {\r
+ // copy vector\r
+ this._seqrefs.clear();\r
+ \r
+ this._seqrefs.addAll(vSeqrefsList);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_seqrefs' by setting it to the given\r
+ * Vector. No type checking is performed.\r
+ * @deprecated\r
+ * \r
+ * @param seqrefsVector the Vector to set.\r
+ */\r
+ public void setSeqrefsAsReference(\r
+ final java.util.Vector seqrefsVector) {\r
+ this._seqrefs = seqrefsVector;\r
+ }\r
+\r
+ /**\r
* Method unmarshal.\r
* \r
* @param reader\r