2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package uk.ac.vamsas.objects.core;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
20 * @version $Revision$ $Date$
22 public class DataSet extends uk.ac.vamsas.client.Vobject
23 implements java.io.Serializable
27 //--------------------------/
28 //- Class/Member Variables -/
29 //--------------------------/
32 * Primary Key for vamsas object referencing
34 private java.lang.String _id;
37 * Field _sequenceList.
39 private java.util.Vector _sequenceList;
42 * Field _sequenceMappingList.
44 private java.util.Vector _sequenceMappingList;
47 * Field _dataSetAnnotationsList.
49 private java.util.Vector _dataSetAnnotationsList;
52 * Field _alignmentList.
54 private java.util.Vector _alignmentList;
59 private java.util.Vector _treeList;
64 private uk.ac.vamsas.objects.core.Provenance _provenance;
73 this._sequenceList = new java.util.Vector();
74 this._sequenceMappingList = new java.util.Vector();
75 this._dataSetAnnotationsList = new java.util.Vector();
76 this._alignmentList = new java.util.Vector();
77 this._treeList = new java.util.Vector();
89 * @throws java.lang.IndexOutOfBoundsException if the index
90 * given is outside the bounds of the collection
92 public void addAlignment(
93 final uk.ac.vamsas.objects.core.Alignment vAlignment)
94 throws java.lang.IndexOutOfBoundsException {
95 this._alignmentList.addElement(vAlignment);
103 * @throws java.lang.IndexOutOfBoundsException if the index
104 * given is outside the bounds of the collection
106 public void addAlignment(
108 final uk.ac.vamsas.objects.core.Alignment vAlignment)
109 throws java.lang.IndexOutOfBoundsException {
110 this._alignmentList.add(index, vAlignment);
116 * @param vDataSetAnnotations
117 * @throws java.lang.IndexOutOfBoundsException if the index
118 * given is outside the bounds of the collection
120 public void addDataSetAnnotations(
121 final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
122 throws java.lang.IndexOutOfBoundsException {
123 this._dataSetAnnotationsList.addElement(vDataSetAnnotations);
130 * @param vDataSetAnnotations
131 * @throws java.lang.IndexOutOfBoundsException if the index
132 * given is outside the bounds of the collection
134 public void addDataSetAnnotations(
136 final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
137 throws java.lang.IndexOutOfBoundsException {
138 this._dataSetAnnotationsList.add(index, vDataSetAnnotations);
145 * @throws java.lang.IndexOutOfBoundsException if the index
146 * given is outside the bounds of the collection
148 public void addSequence(
149 final uk.ac.vamsas.objects.core.Sequence vSequence)
150 throws java.lang.IndexOutOfBoundsException {
151 this._sequenceList.addElement(vSequence);
159 * @throws java.lang.IndexOutOfBoundsException if the index
160 * given is outside the bounds of the collection
162 public void addSequence(
164 final uk.ac.vamsas.objects.core.Sequence vSequence)
165 throws java.lang.IndexOutOfBoundsException {
166 this._sequenceList.add(index, vSequence);
172 * @param vSequenceMapping
173 * @throws java.lang.IndexOutOfBoundsException if the index
174 * given is outside the bounds of the collection
176 public void addSequenceMapping(
177 final uk.ac.vamsas.objects.core.SequenceMapping vSequenceMapping)
178 throws java.lang.IndexOutOfBoundsException {
179 this._sequenceMappingList.addElement(vSequenceMapping);
186 * @param vSequenceMapping
187 * @throws java.lang.IndexOutOfBoundsException if the index
188 * given is outside the bounds of the collection
190 public void addSequenceMapping(
192 final uk.ac.vamsas.objects.core.SequenceMapping vSequenceMapping)
193 throws java.lang.IndexOutOfBoundsException {
194 this._sequenceMappingList.add(index, vSequenceMapping);
201 * @throws java.lang.IndexOutOfBoundsException if the index
202 * given is outside the bounds of the collection
205 final uk.ac.vamsas.objects.core.Tree vTree)
206 throws java.lang.IndexOutOfBoundsException {
207 this._treeList.addElement(vTree);
215 * @throws java.lang.IndexOutOfBoundsException if the index
216 * given is outside the bounds of the collection
220 final uk.ac.vamsas.objects.core.Tree vTree)
221 throws java.lang.IndexOutOfBoundsException {
222 this._treeList.add(index, vTree);
226 * Method enumerateAlignment.
228 * @return an Enumeration over all
229 * uk.ac.vamsas.objects.core.Alignment elements
231 public java.util.Enumeration enumerateAlignment(
233 return this._alignmentList.elements();
237 * Method enumerateDataSetAnnotations.
239 * @return an Enumeration over all
240 * uk.ac.vamsas.objects.core.DataSetAnnotations elements
242 public java.util.Enumeration enumerateDataSetAnnotations(
244 return this._dataSetAnnotationsList.elements();
248 * Method enumerateSequence.
250 * @return an Enumeration over all
251 * uk.ac.vamsas.objects.core.Sequence elements
253 public java.util.Enumeration enumerateSequence(
255 return this._sequenceList.elements();
259 * Method enumerateSequenceMapping.
261 * @return an Enumeration over all
262 * uk.ac.vamsas.objects.core.SequenceMapping elements
264 public java.util.Enumeration enumerateSequenceMapping(
266 return this._sequenceMappingList.elements();
270 * Method enumerateTree.
272 * @return an Enumeration over all
273 * uk.ac.vamsas.objects.core.Tree elements
275 public java.util.Enumeration enumerateTree(
277 return this._treeList.elements();
281 * Overrides the java.lang.Object.equals method.
284 * @return true if the objects are equal.
286 public boolean equals(
287 final java.lang.Object obj) {
291 if (super.equals(obj)==false)
294 if (obj instanceof DataSet) {
296 DataSet temp = (DataSet)obj;
297 if (this._id != null) {
298 if (temp._id == null) return false;
299 else if (!(this._id.equals(temp._id)))
302 else if (temp._id != null)
304 if (this._sequenceList != null) {
305 if (temp._sequenceList == null) return false;
306 else if (!(this._sequenceList.equals(temp._sequenceList)))
309 else if (temp._sequenceList != null)
311 if (this._sequenceMappingList != null) {
312 if (temp._sequenceMappingList == null) return false;
313 else if (!(this._sequenceMappingList.equals(temp._sequenceMappingList)))
316 else if (temp._sequenceMappingList != null)
318 if (this._dataSetAnnotationsList != null) {
319 if (temp._dataSetAnnotationsList == null) return false;
320 else if (!(this._dataSetAnnotationsList.equals(temp._dataSetAnnotationsList)))
323 else if (temp._dataSetAnnotationsList != null)
325 if (this._alignmentList != null) {
326 if (temp._alignmentList == null) return false;
327 else if (!(this._alignmentList.equals(temp._alignmentList)))
330 else if (temp._alignmentList != null)
332 if (this._treeList != null) {
333 if (temp._treeList == null) return false;
334 else if (!(this._treeList.equals(temp._treeList)))
337 else if (temp._treeList != null)
339 if (this._provenance != null) {
340 if (temp._provenance == null) return false;
341 else if (!(this._provenance.equals(temp._provenance)))
344 else if (temp._provenance != null)
352 * Method getAlignment.
355 * @throws java.lang.IndexOutOfBoundsException if the index
356 * given is outside the bounds of the collection
357 * @return the value of the uk.ac.vamsas.objects.core.Alignment
360 public uk.ac.vamsas.objects.core.Alignment getAlignment(
362 throws java.lang.IndexOutOfBoundsException {
363 // check bounds for index
364 if (index < 0 || index >= this._alignmentList.size()) {
365 throw new IndexOutOfBoundsException("getAlignment: Index value '" + index + "' not in range [0.." + (this._alignmentList.size() - 1) + "]");
368 return (uk.ac.vamsas.objects.core.Alignment) _alignmentList.get(index);
372 * Method getAlignment.Returns the contents of the collection
373 * in an Array. <p>Note: Just in case the collection contents
374 * are changing in another thread, we pass a 0-length Array of
375 * the correct type into the API call. This way we <i>know</i>
376 * that the Array returned is of exactly the correct length.
378 * @return this collection as an Array
380 public uk.ac.vamsas.objects.core.Alignment[] getAlignment(
382 uk.ac.vamsas.objects.core.Alignment[] array = new uk.ac.vamsas.objects.core.Alignment[0];
383 return (uk.ac.vamsas.objects.core.Alignment[]) this._alignmentList.toArray(array);
387 * Method getAlignmentAsReference.Returns a reference to
388 * '_alignmentList'. No type checking is performed on any
389 * modifications to the Vector.
391 * @return a reference to the Vector backing this class
393 public java.util.Vector getAlignmentAsReference(
395 return this._alignmentList;
399 * Method getAlignmentCount.
401 * @return the size of this collection
403 public int getAlignmentCount(
405 return this._alignmentList.size();
409 * Method getDataSetAnnotations.
412 * @throws java.lang.IndexOutOfBoundsException if the index
413 * given is outside the bounds of the collection
414 * @return the value of the
415 * uk.ac.vamsas.objects.core.DataSetAnnotations at the given
418 public uk.ac.vamsas.objects.core.DataSetAnnotations getDataSetAnnotations(
420 throws java.lang.IndexOutOfBoundsException {
421 // check bounds for index
422 if (index < 0 || index >= this._dataSetAnnotationsList.size()) {
423 throw new IndexOutOfBoundsException("getDataSetAnnotations: Index value '" + index + "' not in range [0.." + (this._dataSetAnnotationsList.size() - 1) + "]");
426 return (uk.ac.vamsas.objects.core.DataSetAnnotations) _dataSetAnnotationsList.get(index);
430 * Method getDataSetAnnotations.Returns the contents of the
431 * collection in an Array. <p>Note: Just in case the
432 * collection contents are changing in another thread, we pass
433 * a 0-length Array of the correct type into the API call.
434 * This way we <i>know</i> that the Array returned is of
435 * exactly the correct length.
437 * @return this collection as an Array
439 public uk.ac.vamsas.objects.core.DataSetAnnotations[] getDataSetAnnotations(
441 uk.ac.vamsas.objects.core.DataSetAnnotations[] array = new uk.ac.vamsas.objects.core.DataSetAnnotations[0];
442 return (uk.ac.vamsas.objects.core.DataSetAnnotations[]) this._dataSetAnnotationsList.toArray(array);
446 * Method getDataSetAnnotationsAsReference.Returns a reference
447 * to '_dataSetAnnotationsList'. No type checking is performed
448 * on any modifications to the Vector.
450 * @return a reference to the Vector backing this class
452 public java.util.Vector getDataSetAnnotationsAsReference(
454 return this._dataSetAnnotationsList;
458 * Method getDataSetAnnotationsCount.
460 * @return the size of this collection
462 public int getDataSetAnnotationsCount(
464 return this._dataSetAnnotationsList.size();
468 * Returns the value of field 'id'. The field 'id' has the
469 * following description: Primary Key for vamsas object
472 * @return the value of field 'Id'.
474 public java.lang.String getId(
480 * Returns the value of field 'provenance'.
482 * @return the value of field 'Provenance'.
484 public uk.ac.vamsas.objects.core.Provenance getProvenance(
486 return this._provenance;
490 * Method getSequence.
493 * @throws java.lang.IndexOutOfBoundsException if the index
494 * given is outside the bounds of the collection
495 * @return the value of the uk.ac.vamsas.objects.core.Sequence
498 public uk.ac.vamsas.objects.core.Sequence getSequence(
500 throws java.lang.IndexOutOfBoundsException {
501 // check bounds for index
502 if (index < 0 || index >= this._sequenceList.size()) {
503 throw new IndexOutOfBoundsException("getSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");
506 return (uk.ac.vamsas.objects.core.Sequence) _sequenceList.get(index);
510 * Method getSequence.Returns the contents of the collection in
511 * an Array. <p>Note: Just in case the collection contents
512 * are changing in another thread, we pass a 0-length Array of
513 * the correct type into the API call. This way we <i>know</i>
514 * that the Array returned is of exactly the correct length.
516 * @return this collection as an Array
518 public uk.ac.vamsas.objects.core.Sequence[] getSequence(
520 uk.ac.vamsas.objects.core.Sequence[] array = new uk.ac.vamsas.objects.core.Sequence[0];
521 return (uk.ac.vamsas.objects.core.Sequence[]) this._sequenceList.toArray(array);
525 * Method getSequenceAsReference.Returns a reference to
526 * '_sequenceList'. No type checking is performed on any
527 * modifications to the Vector.
529 * @return a reference to the Vector backing this class
531 public java.util.Vector getSequenceAsReference(
533 return this._sequenceList;
537 * Method getSequenceCount.
539 * @return the size of this collection
541 public int getSequenceCount(
543 return this._sequenceList.size();
547 * Method getSequenceMapping.
550 * @throws java.lang.IndexOutOfBoundsException if the index
551 * given is outside the bounds of the collection
552 * @return the value of the
553 * uk.ac.vamsas.objects.core.SequenceMapping at the given index
555 public uk.ac.vamsas.objects.core.SequenceMapping getSequenceMapping(
557 throws java.lang.IndexOutOfBoundsException {
558 // check bounds for index
559 if (index < 0 || index >= this._sequenceMappingList.size()) {
560 throw new IndexOutOfBoundsException("getSequenceMapping: Index value '" + index + "' not in range [0.." + (this._sequenceMappingList.size() - 1) + "]");
563 return (uk.ac.vamsas.objects.core.SequenceMapping) _sequenceMappingList.get(index);
567 * Method getSequenceMapping.Returns the contents of the
568 * collection in an Array. <p>Note: Just in case the
569 * collection contents are changing in another thread, we pass
570 * a 0-length Array of the correct type into the API call.
571 * This way we <i>know</i> that the Array returned is of
572 * exactly the correct length.
574 * @return this collection as an Array
576 public uk.ac.vamsas.objects.core.SequenceMapping[] getSequenceMapping(
578 uk.ac.vamsas.objects.core.SequenceMapping[] array = new uk.ac.vamsas.objects.core.SequenceMapping[0];
579 return (uk.ac.vamsas.objects.core.SequenceMapping[]) this._sequenceMappingList.toArray(array);
583 * Method getSequenceMappingAsReference.Returns a reference to
584 * '_sequenceMappingList'. No type checking is performed on any
585 * modifications to the Vector.
587 * @return a reference to the Vector backing this class
589 public java.util.Vector getSequenceMappingAsReference(
591 return this._sequenceMappingList;
595 * Method getSequenceMappingCount.
597 * @return the size of this collection
599 public int getSequenceMappingCount(
601 return this._sequenceMappingList.size();
608 * @throws java.lang.IndexOutOfBoundsException if the index
609 * given is outside the bounds of the collection
610 * @return the value of the uk.ac.vamsas.objects.core.Tree at
613 public uk.ac.vamsas.objects.core.Tree getTree(
615 throws java.lang.IndexOutOfBoundsException {
616 // check bounds for index
617 if (index < 0 || index >= this._treeList.size()) {
618 throw new IndexOutOfBoundsException("getTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
621 return (uk.ac.vamsas.objects.core.Tree) _treeList.get(index);
625 * Method getTree.Returns the contents of the collection in an
626 * Array. <p>Note: Just in case the collection contents are
627 * changing in another thread, we pass a 0-length Array of the
628 * correct type into the API call. This way we <i>know</i>
629 * that the Array returned is of exactly the correct length.
631 * @return this collection as an Array
633 public uk.ac.vamsas.objects.core.Tree[] getTree(
635 uk.ac.vamsas.objects.core.Tree[] array = new uk.ac.vamsas.objects.core.Tree[0];
636 return (uk.ac.vamsas.objects.core.Tree[]) this._treeList.toArray(array);
640 * Method getTreeAsReference.Returns a reference to
641 * '_treeList'. No type checking is performed on any
642 * modifications to the Vector.
644 * @return a reference to the Vector backing this class
646 public java.util.Vector getTreeAsReference(
648 return this._treeList;
652 * Method getTreeCount.
654 * @return the size of this collection
656 public int getTreeCount(
658 return this._treeList.size();
662 * Overrides the java.lang.Object.hashCode method.
664 * The following steps came from <b>Effective Java Programming
665 * Language Guide</b> by Joshua Bloch, Chapter 3
667 * @return a hash code value for the object.
671 int result = super.hashCode();
675 result = 37 * result + _id.hashCode();
677 if (_sequenceList != null) {
678 result = 37 * result + _sequenceList.hashCode();
680 if (_sequenceMappingList != null) {
681 result = 37 * result + _sequenceMappingList.hashCode();
683 if (_dataSetAnnotationsList != null) {
684 result = 37 * result + _dataSetAnnotationsList.hashCode();
686 if (_alignmentList != null) {
687 result = 37 * result + _alignmentList.hashCode();
689 if (_treeList != null) {
690 result = 37 * result + _treeList.hashCode();
692 if (_provenance != null) {
693 result = 37 * result + _provenance.hashCode();
702 * @return true if this object is valid according to the schema
704 public boolean isValid(
708 } catch (org.exolab.castor.xml.ValidationException vex) {
718 * @throws org.exolab.castor.xml.MarshalException if object is
719 * null or if any SAXException is thrown during marshaling
720 * @throws org.exolab.castor.xml.ValidationException if this
721 * object is an invalid instance according to the schema
724 final java.io.Writer out)
725 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
726 Marshaller.marshal(this, out);
733 * @throws java.io.IOException if an IOException occurs during
735 * @throws org.exolab.castor.xml.ValidationException if this
736 * object is an invalid instance according to the schema
737 * @throws org.exolab.castor.xml.MarshalException if object is
738 * null or if any SAXException is thrown during marshaling
741 final org.xml.sax.ContentHandler handler)
742 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
743 Marshaller.marshal(this, handler);
747 * Method removeAlignment.
750 * @return true if the object was removed from the collection.
752 public boolean removeAlignment(
753 final uk.ac.vamsas.objects.core.Alignment vAlignment) {
754 boolean removed = _alignmentList.remove(vAlignment);
759 * Method removeAlignmentAt.
762 * @return the element removed from the collection
764 public uk.ac.vamsas.objects.core.Alignment removeAlignmentAt(
766 java.lang.Object obj = this._alignmentList.remove(index);
767 return (uk.ac.vamsas.objects.core.Alignment) obj;
772 public void removeAllAlignment(
774 this._alignmentList.clear();
779 public void removeAllDataSetAnnotations(
781 this._dataSetAnnotationsList.clear();
786 public void removeAllSequence(
788 this._sequenceList.clear();
793 public void removeAllSequenceMapping(
795 this._sequenceMappingList.clear();
800 public void removeAllTree(
802 this._treeList.clear();
806 * Method removeDataSetAnnotations.
808 * @param vDataSetAnnotations
809 * @return true if the object was removed from the collection.
811 public boolean removeDataSetAnnotations(
812 final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations) {
813 boolean removed = _dataSetAnnotationsList.remove(vDataSetAnnotations);
818 * Method removeDataSetAnnotationsAt.
821 * @return the element removed from the collection
823 public uk.ac.vamsas.objects.core.DataSetAnnotations removeDataSetAnnotationsAt(
825 java.lang.Object obj = this._dataSetAnnotationsList.remove(index);
826 return (uk.ac.vamsas.objects.core.DataSetAnnotations) obj;
830 * Method removeSequence.
833 * @return true if the object was removed from the collection.
835 public boolean removeSequence(
836 final uk.ac.vamsas.objects.core.Sequence vSequence) {
837 boolean removed = _sequenceList.remove(vSequence);
842 * Method removeSequenceAt.
845 * @return the element removed from the collection
847 public uk.ac.vamsas.objects.core.Sequence removeSequenceAt(
849 java.lang.Object obj = this._sequenceList.remove(index);
850 return (uk.ac.vamsas.objects.core.Sequence) obj;
854 * Method removeSequenceMapping.
856 * @param vSequenceMapping
857 * @return true if the object was removed from the collection.
859 public boolean removeSequenceMapping(
860 final uk.ac.vamsas.objects.core.SequenceMapping vSequenceMapping) {
861 boolean removed = _sequenceMappingList.remove(vSequenceMapping);
866 * Method removeSequenceMappingAt.
869 * @return the element removed from the collection
871 public uk.ac.vamsas.objects.core.SequenceMapping removeSequenceMappingAt(
873 java.lang.Object obj = this._sequenceMappingList.remove(index);
874 return (uk.ac.vamsas.objects.core.SequenceMapping) obj;
881 * @return true if the object was removed from the collection.
883 public boolean removeTree(
884 final uk.ac.vamsas.objects.core.Tree vTree) {
885 boolean removed = _treeList.remove(vTree);
890 * Method removeTreeAt.
893 * @return the element removed from the collection
895 public uk.ac.vamsas.objects.core.Tree removeTreeAt(
897 java.lang.Object obj = this._treeList.remove(index);
898 return (uk.ac.vamsas.objects.core.Tree) obj;
906 * @throws java.lang.IndexOutOfBoundsException if the index
907 * given is outside the bounds of the collection
909 public void setAlignment(
911 final uk.ac.vamsas.objects.core.Alignment vAlignment)
912 throws java.lang.IndexOutOfBoundsException {
913 // check bounds for index
914 if (index < 0 || index >= this._alignmentList.size()) {
915 throw new IndexOutOfBoundsException("setAlignment: Index value '" + index + "' not in range [0.." + (this._alignmentList.size() - 1) + "]");
918 this._alignmentList.set(index, vAlignment);
924 * @param vAlignmentArray
926 public void setAlignment(
927 final uk.ac.vamsas.objects.core.Alignment[] vAlignmentArray) {
929 _alignmentList.clear();
931 for (int i = 0; i < vAlignmentArray.length; i++) {
932 this._alignmentList.add(vAlignmentArray[i]);
937 * Sets the value of '_alignmentList' by copying the given
938 * Vector. All elements will be checked for type safety.
940 * @param vAlignmentList the Vector to copy.
942 public void setAlignment(
943 final java.util.Vector vAlignmentList) {
945 this._alignmentList.clear();
947 this._alignmentList.addAll(vAlignmentList);
951 * Sets the value of '_alignmentList' by setting it to the
952 * given Vector. No type checking is performed.
955 * @param alignmentVector the Vector to set.
957 public void setAlignmentAsReference(
958 final java.util.Vector alignmentVector) {
959 this._alignmentList = alignmentVector;
966 * @param vDataSetAnnotations
967 * @throws java.lang.IndexOutOfBoundsException if the index
968 * given is outside the bounds of the collection
970 public void setDataSetAnnotations(
972 final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
973 throws java.lang.IndexOutOfBoundsException {
974 // check bounds for index
975 if (index < 0 || index >= this._dataSetAnnotationsList.size()) {
976 throw new IndexOutOfBoundsException("setDataSetAnnotations: Index value '" + index + "' not in range [0.." + (this._dataSetAnnotationsList.size() - 1) + "]");
979 this._dataSetAnnotationsList.set(index, vDataSetAnnotations);
985 * @param vDataSetAnnotationsArray
987 public void setDataSetAnnotations(
988 final uk.ac.vamsas.objects.core.DataSetAnnotations[] vDataSetAnnotationsArray) {
990 _dataSetAnnotationsList.clear();
992 for (int i = 0; i < vDataSetAnnotationsArray.length; i++) {
993 this._dataSetAnnotationsList.add(vDataSetAnnotationsArray[i]);
998 * Sets the value of '_dataSetAnnotationsList' by copying the
999 * given Vector. All elements will be checked for type safety.
1001 * @param vDataSetAnnotationsList the Vector to copy.
1003 public void setDataSetAnnotations(
1004 final java.util.Vector vDataSetAnnotationsList) {
1006 this._dataSetAnnotationsList.clear();
1008 this._dataSetAnnotationsList.addAll(vDataSetAnnotationsList);
1012 * Sets the value of '_dataSetAnnotationsList' by setting it to
1013 * the given Vector. No type checking is performed.
1016 * @param dataSetAnnotationsVector the Vector to set.
1018 public void setDataSetAnnotationsAsReference(
1019 final java.util.Vector dataSetAnnotationsVector) {
1020 this._dataSetAnnotationsList = dataSetAnnotationsVector;
1024 * Sets the value of field 'id'. The field 'id' has the
1025 * following description: Primary Key for vamsas object
1028 * @param id the value of field 'id'.
1031 final java.lang.String id) {
1036 * Sets the value of field 'provenance'.
1038 * @param provenance the value of field 'provenance'.
1040 public void setProvenance(
1041 final uk.ac.vamsas.objects.core.Provenance provenance) {
1042 this._provenance = provenance;
1050 * @throws java.lang.IndexOutOfBoundsException if the index
1051 * given is outside the bounds of the collection
1053 public void setSequence(
1055 final uk.ac.vamsas.objects.core.Sequence vSequence)
1056 throws java.lang.IndexOutOfBoundsException {
1057 // check bounds for index
1058 if (index < 0 || index >= this._sequenceList.size()) {
1059 throw new IndexOutOfBoundsException("setSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");
1062 this._sequenceList.set(index, vSequence);
1068 * @param vSequenceArray
1070 public void setSequence(
1071 final uk.ac.vamsas.objects.core.Sequence[] vSequenceArray) {
1073 _sequenceList.clear();
1075 for (int i = 0; i < vSequenceArray.length; i++) {
1076 this._sequenceList.add(vSequenceArray[i]);
1081 * Sets the value of '_sequenceList' by copying the given
1082 * Vector. All elements will be checked for type safety.
1084 * @param vSequenceList the Vector to copy.
1086 public void setSequence(
1087 final java.util.Vector vSequenceList) {
1089 this._sequenceList.clear();
1091 this._sequenceList.addAll(vSequenceList);
1095 * Sets the value of '_sequenceList' by setting it to the given
1096 * Vector. No type checking is performed.
1099 * @param sequenceVector the Vector to set.
1101 public void setSequenceAsReference(
1102 final java.util.Vector sequenceVector) {
1103 this._sequenceList = sequenceVector;
1110 * @param vSequenceMapping
1111 * @throws java.lang.IndexOutOfBoundsException if the index
1112 * given is outside the bounds of the collection
1114 public void setSequenceMapping(
1116 final uk.ac.vamsas.objects.core.SequenceMapping vSequenceMapping)
1117 throws java.lang.IndexOutOfBoundsException {
1118 // check bounds for index
1119 if (index < 0 || index >= this._sequenceMappingList.size()) {
1120 throw new IndexOutOfBoundsException("setSequenceMapping: Index value '" + index + "' not in range [0.." + (this._sequenceMappingList.size() - 1) + "]");
1123 this._sequenceMappingList.set(index, vSequenceMapping);
1129 * @param vSequenceMappingArray
1131 public void setSequenceMapping(
1132 final uk.ac.vamsas.objects.core.SequenceMapping[] vSequenceMappingArray) {
1134 _sequenceMappingList.clear();
1136 for (int i = 0; i < vSequenceMappingArray.length; i++) {
1137 this._sequenceMappingList.add(vSequenceMappingArray[i]);
1142 * Sets the value of '_sequenceMappingList' by copying the
1143 * given Vector. All elements will be checked for type safety.
1145 * @param vSequenceMappingList the Vector to copy.
1147 public void setSequenceMapping(
1148 final java.util.Vector vSequenceMappingList) {
1150 this._sequenceMappingList.clear();
1152 this._sequenceMappingList.addAll(vSequenceMappingList);
1156 * Sets the value of '_sequenceMappingList' by setting it to
1157 * the given Vector. No type checking is performed.
1160 * @param sequenceMappingVector the Vector to set.
1162 public void setSequenceMappingAsReference(
1163 final java.util.Vector sequenceMappingVector) {
1164 this._sequenceMappingList = sequenceMappingVector;
1172 * @throws java.lang.IndexOutOfBoundsException if the index
1173 * given is outside the bounds of the collection
1175 public void setTree(
1177 final uk.ac.vamsas.objects.core.Tree vTree)
1178 throws java.lang.IndexOutOfBoundsException {
1179 // check bounds for index
1180 if (index < 0 || index >= this._treeList.size()) {
1181 throw new IndexOutOfBoundsException("setTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
1184 this._treeList.set(index, vTree);
1192 public void setTree(
1193 final uk.ac.vamsas.objects.core.Tree[] vTreeArray) {
1197 for (int i = 0; i < vTreeArray.length; i++) {
1198 this._treeList.add(vTreeArray[i]);
1203 * Sets the value of '_treeList' by copying the given Vector.
1204 * All elements will be checked for type safety.
1206 * @param vTreeList the Vector to copy.
1208 public void setTree(
1209 final java.util.Vector vTreeList) {
1211 this._treeList.clear();
1213 this._treeList.addAll(vTreeList);
1217 * Sets the value of '_treeList' by setting it to the given
1218 * Vector. No type checking is performed.
1221 * @param treeVector the Vector to set.
1223 public void setTreeAsReference(
1224 final java.util.Vector treeVector) {
1225 this._treeList = treeVector;
1232 * @throws org.exolab.castor.xml.MarshalException if object is
1233 * null or if any SAXException is thrown during marshaling
1234 * @throws org.exolab.castor.xml.ValidationException if this
1235 * object is an invalid instance according to the schema
1236 * @return the unmarshaled uk.ac.vamsas.objects.core.DataSet
1238 public static uk.ac.vamsas.objects.core.DataSet unmarshal(
1239 final java.io.Reader reader)
1240 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
1241 return (uk.ac.vamsas.objects.core.DataSet) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.DataSet.class, reader);
1247 * @throws org.exolab.castor.xml.ValidationException if this
1248 * object is an invalid instance according to the schema
1250 public void validate(
1252 throws org.exolab.castor.xml.ValidationException {
1253 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1254 validator.validate(this);