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;
18 * Class VamsasDocument.
20 * @version $Revision$ $Date$
22 public class VamsasDocument extends uk.ac.vamsas.client.Vobject
23 implements java.io.Serializable
27 //--------------------------/
28 //- Class/Member Variables -/
29 //--------------------------/
32 * Vamsas Document Version Number
34 private java.lang.String _version;
39 private uk.ac.vamsas.objects.core.LockFile _lockFile;
44 private uk.ac.vamsas.objects.core.Provenance _provenance;
47 * contains unassociated trees and a number of analysis sets
50 private java.util.Vector _VAMSASList;
53 * Field _applicationDataList.
55 private java.util.Vector _applicationDataList;
58 * Field _attachmentList.
60 private java.util.Vector _attachmentList;
67 public VamsasDocument() {
69 this._VAMSASList = new java.util.Vector();
70 this._applicationDataList = new java.util.Vector();
71 this._attachmentList = new java.util.Vector();
82 * @param vApplicationData
83 * @throws java.lang.IndexOutOfBoundsException if the index
84 * given is outside the bounds of the collection
86 public void addApplicationData(
87 final uk.ac.vamsas.objects.core.ApplicationData vApplicationData)
88 throws java.lang.IndexOutOfBoundsException {
89 this._applicationDataList.addElement(vApplicationData);
96 * @param vApplicationData
97 * @throws java.lang.IndexOutOfBoundsException if the index
98 * given is outside the bounds of the collection
100 public void addApplicationData(
102 final uk.ac.vamsas.objects.core.ApplicationData vApplicationData)
103 throws java.lang.IndexOutOfBoundsException {
104 this._applicationDataList.add(index, vApplicationData);
111 * @throws java.lang.IndexOutOfBoundsException if the index
112 * given is outside the bounds of the collection
114 public void addAttachment(
115 final uk.ac.vamsas.objects.core.Attachment vAttachment)
116 throws java.lang.IndexOutOfBoundsException {
117 this._attachmentList.addElement(vAttachment);
125 * @throws java.lang.IndexOutOfBoundsException if the index
126 * given is outside the bounds of the collection
128 public void addAttachment(
130 final uk.ac.vamsas.objects.core.Attachment vAttachment)
131 throws java.lang.IndexOutOfBoundsException {
132 this._attachmentList.add(index, vAttachment);
139 * @throws java.lang.IndexOutOfBoundsException if the index
140 * given is outside the bounds of the collection
142 public void addVAMSAS(
143 final uk.ac.vamsas.objects.core.VAMSAS vVAMSAS)
144 throws java.lang.IndexOutOfBoundsException {
145 this._VAMSASList.addElement(vVAMSAS);
153 * @throws java.lang.IndexOutOfBoundsException if the index
154 * given is outside the bounds of the collection
156 public void addVAMSAS(
158 final uk.ac.vamsas.objects.core.VAMSAS vVAMSAS)
159 throws java.lang.IndexOutOfBoundsException {
160 this._VAMSASList.add(index, vVAMSAS);
164 * Method enumerateApplicationData.
166 * @return an Enumeration over all
167 * uk.ac.vamsas.objects.core.ApplicationData elements
169 public java.util.Enumeration enumerateApplicationData(
171 return this._applicationDataList.elements();
175 * Method enumerateAttachment.
177 * @return an Enumeration over all
178 * uk.ac.vamsas.objects.core.Attachment elements
180 public java.util.Enumeration enumerateAttachment(
182 return this._attachmentList.elements();
186 * Method enumerateVAMSAS.
188 * @return an Enumeration over all
189 * uk.ac.vamsas.objects.core.VAMSAS elements
191 public java.util.Enumeration enumerateVAMSAS(
193 return this._VAMSASList.elements();
197 * Overrides the java.lang.Object.equals method.
200 * @return true if the objects are equal.
202 public boolean equals(
203 final java.lang.Object obj) {
207 if (super.equals(obj)==false)
210 if (obj instanceof VamsasDocument) {
212 VamsasDocument temp = (VamsasDocument)obj;
215 if (this._version != null) {
216 if (temp._version == null) return false;
217 if (this._version != temp._version) {
218 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._version);
219 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._version);
220 if (thcycle!=tmcycle) {
221 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._version); };
222 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._version); };
226 if (!this._version.equals(temp._version)) {
227 org.castor.util.CycleBreaker.releaseCycleHandle(this._version);
228 org.castor.util.CycleBreaker.releaseCycleHandle(temp._version);
231 org.castor.util.CycleBreaker.releaseCycleHandle(this._version);
232 org.castor.util.CycleBreaker.releaseCycleHandle(temp._version);
235 } else if (temp._version != null)
237 if (this._lockFile != null) {
238 if (temp._lockFile == null) return false;
239 if (this._lockFile != temp._lockFile) {
240 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._lockFile);
241 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._lockFile);
242 if (thcycle!=tmcycle) {
243 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._lockFile); };
244 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._lockFile); };
248 if (!this._lockFile.equals(temp._lockFile)) {
249 org.castor.util.CycleBreaker.releaseCycleHandle(this._lockFile);
250 org.castor.util.CycleBreaker.releaseCycleHandle(temp._lockFile);
253 org.castor.util.CycleBreaker.releaseCycleHandle(this._lockFile);
254 org.castor.util.CycleBreaker.releaseCycleHandle(temp._lockFile);
257 } else if (temp._lockFile != null)
259 if (this._provenance != null) {
260 if (temp._provenance == null) return false;
261 if (this._provenance != temp._provenance) {
262 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._provenance);
263 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._provenance);
264 if (thcycle!=tmcycle) {
265 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance); };
266 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance); };
270 if (!this._provenance.equals(temp._provenance)) {
271 org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
272 org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
275 org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
276 org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
279 } else if (temp._provenance != null)
281 if (this._VAMSASList != null) {
282 if (temp._VAMSASList == null) return false;
283 if (this._VAMSASList != temp._VAMSASList) {
284 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._VAMSASList);
285 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._VAMSASList);
286 if (thcycle!=tmcycle) {
287 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._VAMSASList); };
288 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._VAMSASList); };
292 if (!this._VAMSASList.equals(temp._VAMSASList)) {
293 org.castor.util.CycleBreaker.releaseCycleHandle(this._VAMSASList);
294 org.castor.util.CycleBreaker.releaseCycleHandle(temp._VAMSASList);
297 org.castor.util.CycleBreaker.releaseCycleHandle(this._VAMSASList);
298 org.castor.util.CycleBreaker.releaseCycleHandle(temp._VAMSASList);
301 } else if (temp._VAMSASList != null)
303 if (this._applicationDataList != null) {
304 if (temp._applicationDataList == null) return false;
305 if (this._applicationDataList != temp._applicationDataList) {
306 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._applicationDataList);
307 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._applicationDataList);
308 if (thcycle!=tmcycle) {
309 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._applicationDataList); };
310 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._applicationDataList); };
314 if (!this._applicationDataList.equals(temp._applicationDataList)) {
315 org.castor.util.CycleBreaker.releaseCycleHandle(this._applicationDataList);
316 org.castor.util.CycleBreaker.releaseCycleHandle(temp._applicationDataList);
319 org.castor.util.CycleBreaker.releaseCycleHandle(this._applicationDataList);
320 org.castor.util.CycleBreaker.releaseCycleHandle(temp._applicationDataList);
323 } else if (temp._applicationDataList != null)
325 if (this._attachmentList != null) {
326 if (temp._attachmentList == null) return false;
327 if (this._attachmentList != temp._attachmentList) {
328 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._attachmentList);
329 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._attachmentList);
330 if (thcycle!=tmcycle) {
331 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._attachmentList); };
332 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._attachmentList); };
336 if (!this._attachmentList.equals(temp._attachmentList)) {
337 org.castor.util.CycleBreaker.releaseCycleHandle(this._attachmentList);
338 org.castor.util.CycleBreaker.releaseCycleHandle(temp._attachmentList);
341 org.castor.util.CycleBreaker.releaseCycleHandle(this._attachmentList);
342 org.castor.util.CycleBreaker.releaseCycleHandle(temp._attachmentList);
345 } else if (temp._attachmentList != null)
353 * Method getApplicationData.
356 * @throws java.lang.IndexOutOfBoundsException if the index
357 * given is outside the bounds of the collection
358 * @return the value of the
359 * uk.ac.vamsas.objects.core.ApplicationData at the given index
361 public uk.ac.vamsas.objects.core.ApplicationData getApplicationData(
363 throws java.lang.IndexOutOfBoundsException {
364 // check bounds for index
365 if (index < 0 || index >= this._applicationDataList.size()) {
366 throw new IndexOutOfBoundsException("getApplicationData: Index value '" + index + "' not in range [0.." + (this._applicationDataList.size() - 1) + "]");
369 return (uk.ac.vamsas.objects.core.ApplicationData) _applicationDataList.get(index);
373 * Method getApplicationData.Returns the contents of the
374 * collection in an Array. <p>Note: Just in case the
375 * collection contents are changing in another thread, we pass
376 * a 0-length Array of the correct type into the API call.
377 * This way we <i>know</i> that the Array returned is of
378 * exactly the correct length.
380 * @return this collection as an Array
382 public uk.ac.vamsas.objects.core.ApplicationData[] getApplicationData(
384 uk.ac.vamsas.objects.core.ApplicationData[] array = new uk.ac.vamsas.objects.core.ApplicationData[0];
385 return (uk.ac.vamsas.objects.core.ApplicationData[]) this._applicationDataList.toArray(array);
389 * Method getApplicationDataAsReference.Returns a reference to
390 * '_applicationDataList'. No type checking is performed on any
391 * modifications to the Vector.
393 * @return a reference to the Vector backing this class
395 public java.util.Vector getApplicationDataAsReference(
397 return this._applicationDataList;
401 * Method getApplicationDataCount.
403 * @return the size of this collection
405 public int getApplicationDataCount(
407 return this._applicationDataList.size();
411 * Method getAttachment.
414 * @throws java.lang.IndexOutOfBoundsException if the index
415 * given is outside the bounds of the collection
416 * @return the value of the
417 * uk.ac.vamsas.objects.core.Attachment at the given index
419 public uk.ac.vamsas.objects.core.Attachment getAttachment(
421 throws java.lang.IndexOutOfBoundsException {
422 // check bounds for index
423 if (index < 0 || index >= this._attachmentList.size()) {
424 throw new IndexOutOfBoundsException("getAttachment: Index value '" + index + "' not in range [0.." + (this._attachmentList.size() - 1) + "]");
427 return (uk.ac.vamsas.objects.core.Attachment) _attachmentList.get(index);
431 * Method getAttachment.Returns the contents of the collection
432 * in an Array. <p>Note: Just in case the collection contents
433 * are changing in another thread, we pass a 0-length Array of
434 * the correct type into the API call. This way we <i>know</i>
435 * that the Array returned is of exactly the correct length.
437 * @return this collection as an Array
439 public uk.ac.vamsas.objects.core.Attachment[] getAttachment(
441 uk.ac.vamsas.objects.core.Attachment[] array = new uk.ac.vamsas.objects.core.Attachment[0];
442 return (uk.ac.vamsas.objects.core.Attachment[]) this._attachmentList.toArray(array);
446 * Method getAttachmentAsReference.Returns a reference to
447 * '_attachmentList'. No type checking is performed on any
448 * modifications to the Vector.
450 * @return a reference to the Vector backing this class
452 public java.util.Vector getAttachmentAsReference(
454 return this._attachmentList;
458 * Method getAttachmentCount.
460 * @return the size of this collection
462 public int getAttachmentCount(
464 return this._attachmentList.size();
468 * Returns the value of field 'lockFile'.
470 * @return the value of field 'LockFile'.
472 public uk.ac.vamsas.objects.core.LockFile getLockFile(
474 return this._lockFile;
478 * Returns the value of field 'provenance'.
480 * @return the value of field 'Provenance'.
482 public uk.ac.vamsas.objects.core.Provenance getProvenance(
484 return this._provenance;
491 * @throws java.lang.IndexOutOfBoundsException if the index
492 * given is outside the bounds of the collection
493 * @return the value of the uk.ac.vamsas.objects.core.VAMSAS at
496 public uk.ac.vamsas.objects.core.VAMSAS getVAMSAS(
498 throws java.lang.IndexOutOfBoundsException {
499 // check bounds for index
500 if (index < 0 || index >= this._VAMSASList.size()) {
501 throw new IndexOutOfBoundsException("getVAMSAS: Index value '" + index + "' not in range [0.." + (this._VAMSASList.size() - 1) + "]");
504 return (uk.ac.vamsas.objects.core.VAMSAS) _VAMSASList.get(index);
508 * Method getVAMSAS.Returns the contents of the collection in
509 * an Array. <p>Note: Just in case the collection contents
510 * are changing in another thread, we pass a 0-length Array of
511 * the correct type into the API call. This way we <i>know</i>
512 * that the Array returned is of exactly the correct length.
514 * @return this collection as an Array
516 public uk.ac.vamsas.objects.core.VAMSAS[] getVAMSAS(
518 uk.ac.vamsas.objects.core.VAMSAS[] array = new uk.ac.vamsas.objects.core.VAMSAS[0];
519 return (uk.ac.vamsas.objects.core.VAMSAS[]) this._VAMSASList.toArray(array);
523 * Method getVAMSASAsReference.Returns a reference to
524 * '_VAMSASList'. No type checking is performed on any
525 * modifications to the Vector.
527 * @return a reference to the Vector backing this class
529 public java.util.Vector getVAMSASAsReference(
531 return this._VAMSASList;
535 * Method getVAMSASCount.
537 * @return the size of this collection
539 public int getVAMSASCount(
541 return this._VAMSASList.size();
545 * Returns the value of field 'version'. The field 'version'
546 * has the following description: Vamsas Document Version
549 * @return the value of field 'Version'.
551 public java.lang.String getVersion(
553 return this._version;
557 * Overrides the java.lang.Object.hashCode method.
559 * The following steps came from <b>Effective Java Programming
560 * Language Guide</b> by Joshua Bloch, Chapter 3
562 * @return a hash code value for the object.
566 int result = super.hashCode();
570 && !org.castor.util.CycleBreaker.startingToCycle(_version)) {
571 result = 37 * result + _version.hashCode();
572 org.castor.util.CycleBreaker.releaseCycleHandle(_version);
574 if (_lockFile != null
575 && !org.castor.util.CycleBreaker.startingToCycle(_lockFile)) {
576 result = 37 * result + _lockFile.hashCode();
577 org.castor.util.CycleBreaker.releaseCycleHandle(_lockFile);
579 if (_provenance != null
580 && !org.castor.util.CycleBreaker.startingToCycle(_provenance)) {
581 result = 37 * result + _provenance.hashCode();
582 org.castor.util.CycleBreaker.releaseCycleHandle(_provenance);
584 if (_VAMSASList != null
585 && !org.castor.util.CycleBreaker.startingToCycle(_VAMSASList)) {
586 result = 37 * result + _VAMSASList.hashCode();
587 org.castor.util.CycleBreaker.releaseCycleHandle(_VAMSASList);
589 if (_applicationDataList != null
590 && !org.castor.util.CycleBreaker.startingToCycle(_applicationDataList)) {
591 result = 37 * result + _applicationDataList.hashCode();
592 org.castor.util.CycleBreaker.releaseCycleHandle(_applicationDataList);
594 if (_attachmentList != null
595 && !org.castor.util.CycleBreaker.startingToCycle(_attachmentList)) {
596 result = 37 * result + _attachmentList.hashCode();
597 org.castor.util.CycleBreaker.releaseCycleHandle(_attachmentList);
606 * @return true if this object is valid according to the schema
608 public boolean isValid(
612 } catch (org.exolab.castor.xml.ValidationException vex) {
622 * @throws org.exolab.castor.xml.MarshalException if object is
623 * null or if any SAXException is thrown during marshaling
624 * @throws org.exolab.castor.xml.ValidationException if this
625 * object is an invalid instance according to the schema
628 final java.io.Writer out)
629 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
630 Marshaller.marshal(this, out);
637 * @throws java.io.IOException if an IOException occurs during
639 * @throws org.exolab.castor.xml.ValidationException if this
640 * object is an invalid instance according to the schema
641 * @throws org.exolab.castor.xml.MarshalException if object is
642 * null or if any SAXException is thrown during marshaling
645 final org.xml.sax.ContentHandler handler)
646 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
647 Marshaller.marshal(this, handler);
652 public void removeAllApplicationData(
654 this._applicationDataList.clear();
659 public void removeAllAttachment(
661 this._attachmentList.clear();
666 public void removeAllVAMSAS(
668 this._VAMSASList.clear();
672 * Method removeApplicationData.
674 * @param vApplicationData
675 * @return true if the object was removed from the collection.
677 public boolean removeApplicationData(
678 final uk.ac.vamsas.objects.core.ApplicationData vApplicationData) {
679 boolean removed = _applicationDataList.remove(vApplicationData);
684 * Method removeApplicationDataAt.
687 * @return the element removed from the collection
689 public uk.ac.vamsas.objects.core.ApplicationData removeApplicationDataAt(
691 java.lang.Object obj = this._applicationDataList.remove(index);
692 return (uk.ac.vamsas.objects.core.ApplicationData) obj;
696 * Method removeAttachment.
699 * @return true if the object was removed from the collection.
701 public boolean removeAttachment(
702 final uk.ac.vamsas.objects.core.Attachment vAttachment) {
703 boolean removed = _attachmentList.remove(vAttachment);
708 * Method removeAttachmentAt.
711 * @return the element removed from the collection
713 public uk.ac.vamsas.objects.core.Attachment removeAttachmentAt(
715 java.lang.Object obj = this._attachmentList.remove(index);
716 return (uk.ac.vamsas.objects.core.Attachment) obj;
720 * Method removeVAMSAS.
723 * @return true if the object was removed from the collection.
725 public boolean removeVAMSAS(
726 final uk.ac.vamsas.objects.core.VAMSAS vVAMSAS) {
727 boolean removed = _VAMSASList.remove(vVAMSAS);
732 * Method removeVAMSASAt.
735 * @return the element removed from the collection
737 public uk.ac.vamsas.objects.core.VAMSAS removeVAMSASAt(
739 java.lang.Object obj = this._VAMSASList.remove(index);
740 return (uk.ac.vamsas.objects.core.VAMSAS) obj;
747 * @param vApplicationData
748 * @throws java.lang.IndexOutOfBoundsException if the index
749 * given is outside the bounds of the collection
751 public void setApplicationData(
753 final uk.ac.vamsas.objects.core.ApplicationData vApplicationData)
754 throws java.lang.IndexOutOfBoundsException {
755 // check bounds for index
756 if (index < 0 || index >= this._applicationDataList.size()) {
757 throw new IndexOutOfBoundsException("setApplicationData: Index value '" + index + "' not in range [0.." + (this._applicationDataList.size() - 1) + "]");
760 this._applicationDataList.set(index, vApplicationData);
766 * @param vApplicationDataArray
768 public void setApplicationData(
769 final uk.ac.vamsas.objects.core.ApplicationData[] vApplicationDataArray) {
771 _applicationDataList.clear();
773 for (int i = 0; i < vApplicationDataArray.length; i++) {
774 this._applicationDataList.add(vApplicationDataArray[i]);
779 * Sets the value of '_applicationDataList' by copying the
780 * given Vector. All elements will be checked for type safety.
782 * @param vApplicationDataList the Vector to copy.
784 public void setApplicationData(
785 final java.util.Vector vApplicationDataList) {
787 this._applicationDataList.clear();
789 this._applicationDataList.addAll(vApplicationDataList);
793 * Sets the value of '_applicationDataList' by setting it to
794 * the given Vector. No type checking is performed.
797 * @param applicationDataVector the Vector to set.
799 public void setApplicationDataAsReference(
800 final java.util.Vector applicationDataVector) {
801 this._applicationDataList = applicationDataVector;
809 * @throws java.lang.IndexOutOfBoundsException if the index
810 * given is outside the bounds of the collection
812 public void setAttachment(
814 final uk.ac.vamsas.objects.core.Attachment vAttachment)
815 throws java.lang.IndexOutOfBoundsException {
816 // check bounds for index
817 if (index < 0 || index >= this._attachmentList.size()) {
818 throw new IndexOutOfBoundsException("setAttachment: Index value '" + index + "' not in range [0.." + (this._attachmentList.size() - 1) + "]");
821 this._attachmentList.set(index, vAttachment);
827 * @param vAttachmentArray
829 public void setAttachment(
830 final uk.ac.vamsas.objects.core.Attachment[] vAttachmentArray) {
832 _attachmentList.clear();
834 for (int i = 0; i < vAttachmentArray.length; i++) {
835 this._attachmentList.add(vAttachmentArray[i]);
840 * Sets the value of '_attachmentList' by copying the given
841 * Vector. All elements will be checked for type safety.
843 * @param vAttachmentList the Vector to copy.
845 public void setAttachment(
846 final java.util.Vector vAttachmentList) {
848 this._attachmentList.clear();
850 this._attachmentList.addAll(vAttachmentList);
854 * Sets the value of '_attachmentList' by setting it to the
855 * given Vector. No type checking is performed.
858 * @param attachmentVector the Vector to set.
860 public void setAttachmentAsReference(
861 final java.util.Vector attachmentVector) {
862 this._attachmentList = attachmentVector;
866 * Sets the value of field 'lockFile'.
868 * @param lockFile the value of field 'lockFile'.
870 public void setLockFile(
871 final uk.ac.vamsas.objects.core.LockFile lockFile) {
872 this._lockFile = lockFile;
876 * Sets the value of field 'provenance'.
878 * @param provenance the value of field 'provenance'.
880 public void setProvenance(
881 final uk.ac.vamsas.objects.core.Provenance provenance) {
882 this._provenance = provenance;
890 * @throws java.lang.IndexOutOfBoundsException if the index
891 * given is outside the bounds of the collection
893 public void setVAMSAS(
895 final uk.ac.vamsas.objects.core.VAMSAS vVAMSAS)
896 throws java.lang.IndexOutOfBoundsException {
897 // check bounds for index
898 if (index < 0 || index >= this._VAMSASList.size()) {
899 throw new IndexOutOfBoundsException("setVAMSAS: Index value '" + index + "' not in range [0.." + (this._VAMSASList.size() - 1) + "]");
902 this._VAMSASList.set(index, vVAMSAS);
908 * @param vVAMSASArray
910 public void setVAMSAS(
911 final uk.ac.vamsas.objects.core.VAMSAS[] vVAMSASArray) {
915 for (int i = 0; i < vVAMSASArray.length; i++) {
916 this._VAMSASList.add(vVAMSASArray[i]);
921 * Sets the value of '_VAMSASList' by copying the given Vector.
922 * All elements will be checked for type safety.
924 * @param vVAMSASList the Vector to copy.
926 public void setVAMSAS(
927 final java.util.Vector vVAMSASList) {
929 this._VAMSASList.clear();
931 this._VAMSASList.addAll(vVAMSASList);
935 * Sets the value of '_VAMSASList' by setting it to the given
936 * Vector. No type checking is performed.
939 * @param VAMSASVector the Vector to set.
941 public void setVAMSASAsReference(
942 final java.util.Vector VAMSASVector) {
943 this._VAMSASList = VAMSASVector;
947 * Sets the value of field 'version'. The field 'version' has
948 * the following description: Vamsas Document Version Number
950 * @param version the value of field 'version'.
952 public void setVersion(
953 final java.lang.String version) {
954 this._version = version;
961 * @throws org.exolab.castor.xml.MarshalException if object is
962 * null or if any SAXException is thrown during marshaling
963 * @throws org.exolab.castor.xml.ValidationException if this
964 * object is an invalid instance according to the schema
965 * @return the unmarshaled
966 * uk.ac.vamsas.objects.core.VamsasDocument
968 public static uk.ac.vamsas.objects.core.VamsasDocument unmarshal(
969 final java.io.Reader reader)
970 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
971 return (uk.ac.vamsas.objects.core.VamsasDocument) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.VamsasDocument.class, reader);
977 * @throws org.exolab.castor.xml.ValidationException if this
978 * object is an invalid instance according to the schema
980 public void validate(
982 throws org.exolab.castor.xml.ValidationException {
983 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
984 validator.validate(this);