X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fschemabinding%2Fversion2%2FSequenceSet.java;h=0b98118e0bf3ff9d6406f7d3ed5be2534f5ad612;hb=7243db3d99cc1760c2d4802f3005b4f86d1b4bd6;hp=020cbb91ad57c9fe79f9096a3b345fd8d0f0e641;hpb=7bc226b58110fa26d9dbd3f0c78095d06909ffc3;p=jalview.git
diff --git a/src/jalview/schemabinding/version2/SequenceSet.java b/src/jalview/schemabinding/version2/SequenceSet.java
old mode 100755
new mode 100644
index 020cbb9..0b98118
--- a/src/jalview/schemabinding/version2/SequenceSet.java
+++ b/src/jalview/schemabinding/version2/SequenceSet.java
@@ -1,473 +1,824 @@
-/*
- * This class was automatically generated with
- * Castor 0.9.6, using an XML
- * Schema.
- * $Id$
- */
-
-package jalview.schemabinding.version2;
-
-//---------------------------------/
-//- Imported classes and packages -/
-//---------------------------------/
-
-import java.util.*;
-
-import org.exolab.castor.xml.*;
-
-/**
- * Class SequenceSet.
- *
- * @version $Revision$ $Date$
- */
-public class SequenceSet
- implements java.io.Serializable
-{
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field _gapChar
- */
- private java.lang.String _gapChar;
-
- /**
- * Field _sequenceList
- */
- private java.util.Vector _sequenceList;
-
- /**
- * Field _annotationList
- */
- private java.util.Vector _annotationList;
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public SequenceSet()
- {
- super();
- _sequenceList = new Vector();
- _annotationList = new Vector();
- } //-- jalview.schemabinding.version2.SequenceSet()
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Method addAnnotation
- *
- *
- *
- * @param vAnnotation
- */
- public void addAnnotation(jalview.schemabinding.version2.Annotation
- vAnnotation)
- throws java.lang.IndexOutOfBoundsException
- {
- _annotationList.addElement(vAnnotation);
- } //-- void addAnnotation(jalview.schemabinding.version2.Annotation)
-
- /**
- * Method addAnnotation
- *
- *
- *
- * @param index
- * @param vAnnotation
- */
- public void addAnnotation(int index,
- jalview.schemabinding.version2.Annotation
- vAnnotation)
- throws java.lang.IndexOutOfBoundsException
- {
- _annotationList.insertElementAt(vAnnotation, index);
- } //-- void addAnnotation(int, jalview.schemabinding.version2.Annotation)
-
- /**
- * Method addSequence
- *
- *
- *
- * @param vSequence
- */
- public void addSequence(jalview.schemabinding.version2.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException
- {
- _sequenceList.addElement(vSequence);
- } //-- void addSequence(jalview.schemabinding.version2.Sequence)
-
- /**
- * Method addSequence
- *
- *
- *
- * @param index
- * @param vSequence
- */
- public void addSequence(int index,
- jalview.schemabinding.version2.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException
- {
- _sequenceList.insertElementAt(vSequence, index);
- } //-- void addSequence(int, jalview.schemabinding.version2.Sequence)
-
- /**
- * Method enumerateAnnotation
- *
- *
- *
- * @return Enumeration
- */
- public java.util.Enumeration enumerateAnnotation()
- {
- return _annotationList.elements();
- } //-- java.util.Enumeration enumerateAnnotation()
-
- /**
- * Method enumerateSequence
- *
- *
- *
- * @return Enumeration
- */
- public java.util.Enumeration enumerateSequence()
- {
- return _sequenceList.elements();
- } //-- java.util.Enumeration enumerateSequence()
-
- /**
- * Method getAnnotation
- *
- *
- *
- * @param index
- * @return Annotation
- */
- public jalview.schemabinding.version2.Annotation getAnnotation(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ( (index < 0) || (index > _annotationList.size()))
- {
- throw new IndexOutOfBoundsException();
- }
-
- return (jalview.schemabinding.version2.Annotation) _annotationList.
- elementAt(index);
- } //-- jalview.schemabinding.version2.Annotation getAnnotation(int)
-
- /**
- * Method getAnnotation
- *
- *
- *
- * @return Annotation
- */
- public jalview.schemabinding.version2.Annotation[] getAnnotation()
- {
- int size = _annotationList.size();
- jalview.schemabinding.version2.Annotation[] mArray = new jalview.
- schemabinding.version2.Annotation[size];
- for (int index = 0; index < size; index++)
- {
- mArray[index] = (jalview.schemabinding.version2.Annotation)
- _annotationList.elementAt(index);
- }
- return mArray;
- } //-- jalview.schemabinding.version2.Annotation[] getAnnotation()
-
- /**
- * Method getAnnotationCount
- *
- *
- *
- * @return int
- */
- public int getAnnotationCount()
- {
- return _annotationList.size();
- } //-- int getAnnotationCount()
-
- /**
- * Returns the value of field 'gapChar'.
- *
- * @return String
- * @return the value of field 'gapChar'.
- */
- public java.lang.String getGapChar()
- {
- return this._gapChar;
- } //-- java.lang.String getGapChar()
-
- /**
- * Method getSequence
- *
- *
- *
- * @param index
- * @return Sequence
- */
- public jalview.schemabinding.version2.Sequence getSequence(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ( (index < 0) || (index > _sequenceList.size()))
- {
- throw new IndexOutOfBoundsException();
- }
-
- return (jalview.schemabinding.version2.Sequence) _sequenceList.elementAt(
- index);
- } //-- jalview.schemabinding.version2.Sequence getSequence(int)
-
- /**
- * Method getSequence
- *
- *
- *
- * @return Sequence
- */
- public jalview.schemabinding.version2.Sequence[] getSequence()
- {
- int size = _sequenceList.size();
- jalview.schemabinding.version2.Sequence[] mArray = new jalview.
- schemabinding.version2.Sequence[size];
- for (int index = 0; index < size; index++)
- {
- mArray[index] = (jalview.schemabinding.version2.Sequence) _sequenceList.
- elementAt(index);
- }
- return mArray;
- } //-- jalview.schemabinding.version2.Sequence[] getSequence()
-
- /**
- * Method getSequenceCount
- *
- *
- *
- * @return int
- */
- public int getSequenceCount()
- {
- return _sequenceList.size();
- } //-- int getSequenceCount()
-
- /**
- * Method isValid
- *
- *
- *
- * @return boolean
- */
- public boolean isValid()
- {
- try
- {
- validate();
- }
- catch (org.exolab.castor.xml.ValidationException vex)
- {
- return false;
- }
- return true;
- } //-- boolean isValid()
-
- /**
- * Method marshal
- *
- *
- *
- * @param out
- */
- public void marshal(java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
-
- Marshaller.marshal(this, out);
- } //-- void marshal(java.io.Writer)
-
- /**
- * Method marshal
- *
- *
- *
- * @param handler
- */
- public void marshal(org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
-
- Marshaller.marshal(this, handler);
- } //-- void marshal(org.xml.sax.ContentHandler)
-
- /**
- * Method removeAllAnnotation
- *
- */
- public void removeAllAnnotation()
- {
- _annotationList.removeAllElements();
- } //-- void removeAllAnnotation()
-
- /**
- * Method removeAllSequence
- *
- */
- public void removeAllSequence()
- {
- _sequenceList.removeAllElements();
- } //-- void removeAllSequence()
-
- /**
- * Method removeAnnotation
- *
- *
- *
- * @param index
- * @return Annotation
- */
- public jalview.schemabinding.version2.Annotation removeAnnotation(int index)
- {
- java.lang.Object obj = _annotationList.elementAt(index);
- _annotationList.removeElementAt(index);
- return (jalview.schemabinding.version2.Annotation) obj;
- } //-- jalview.schemabinding.version2.Annotation removeAnnotation(int)
-
- /**
- * Method removeSequence
- *
- *
- *
- * @param index
- * @return Sequence
- */
- public jalview.schemabinding.version2.Sequence removeSequence(int index)
- {
- java.lang.Object obj = _sequenceList.elementAt(index);
- _sequenceList.removeElementAt(index);
- return (jalview.schemabinding.version2.Sequence) obj;
- } //-- jalview.schemabinding.version2.Sequence removeSequence(int)
-
- /**
- * Method setAnnotation
- *
- *
- *
- * @param index
- * @param vAnnotation
- */
- public void setAnnotation(int index,
- jalview.schemabinding.version2.Annotation
- vAnnotation)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ( (index < 0) || (index > _annotationList.size()))
- {
- throw new IndexOutOfBoundsException();
- }
- _annotationList.setElementAt(vAnnotation, index);
- } //-- void setAnnotation(int, jalview.schemabinding.version2.Annotation)
-
- /**
- * Method setAnnotation
- *
- *
- *
- * @param annotationArray
- */
- public void setAnnotation(jalview.schemabinding.version2.Annotation[]
- annotationArray)
- {
- //-- copy array
- _annotationList.removeAllElements();
- for (int i = 0; i < annotationArray.length; i++)
- {
- _annotationList.addElement(annotationArray[i]);
- }
- } //-- void setAnnotation(jalview.schemabinding.version2.Annotation)
-
- /**
- * Sets the value of field 'gapChar'.
- *
- * @param gapChar the value of field 'gapChar'.
- */
- public void setGapChar(java.lang.String gapChar)
- {
- this._gapChar = gapChar;
- } //-- void setGapChar(java.lang.String)
-
- /**
- * Method setSequence
- *
- *
- *
- * @param index
- * @param vSequence
- */
- public void setSequence(int index,
- jalview.schemabinding.version2.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ( (index < 0) || (index > _sequenceList.size()))
- {
- throw new IndexOutOfBoundsException();
- }
- _sequenceList.setElementAt(vSequence, index);
- } //-- void setSequence(int, jalview.schemabinding.version2.Sequence)
-
- /**
- * Method setSequence
- *
- *
- *
- * @param sequenceArray
- */
- public void setSequence(jalview.schemabinding.version2.Sequence[]
- sequenceArray)
- {
- //-- copy array
- _sequenceList.removeAllElements();
- for (int i = 0; i < sequenceArray.length; i++)
- {
- _sequenceList.addElement(sequenceArray[i]);
- }
- } //-- void setSequence(jalview.schemabinding.version2.Sequence)
-
- /**
- * Method unmarshal
- *
- *
- *
- * @param reader
- * @return Object
- */
- public static java.lang.Object unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException,
- org.exolab.castor.xml.ValidationException
- {
- return (jalview.schemabinding.version2.SequenceSet) Unmarshaller.unmarshal(
- jalview.schemabinding.version2.SequenceSet.class, reader);
- } //-- java.lang.Object unmarshal(java.io.Reader)
-
- /**
- * Method validate
- *
- */
- public void validate()
- throws org.exolab.castor.xml.ValidationException
- {
- org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.
- Validator();
- validator.validate(this);
- } //-- void validate()
-
-}
+/*******************************************************************************
+ * 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
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 know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public jalview.schemabinding.version2.AlcodonFrame[] getAlcodonFrame( + ) { + jalview.schemabinding.version2.AlcodonFrame[] array = new jalview.schemabinding.version2.AlcodonFrame[0]; + return (jalview.schemabinding.version2.AlcodonFrame[]) this._alcodonFrameList.toArray(array); + } + + /** + * Method getAlcodonFrameCount. + * + * @return the size of this collection + */ + public int getAlcodonFrameCount( + ) { + return this._alcodonFrameList.size(); + } + + /** + * 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.schemabinding.version2.Annotation at the given index + */ + public jalview.schemabinding.version2.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.schemabinding.version2.Annotation) _annotationList.get(index); + } + + /** + * Method getAnnotation.Returns the contents of the collection + * in an Array.
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 know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public jalview.schemabinding.version2.Annotation[] getAnnotation( + ) { + jalview.schemabinding.version2.Annotation[] array = new jalview.schemabinding.version2.Annotation[0]; + return (jalview.schemabinding.version2.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 'datasetId'. The field + * 'datasetId' has the following description: reference to set + * where jalview will gather the dataset sequences for all + * sequences in the set. + * + * + * @return the value of field 'DatasetId'. + */ + public java.lang.String getDatasetId( + ) { + return this._datasetId; + } + + /** + * 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.schemabinding.version2.Sequence at the given index + */ + public jalview.schemabinding.version2.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.schemabinding.version2.Sequence) _sequenceList.get(index); + } + + /** + * Method getSequence.Returns the contents of the collection in + * an Array.
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 know + * that the Array returned is of exactly the correct length. + * + * @return this collection as an Array + */ + public jalview.schemabinding.version2.Sequence[] getSequence( + ) { + jalview.schemabinding.version2.Sequence[] array = new jalview.schemabinding.version2.Sequence[0]; + return (jalview.schemabinding.version2.Sequence[]) this._sequenceList.toArray(array); + } + + /** + * Method getSequenceCount. + * + * @return the size of this collection + */ + public int getSequenceCount( + ) { + return this._sequenceList.size(); + } + + /** + * Method getSequenceSetProperties. + * + * @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.SequenceSetProperties at the + * given index + */ + public jalview.schemabinding.version2.SequenceSetProperties getSequenceSetProperties( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._sequenceSetPropertiesList.size()) { + throw new IndexOutOfBoundsException("getSequenceSetProperties: Index value '" + index + "' not in range [0.." + (this._sequenceSetPropertiesList.size() - 1) + "]"); + } + + return (jalview.schemabinding.version2.SequenceSetProperties) _sequenceSetPropertiesList.get(index); + } + + /** + * Method getSequenceSetProperties.Returns the contents of the + * collection in an Array.
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 know that the Array returned is of + * exactly the correct length. + * + * @return this collection as an Array + */ + public jalview.schemabinding.version2.SequenceSetProperties[] getSequenceSetProperties( + ) { + jalview.schemabinding.version2.SequenceSetProperties[] array = new jalview.schemabinding.version2.SequenceSetProperties[0]; + return (jalview.schemabinding.version2.SequenceSetProperties[]) this._sequenceSetPropertiesList.toArray(array); + } + + /** + * Method getSequenceSetPropertiesCount. + * + * @return the size of this collection + */ + public int getSequenceSetPropertiesCount( + ) { + return this._sequenceSetPropertiesList.size(); + } + + /** + * 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); + } + + /** + * Method removeAlcodonFrame. + * + * @param vAlcodonFrame + * @return true if the object was removed from the collection. + */ + public boolean removeAlcodonFrame( + final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame) { + boolean removed = _alcodonFrameList.remove(vAlcodonFrame); + return removed; + } + + /** + * Method removeAlcodonFrameAt. + * + * @param index + * @return the element removed from the collection + */ + public jalview.schemabinding.version2.AlcodonFrame removeAlcodonFrameAt( + final int index) { + java.lang.Object obj = this._alcodonFrameList.remove(index); + return (jalview.schemabinding.version2.AlcodonFrame) obj; + } + + /** + */ + public void removeAllAlcodonFrame( + ) { + this._alcodonFrameList.clear(); + } + + /** + */ + public void removeAllAnnotation( + ) { + this._annotationList.clear(); + } + + /** + */ + public void removeAllSequence( + ) { + this._sequenceList.clear(); + } + + /** + */ + public void removeAllSequenceSetProperties( + ) { + this._sequenceSetPropertiesList.clear(); + } + + /** + * Method removeAnnotation. + * + * @param vAnnotation + * @return true if the object was removed from the collection. + */ + public boolean removeAnnotation( + final jalview.schemabinding.version2.Annotation vAnnotation) { + boolean removed = _annotationList.remove(vAnnotation); + return removed; + } + + /** + * Method removeAnnotationAt. + * + * @param index + * @return the element removed from the collection + */ + public jalview.schemabinding.version2.Annotation removeAnnotationAt( + final int index) { + java.lang.Object obj = this._annotationList.remove(index); + return (jalview.schemabinding.version2.Annotation) obj; + } + + /** + * Method removeSequence. + * + * @param vSequence + * @return true if the object was removed from the collection. + */ + public boolean removeSequence( + final jalview.schemabinding.version2.Sequence vSequence) { + boolean removed = _sequenceList.remove(vSequence); + return removed; + } + + /** + * Method removeSequenceAt. + * + * @param index + * @return the element removed from the collection + */ + public jalview.schemabinding.version2.Sequence removeSequenceAt( + final int index) { + java.lang.Object obj = this._sequenceList.remove(index); + return (jalview.schemabinding.version2.Sequence) obj; + } + + /** + * Method removeSequenceSetProperties. + * + * @param vSequenceSetProperties + * @return true if the object was removed from the collection. + */ + public boolean removeSequenceSetProperties( + final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties) { + boolean removed = _sequenceSetPropertiesList.remove(vSequenceSetProperties); + return removed; + } + + /** + * Method removeSequenceSetPropertiesAt. + * + * @param index + * @return the element removed from the collection + */ + public jalview.schemabinding.version2.SequenceSetProperties removeSequenceSetPropertiesAt( + final int index) { + java.lang.Object obj = this._sequenceSetPropertiesList.remove(index); + return (jalview.schemabinding.version2.SequenceSetProperties) obj; + } + + /** + * + * + * @param index + * @param vAlcodonFrame + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setAlcodonFrame( + final int index, + final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._alcodonFrameList.size()) { + throw new IndexOutOfBoundsException("setAlcodonFrame: Index value '" + index + "' not in range [0.." + (this._alcodonFrameList.size() - 1) + "]"); + } + + this._alcodonFrameList.set(index, vAlcodonFrame); + } + + /** + * + * + * @param vAlcodonFrameArray + */ + public void setAlcodonFrame( + final jalview.schemabinding.version2.AlcodonFrame[] vAlcodonFrameArray) { + //-- copy array + _alcodonFrameList.clear(); + + for (int i = 0; i < vAlcodonFrameArray.length; i++) { + this._alcodonFrameList.add(vAlcodonFrameArray[i]); + } + } + + /** + * + * + * @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.schemabinding.version2.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.schemabinding.version2.Annotation[] vAnnotationArray) { + //-- copy array + _annotationList.clear(); + + for (int i = 0; i < vAnnotationArray.length; i++) { + this._annotationList.add(vAnnotationArray[i]); + } + } + + /** + * Sets the value of field 'datasetId'. The field 'datasetId' + * has the following description: reference to set where + * jalview will gather the dataset sequences for all sequences + * in the set. + * + * + * @param datasetId the value of field 'datasetId'. + */ + public void setDatasetId( + final java.lang.String datasetId) { + this._datasetId = datasetId; + } + + /** + * 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.schemabinding.version2.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.schemabinding.version2.Sequence[] vSequenceArray) { + //-- copy array + _sequenceList.clear(); + + for (int i = 0; i < vSequenceArray.length; i++) { + this._sequenceList.add(vSequenceArray[i]); + } + } + + /** + * + * + * @param index + * @param vSequenceSetProperties + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void setSequenceSetProperties( + final int index, + final jalview.schemabinding.version2.SequenceSetProperties vSequenceSetProperties) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._sequenceSetPropertiesList.size()) { + throw new IndexOutOfBoundsException("setSequenceSetProperties: Index value '" + index + "' not in range [0.." + (this._sequenceSetPropertiesList.size() - 1) + "]"); + } + + this._sequenceSetPropertiesList.set(index, vSequenceSetProperties); + } + + /** + * + * + * @param vSequenceSetPropertiesArray + */ + public void setSequenceSetProperties( + final jalview.schemabinding.version2.SequenceSetProperties[] vSequenceSetPropertiesArray) { + //-- copy array + _sequenceSetPropertiesList.clear(); + + for (int i = 0; i < vSequenceSetPropertiesArray.length; i++) { + this._sequenceSetPropertiesList.add(vSequenceSetPropertiesArray[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.schemabinding.version2.SequenceSet + */ + public static jalview.schemabinding.version2.SequenceSet unmarshal( + final java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + return (jalview.schemabinding.version2.SequenceSet) Unmarshaller.unmarshal(jalview.schemabinding.version2.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); + } + +}