-/*\r
- * This class was automatically generated with\r
- * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
- * Schema.\r
- * $Id$\r
- */\r
-/*\r
-* Jalview - A Sequence Alignment Editor and Viewer\r
-* Copyright (C) 2005 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.binding;\r
-\r
-import org.exolab.castor.xml.MarshalException;\r
-import org.exolab.castor.xml.Marshaller;\r
-import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-\r
-import org.xml.sax.ContentHandler;\r
-\r
-//---------------------------------/\r
-//- Imported classes and packages -/\r
-//---------------------------------/\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-\r
-import java.util.Enumeration;\r
-import java.util.Vector;\r
-\r
-\r
-/**\r
- * Class SequenceSet.\r
- *\r
- * @version $Revision$ $Date$\r
- */\r
-public class SequenceSet implements java.io.Serializable {\r
- //--------------------------/\r
- //- Class/Member Variables -/\r
- //--------------------------/\r
-\r
- /**\r
- * Field _gapChar\r
- */\r
- private java.lang.String _gapChar;\r
-\r
- /**\r
- * Field _aligned\r
- */\r
- private boolean _aligned;\r
-\r
- /**\r
- * keeps track of state for field: _aligned\r
- */\r
- private boolean _has_aligned;\r
-\r
- /**\r
- * Field _sequenceList\r
- */\r
- private java.util.Vector _sequenceList;\r
-\r
- /**\r
- * Field _annotationList\r
- */\r
- private java.util.Vector _annotationList;\r
-\r
- //----------------/\r
- //- Constructors -/\r
- //----------------/\r
- public SequenceSet() {\r
- super();\r
- _sequenceList = new Vector();\r
- _annotationList = new Vector();\r
- }\r
- //-- jalview.binding.SequenceSet()\r
- //-----------/\r
-\r
- public void addAnnotation(jalview.binding.Annotation vAnnotation)\r
- throws java.lang.IndexOutOfBoundsException {\r
- _annotationList.addElement(vAnnotation);\r
- }\r
- //-- void addAnnotation(jalview.binding.Annotation)\r
-\r
- /**\r
- * Method addAnnotation\r
- *\r
- *\r
- *\r
- * @param index\r
- * @param vAnnotation\r
- */\r
- public void addAnnotation(int index, jalview.binding.Annotation vAnnotation)\r
- throws java.lang.IndexOutOfBoundsException {\r
- _annotationList.insertElementAt(vAnnotation, index);\r
- }\r
- //-- void addAnnotation(int, jalview.binding.Annotation)\r
-\r
- /**\r
- * Method addSequence\r
- *\r
- *\r
- *\r
- * @param vSequence\r
- */\r
- public void addSequence(jalview.binding.Sequence vSequence)\r
- throws java.lang.IndexOutOfBoundsException {\r
- _sequenceList.addElement(vSequence);\r
- }\r
- //-- void addSequence(jalview.binding.Sequence)\r
-\r
- /**\r
- * Method addSequence\r
- *\r
- *\r
- *\r
- * @param index\r
- * @param vSequence\r
- */\r
- public void addSequence(int index, jalview.binding.Sequence vSequence)\r
- throws java.lang.IndexOutOfBoundsException {\r
- _sequenceList.insertElementAt(vSequence, index);\r
- }\r
- //-- void addSequence(int, jalview.binding.Sequence)\r
-\r
- /**\r
- * Method deleteAligned\r
- *\r
- */\r
- public void deleteAligned() {\r
- this._has_aligned = false;\r
- }\r
- //-- void deleteAligned()\r
-\r
- /**\r
- * Method enumerateAnnotation\r
- *\r
- *\r
- *\r
- * @return Enumeration\r
- */\r
- public java.util.Enumeration enumerateAnnotation() {\r
- return _annotationList.elements();\r
- }\r
- //-- java.util.Enumeration enumerateAnnotation()\r
-\r
- /**\r
- * Method enumerateSequence\r
- *\r
- *\r
- *\r
- * @return Enumeration\r
- */\r
- public java.util.Enumeration enumerateSequence() {\r
- return _sequenceList.elements();\r
- }\r
- //-- java.util.Enumeration enumerateSequence()\r
-\r
- /**\r
- * Returns the value of field 'aligned'.\r
- *\r
- * @return boolean\r
- * @return the value of field 'aligned'.\r
- */\r
- public boolean getAligned() {\r
- return this._aligned;\r
- }\r
- //-- boolean getAligned()\r
-\r
- /**\r
- * Method getAnnotation\r
- *\r
- *\r
- *\r
- * @param index\r
- * @return Annotation\r
- */\r
- public jalview.binding.Annotation getAnnotation(int index)\r
- throws java.lang.IndexOutOfBoundsException {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _annotationList.size())) {\r
- throw new IndexOutOfBoundsException();\r
- }\r
-\r
- return (jalview.binding.Annotation) _annotationList.elementAt(index);\r
- }\r
- //-- jalview.binding.Annotation getAnnotation(int)\r
-\r
- /**\r
- * Method getAnnotation\r
- *\r
- *\r
- *\r
- * @return Annotation\r
- */\r
- public jalview.binding.Annotation[] getAnnotation() {\r
- int size = _annotationList.size();\r
- jalview.binding.Annotation[] mArray = new jalview.binding.Annotation[size];\r
-\r
- for (int index = 0; index < size; index++) {\r
- mArray[index] = (jalview.binding.Annotation) _annotationList.elementAt(index);\r
- }\r
-\r
- return mArray;\r
- }\r
- //-- jalview.binding.Annotation[] getAnnotation()\r
-\r
- /**\r
- * Method getAnnotationCount\r
- *\r
- *\r
- *\r
- * @return int\r
- */\r
- public int getAnnotationCount() {\r
- return _annotationList.size();\r
- }\r
- //-- int getAnnotationCount()\r
-\r
- /**\r
- * Returns the value of field 'gapChar'.\r
- *\r
- * @return String\r
- * @return the value of field 'gapChar'.\r
- */\r
- public java.lang.String getGapChar() {\r
- return this._gapChar;\r
- }\r
- //-- java.lang.String getGapChar()\r
-\r
- /**\r
- * Method getSequence\r
- *\r
- *\r
- *\r
- * @param index\r
- * @return Sequence\r
- */\r
- public jalview.binding.Sequence getSequence(int index)\r
- throws java.lang.IndexOutOfBoundsException {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _sequenceList.size())) {\r
- throw new IndexOutOfBoundsException();\r
- }\r
-\r
- return (jalview.binding.Sequence) _sequenceList.elementAt(index);\r
- }\r
- //-- jalview.binding.Sequence getSequence(int)\r
-\r
- /**\r
- * Method getSequence\r
- *\r
- *\r
- *\r
- * @return Sequence\r
- */\r
- public jalview.binding.Sequence[] getSequence() {\r
- int size = _sequenceList.size();\r
- jalview.binding.Sequence[] mArray = new jalview.binding.Sequence[size];\r
-\r
- for (int index = 0; index < size; index++) {\r
- mArray[index] = (jalview.binding.Sequence) _sequenceList.elementAt(index);\r
- }\r
-\r
- return mArray;\r
- }\r
- //-- jalview.binding.Sequence[] getSequence()\r
-\r
- /**\r
- * Method getSequenceCount\r
- *\r
- *\r
- *\r
- * @return int\r
- */\r
- public int getSequenceCount() {\r
- return _sequenceList.size();\r
- }\r
- //-- int getSequenceCount()\r
-\r
- /**\r
- * Method hasAligned\r
- *\r
- *\r
- *\r
- * @return boolean\r
- */\r
- public boolean hasAligned() {\r
- return this._has_aligned;\r
- }\r
- //-- boolean hasAligned()\r
-\r
- /**\r
- * Method isValid\r
- *\r
- *\r
- *\r
- * @return boolean\r
- */\r
- public boolean isValid() {\r
- try {\r
- validate();\r
- } catch (org.exolab.castor.xml.ValidationException vex) {\r
- return false;\r
- }\r
-\r
- return true;\r
- }\r
- //-- boolean isValid()\r
-\r
- /**\r
- * Method marshal\r
- *\r
- *\r
- *\r
- * @param out\r
- */\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, \r
- org.exolab.castor.xml.ValidationException {\r
- Marshaller.marshal(this, out);\r
- }\r
- //-- void marshal(java.io.Writer)\r
-\r
- /**\r
- * Method marshal\r
- *\r
- *\r
- *\r
- * @param handler\r
- */\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, \r
- org.exolab.castor.xml.ValidationException {\r
- Marshaller.marshal(this, handler);\r
- }\r
- //-- void marshal(org.xml.sax.ContentHandler)\r
-\r
- /**\r
- * Method removeAllAnnotation\r
- *\r
- */\r
- public void removeAllAnnotation() {\r
- _annotationList.removeAllElements();\r
- }\r
- //-- void removeAllAnnotation()\r
-\r
- /**\r
- * Method removeAllSequence\r
- *\r
- */\r
- public void removeAllSequence() {\r
- _sequenceList.removeAllElements();\r
- }\r
- //-- void removeAllSequence()\r
-\r
- /**\r
- * Method removeAnnotation\r
- *\r
- *\r
- *\r
- * @param index\r
- * @return Annotation\r
- */\r
- public jalview.binding.Annotation removeAnnotation(int index) {\r
- java.lang.Object obj = _annotationList.elementAt(index);\r
- _annotationList.removeElementAt(index);\r
-\r
- return (jalview.binding.Annotation) obj;\r
- }\r
- //-- jalview.binding.Annotation removeAnnotation(int)\r
-\r
- /**\r
- * Method removeSequence\r
- *\r
- *\r
- *\r
- * @param index\r
- * @return Sequence\r
- */\r
- public jalview.binding.Sequence removeSequence(int index) {\r
- java.lang.Object obj = _sequenceList.elementAt(index);\r
- _sequenceList.removeElementAt(index);\r
-\r
- return (jalview.binding.Sequence) obj;\r
- }\r
- //-- jalview.binding.Sequence removeSequence(int)\r
-\r
- /**\r
- * Sets the value of field 'aligned'.\r
- *\r
- * @param aligned the value of field 'aligned'.\r
- */\r
- public void setAligned(boolean aligned) {\r
- this._aligned = aligned;\r
- this._has_aligned = true;\r
- }\r
- //-- void setAligned(boolean)\r
-\r
- /**\r
- * Method setAnnotation\r
- *\r
- *\r
- *\r
- * @param index\r
- * @param vAnnotation\r
- */\r
- public void setAnnotation(int index, jalview.binding.Annotation vAnnotation)\r
- throws java.lang.IndexOutOfBoundsException {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _annotationList.size())) {\r
- throw new IndexOutOfBoundsException();\r
- }\r
-\r
- _annotationList.setElementAt(vAnnotation, index);\r
- }\r
- //-- void setAnnotation(int, jalview.binding.Annotation)\r
-\r
- /**\r
- * Method setAnnotation\r
- *\r
- *\r
- *\r
- * @param annotationArray\r
- */\r
- public void setAnnotation(jalview.binding.Annotation[] annotationArray) {\r
- //-- copy array\r
- _annotationList.removeAllElements();\r
-\r
- for (int i = 0; i < annotationArray.length; i++) {\r
- _annotationList.addElement(annotationArray[i]);\r
- }\r
- }\r
- //-- void setAnnotation(jalview.binding.Annotation)\r
-\r
- /**\r
- * Sets the value of field 'gapChar'.\r
- *\r
- * @param gapChar the value of field 'gapChar'.\r
- */\r
- public void setGapChar(java.lang.String gapChar) {\r
- this._gapChar = gapChar;\r
- }\r
- //-- void setGapChar(java.lang.String)\r
-\r
- /**\r
- * Method setSequence\r
- *\r
- *\r
- *\r
- * @param index\r
- * @param vSequence\r
- */\r
- public void setSequence(int index, jalview.binding.Sequence vSequence)\r
- throws java.lang.IndexOutOfBoundsException {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _sequenceList.size())) {\r
- throw new IndexOutOfBoundsException();\r
- }\r
-\r
- _sequenceList.setElementAt(vSequence, index);\r
- }\r
- //-- void setSequence(int, jalview.binding.Sequence)\r
-\r
- /**\r
- * Method setSequence\r
- *\r
- *\r
- *\r
- * @param sequenceArray\r
- */\r
- public void setSequence(jalview.binding.Sequence[] sequenceArray) {\r
- //-- copy array\r
- _sequenceList.removeAllElements();\r
-\r
- for (int i = 0; i < sequenceArray.length; i++) {\r
- _sequenceList.addElement(sequenceArray[i]);\r
- }\r
- }\r
- //-- void setSequence(jalview.binding.Sequence)\r
-\r
- /**\r
- * Method unmarshal\r
- *\r
- *\r
- *\r
- * @param reader\r
- * @return Object\r
- */\r
- public static java.lang.Object unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, \r
- org.exolab.castor.xml.ValidationException {\r
- return (jalview.binding.SequenceSet) Unmarshaller.unmarshal(jalview.binding.SequenceSet.class,\r
- reader);\r
- }\r
- //-- java.lang.Object unmarshal(java.io.Reader)\r
-\r
- /**\r
- * Method validate\r
- *\r
- */\r
- public void validate() 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
- //-- void validate()\r
-}\r
+/*
+ * This class was automatically generated with
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+ * Schema.
+ * $Id$
+ */
+
+package jalview.binding;
+
+ //---------------------------------/
+ //- Imported classes and packages -/
+//---------------------------------/
+
+import org.exolab.castor.xml.Marshaller;
+import org.exolab.castor.xml.Unmarshaller;
+
+/**
+ * Class SequenceSet.
+ *
+ * @version $Revision$ $Date$
+ */
+public class SequenceSet implements java.io.Serializable {
+
+
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _gapChar.
+ */
+ private java.lang.String _gapChar;
+
+ /**
+ * Field _aligned.
+ */
+ private boolean _aligned;
+
+ /**
+ * keeps track of state for field: _aligned
+ */
+ private boolean _has_aligned;
+
+ /**
+ * Field _sequenceList.
+ */
+ private java.util.Vector _sequenceList;
+
+ /**
+ * Field _annotationList.
+ */
+ private java.util.Vector _annotationList;
+
+
+ //----------------/
+ //- Constructors -/
+ //----------------/
+
+ public SequenceSet() {
+ super();
+ this._sequenceList = new java.util.Vector();
+ this._annotationList = new java.util.Vector();
+ }
+
+
+ //-----------/
+ //- Methods -/
+ //-----------/
+
+ /**
+ *
+ *
+ * @param vAnnotation
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addAnnotation(
+ final jalview.binding.Annotation vAnnotation)
+ throws java.lang.IndexOutOfBoundsException {
+ this._annotationList.addElement(vAnnotation);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotation
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addAnnotation(
+ final int index,
+ final jalview.binding.Annotation vAnnotation)
+ throws java.lang.IndexOutOfBoundsException {
+ this._annotationList.add(index, vAnnotation);
+ }
+
+ /**
+ *
+ *
+ * @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSequence(
+ final jalview.binding.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException {
+ this._sequenceList.addElement(vSequence);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSequence(
+ final int index,
+ final jalview.binding.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException {
+ this._sequenceList.add(index, vSequence);
+ }
+
+ /**
+ */
+ public void deleteAligned(
+ ) {
+ this._has_aligned= false;
+ }
+
+ /**
+ * Method enumerateAnnotation.
+ *
+ * @return an Enumeration over all jalview.binding.Annotation
+ * elements
+ */
+ public java.util.Enumeration enumerateAnnotation(
+ ) {
+ return this._annotationList.elements();
+ }
+
+ /**
+ * Method enumerateSequence.
+ *
+ * @return an Enumeration over all jalview.binding.Sequence
+ * elements
+ */
+ public java.util.Enumeration enumerateSequence(
+ ) {
+ return this._sequenceList.elements();
+ }
+
+ /**
+ * Returns the value of field 'aligned'.
+ *
+ * @return the value of field 'Aligned'.
+ */
+ public boolean getAligned(
+ ) {
+ return this._aligned;
+ }
+
+ /**
+ * Method getAnnotation.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Annotation at the
+ * given index
+ */
+ public jalview.binding.Annotation getAnnotation(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._annotationList.size()) {
+ throw new IndexOutOfBoundsException("getAnnotation: Index value '" + index + "' not in range [0.." + (this._annotationList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.Annotation) _annotationList.get(index);
+ }
+
+ /**
+ * Method getAnnotation.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.binding.Annotation[] getAnnotation(
+ ) {
+ jalview.binding.Annotation[] array = new jalview.binding.Annotation[0];
+ return (jalview.binding.Annotation[]) this._annotationList.toArray(array);
+ }
+
+ /**
+ * Method getAnnotationCount.
+ *
+ * @return the size of this collection
+ */
+ public int getAnnotationCount(
+ ) {
+ return this._annotationList.size();
+ }
+
+ /**
+ * Returns the value of field 'gapChar'.
+ *
+ * @return the value of field 'GapChar'.
+ */
+ public java.lang.String getGapChar(
+ ) {
+ return this._gapChar;
+ }
+
+ /**
+ * Method getSequence.
+ *
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the jalview.binding.Sequence at the
+ * given index
+ */
+ public jalview.binding.Sequence getSequence(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._sequenceList.size()) {
+ throw new IndexOutOfBoundsException("getSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");
+ }
+
+ return (jalview.binding.Sequence) _sequenceList.get(index);
+ }
+
+ /**
+ * Method getSequence.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.binding.Sequence[] getSequence(
+ ) {
+ jalview.binding.Sequence[] array = new jalview.binding.Sequence[0];
+ return (jalview.binding.Sequence[]) this._sequenceList.toArray(array);
+ }
+
+ /**
+ * Method getSequenceCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSequenceCount(
+ ) {
+ return this._sequenceList.size();
+ }
+
+ /**
+ * Method hasAligned.
+ *
+ * @return true if at least one Aligned has been added
+ */
+ public boolean hasAligned(
+ ) {
+ return this._has_aligned;
+ }
+
+ /**
+ * Returns the value of field 'aligned'.
+ *
+ * @return the value of field 'Aligned'.
+ */
+ public boolean isAligned(
+ ) {
+ return this._aligned;
+ }
+
+ /**
+ * 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 removeAllAnnotation(
+ ) {
+ this._annotationList.clear();
+ }
+
+ /**
+ */
+ public void removeAllSequence(
+ ) {
+ this._sequenceList.clear();
+ }
+
+ /**
+ * Method removeAnnotation.
+ *
+ * @param vAnnotation
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAnnotation(
+ final jalview.binding.Annotation vAnnotation) {
+ boolean removed = _annotationList.remove(vAnnotation);
+ return removed;
+ }
+
+ /**
+ * Method removeAnnotationAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Annotation removeAnnotationAt(
+ final int index) {
+ java.lang.Object obj = this._annotationList.remove(index);
+ return (jalview.binding.Annotation) obj;
+ }
+
+ /**
+ * Method removeSequence.
+ *
+ * @param vSequence
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSequence(
+ final jalview.binding.Sequence vSequence) {
+ boolean removed = _sequenceList.remove(vSequence);
+ return removed;
+ }
+
+ /**
+ * Method removeSequenceAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public jalview.binding.Sequence removeSequenceAt(
+ final int index) {
+ java.lang.Object obj = this._sequenceList.remove(index);
+ return (jalview.binding.Sequence) obj;
+ }
+
+ /**
+ * Sets the value of field 'aligned'.
+ *
+ * @param aligned the value of field 'aligned'.
+ */
+ public void setAligned(
+ final boolean aligned) {
+ this._aligned = aligned;
+ this._has_aligned = true;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vAnnotation
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setAnnotation(
+ final int index,
+ final jalview.binding.Annotation vAnnotation)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._annotationList.size()) {
+ throw new IndexOutOfBoundsException("setAnnotation: Index value '" + index + "' not in range [0.." + (this._annotationList.size() - 1) + "]");
+ }
+
+ this._annotationList.set(index, vAnnotation);
+ }
+
+ /**
+ *
+ *
+ * @param vAnnotationArray
+ */
+ public void setAnnotation(
+ final jalview.binding.Annotation[] vAnnotationArray) {
+ //-- copy array
+ _annotationList.clear();
+
+ for (int i = 0; i < vAnnotationArray.length; i++) {
+ this._annotationList.add(vAnnotationArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of field 'gapChar'.
+ *
+ * @param gapChar the value of field 'gapChar'.
+ */
+ public void setGapChar(
+ final java.lang.String gapChar) {
+ this._gapChar = gapChar;
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setSequence(
+ final int index,
+ final jalview.binding.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._sequenceList.size()) {
+ throw new IndexOutOfBoundsException("setSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");
+ }
+
+ this._sequenceList.set(index, vSequence);
+ }
+
+ /**
+ *
+ *
+ * @param vSequenceArray
+ */
+ public void setSequence(
+ final jalview.binding.Sequence[] vSequenceArray) {
+ //-- copy array
+ _sequenceList.clear();
+
+ for (int i = 0; i < vSequenceArray.length; i++) {
+ this._sequenceList.add(vSequenceArray[i]);
+ }
+ }
+
+ /**
+ * 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.binding.SequenceSet
+ */
+ public static jalview.binding.SequenceSet unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (jalview.binding.SequenceSet) Unmarshaller.unmarshal(jalview.binding.SequenceSet.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);
+ }
+
+}