X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemabinding%2Fversion2%2FSequenceSet.java;h=481c37fcaf8d5cf340b1212d86bd5dd6e0a21659;hb=22d4d2237b099daf76bd1a2ed324763972ed91aa;hp=67c34ad4e6650cfda050ea407f85043dafc9ebad;hpb=09ee1649c4427f534331aa2017a890529f0932f5;p=jalview.git diff --git a/src/jalview/schemabinding/version2/SequenceSet.java b/src/jalview/schemabinding/version2/SequenceSet.java index 67c34ad..481c37f 100755 --- a/src/jalview/schemabinding/version2/SequenceSet.java +++ b/src/jalview/schemabinding/version2/SequenceSet.java @@ -32,6 +32,13 @@ public class SequenceSet implements java.io.Serializable { private java.lang.String _gapChar; /** + * reference to set where jalview will gather the dataset + * sequences for all sequences in the set. + * + */ + private java.lang.String _datasetId; + + /** * Field _sequenceList. */ private java.util.Vector _sequenceList; @@ -46,6 +53,11 @@ public class SequenceSet implements java.io.Serializable { */ private java.util.Vector _sequenceSetPropertiesList; + /** + * Field _alcodonFrameList. + */ + private java.util.Vector _alcodonFrameList; + //----------------/ //- Constructors -/ @@ -56,6 +68,7 @@ public class SequenceSet implements java.io.Serializable { this._sequenceList = new java.util.Vector(); this._annotationList = new java.util.Vector(); this._sequenceSetPropertiesList = new java.util.Vector(); + this._alcodonFrameList = new java.util.Vector(); } @@ -66,6 +79,34 @@ public class SequenceSet implements java.io.Serializable { /** * * + * @param vAlcodonFrame + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addAlcodonFrame( + final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame) + throws java.lang.IndexOutOfBoundsException { + this._alcodonFrameList.addElement(vAlcodonFrame); + } + + /** + * + * + * @param index + * @param vAlcodonFrame + * @throws java.lang.IndexOutOfBoundsException if the index + * given is outside the bounds of the collection + */ + public void addAlcodonFrame( + final int index, + final jalview.schemabinding.version2.AlcodonFrame vAlcodonFrame) + throws java.lang.IndexOutOfBoundsException { + this._alcodonFrameList.add(index, vAlcodonFrame); + } + + /** + * + * * @param vAnnotation * @throws java.lang.IndexOutOfBoundsException if the index * given is outside the bounds of the collection @@ -148,6 +189,17 @@ public class SequenceSet implements java.io.Serializable { } /** + * Method enumerateAlcodonFrame. + * + * @return an Enumeration over all + * jalview.schemabinding.version2.AlcodonFrame elements + */ + public java.util.Enumeration enumerateAlcodonFrame( + ) { + return this._alcodonFrameList.elements(); + } + + /** * Method enumerateAnnotation. * * @return an Enumeration over all @@ -181,6 +233,52 @@ public class SequenceSet implements java.io.Serializable { } /** + * Method getAlcodonFrame. + * + * @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.AlcodonFrame at the given inde + */ + public jalview.schemabinding.version2.AlcodonFrame getAlcodonFrame( + final int index) + throws java.lang.IndexOutOfBoundsException { + // check bounds for index + if (index < 0 || index >= this._alcodonFrameList.size()) { + throw new IndexOutOfBoundsException("getAlcodonFrame: Index value '" + index + "' not in range [0.." + (this._alcodonFrameList.size() - 1) + "]"); + } + + return (jalview.schemabinding.version2.AlcodonFrame) _alcodonFrameList.get(index); + } + + /** + * Method getAlcodonFrame.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.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 @@ -226,6 +324,20 @@ public class SequenceSet implements java.io.Serializable { } /** + * 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'. @@ -375,6 +487,37 @@ public class SequenceSet implements java.io.Serializable { } /** + * 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( ) { @@ -471,6 +614,41 @@ public class SequenceSet implements java.io.Serializable { * * * @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 @@ -503,6 +681,20 @@ public class SequenceSet implements java.io.Serializable { } /** + * 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'.