5c0e72a0bd7604a95650ebdddcc22e84f7d748a4
[vamsas.git] / src / uk / ac / vamsas / objects / core / Tree.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package uk.ac.vamsas.objects.core;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * Class Tree.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class Tree extends uk.ac.vamsas.client.Vobject 
23 implements java.io.Serializable
24 {
25
26
27       //--------------------------/
28      //- Class/Member Variables -/
29     //--------------------------/
30
31     /**
32      * Primary Key for vamsas object referencing 
33      */
34     private java.lang.String _id;
35
36     /**
37      * Field _modifiable.
38      */
39     private java.lang.String _modifiable;
40
41     /**
42      * Field _title.
43      */
44     private java.lang.String _title;
45
46     /**
47      * Field _newickList.
48      */
49     private java.util.Vector _newickList;
50
51     /**
52      * node identity and mapping data between tree representations
53      * and vamsas document objects
54      *  
55      */
56     private java.util.Vector _treenodeList;
57
58     /**
59      * Field _propertyList.
60      */
61     private java.util.Vector _propertyList;
62
63     /**
64      * Field _provenance.
65      */
66     private uk.ac.vamsas.objects.core.Provenance _provenance;
67
68
69       //----------------/
70      //- Constructors -/
71     //----------------/
72
73     public Tree() {
74         super();
75         this._newickList = new java.util.Vector();
76         this._treenodeList = new java.util.Vector();
77         this._propertyList = new java.util.Vector();
78     }
79
80
81       //-----------/
82      //- Methods -/
83     //-----------/
84
85     /**
86      * 
87      * 
88      * @param vNewick
89      * @throws java.lang.IndexOutOfBoundsException if the index
90      * given is outside the bounds of the collection
91      */
92     public void addNewick(
93             final uk.ac.vamsas.objects.core.Newick vNewick)
94     throws java.lang.IndexOutOfBoundsException {
95         this._newickList.addElement(vNewick);
96     }
97
98     /**
99      * 
100      * 
101      * @param index
102      * @param vNewick
103      * @throws java.lang.IndexOutOfBoundsException if the index
104      * given is outside the bounds of the collection
105      */
106     public void addNewick(
107             final int index,
108             final uk.ac.vamsas.objects.core.Newick vNewick)
109     throws java.lang.IndexOutOfBoundsException {
110         this._newickList.add(index, vNewick);
111     }
112
113     /**
114      * 
115      * 
116      * @param vProperty
117      * @throws java.lang.IndexOutOfBoundsException if the index
118      * given is outside the bounds of the collection
119      */
120     public void addProperty(
121             final uk.ac.vamsas.objects.core.Property vProperty)
122     throws java.lang.IndexOutOfBoundsException {
123         this._propertyList.addElement(vProperty);
124     }
125
126     /**
127      * 
128      * 
129      * @param index
130      * @param vProperty
131      * @throws java.lang.IndexOutOfBoundsException if the index
132      * given is outside the bounds of the collection
133      */
134     public void addProperty(
135             final int index,
136             final uk.ac.vamsas.objects.core.Property vProperty)
137     throws java.lang.IndexOutOfBoundsException {
138         this._propertyList.add(index, vProperty);
139     }
140
141     /**
142      * 
143      * 
144      * @param vTreenode
145      * @throws java.lang.IndexOutOfBoundsException if the index
146      * given is outside the bounds of the collection
147      */
148     public void addTreenode(
149             final uk.ac.vamsas.objects.core.Treenode vTreenode)
150     throws java.lang.IndexOutOfBoundsException {
151         this._treenodeList.addElement(vTreenode);
152     }
153
154     /**
155      * 
156      * 
157      * @param index
158      * @param vTreenode
159      * @throws java.lang.IndexOutOfBoundsException if the index
160      * given is outside the bounds of the collection
161      */
162     public void addTreenode(
163             final int index,
164             final uk.ac.vamsas.objects.core.Treenode vTreenode)
165     throws java.lang.IndexOutOfBoundsException {
166         this._treenodeList.add(index, vTreenode);
167     }
168
169     /**
170      * Method enumerateNewick.
171      * 
172      * @return an Enumeration over all
173      * uk.ac.vamsas.objects.core.Newick elements
174      */
175     public java.util.Enumeration enumerateNewick(
176     ) {
177         return this._newickList.elements();
178     }
179
180     /**
181      * Method enumerateProperty.
182      * 
183      * @return an Enumeration over all
184      * uk.ac.vamsas.objects.core.Property elements
185      */
186     public java.util.Enumeration enumerateProperty(
187     ) {
188         return this._propertyList.elements();
189     }
190
191     /**
192      * Method enumerateTreenode.
193      * 
194      * @return an Enumeration over all
195      * uk.ac.vamsas.objects.core.Treenode elements
196      */
197     public java.util.Enumeration enumerateTreenode(
198     ) {
199         return this._treenodeList.elements();
200     }
201
202     /**
203      * Overrides the java.lang.Object.equals method.
204      * 
205      * @param obj
206      * @return true if the objects are equal.
207      */
208     public boolean equals(
209             final java.lang.Object obj) {
210         if ( this == obj )
211             return true;
212         
213         if (super.equals(obj)==false)
214             return false;
215         
216         if (obj instanceof Tree) {
217         
218             Tree temp = (Tree)obj;
219             if (this._id != null) {
220                 if (temp._id == null) return false;
221                 else if (!(this._id.equals(temp._id))) 
222                     return false;
223             }
224             else if (temp._id != null)
225                 return false;
226             if (this._modifiable != null) {
227                 if (temp._modifiable == null) return false;
228                 else if (!(this._modifiable.equals(temp._modifiable))) 
229                     return false;
230             }
231             else if (temp._modifiable != null)
232                 return false;
233             if (this._title != null) {
234                 if (temp._title == null) return false;
235                 else if (!(this._title.equals(temp._title))) 
236                     return false;
237             }
238             else if (temp._title != null)
239                 return false;
240             if (this._newickList != null) {
241                 if (temp._newickList == null) return false;
242                 else if (!(this._newickList.equals(temp._newickList))) 
243                     return false;
244             }
245             else if (temp._newickList != null)
246                 return false;
247             if (this._treenodeList != null) {
248                 if (temp._treenodeList == null) return false;
249                 else if (!(this._treenodeList.equals(temp._treenodeList))) 
250                     return false;
251             }
252             else if (temp._treenodeList != null)
253                 return false;
254             if (this._propertyList != null) {
255                 if (temp._propertyList == null) return false;
256                 else if (!(this._propertyList.equals(temp._propertyList))) 
257                     return false;
258             }
259             else if (temp._propertyList != null)
260                 return false;
261             if (this._provenance != null) {
262                 if (temp._provenance == null) return false;
263                 else if (!(this._provenance.equals(temp._provenance))) 
264                     return false;
265             }
266             else if (temp._provenance != null)
267                 return false;
268             return true;
269         }
270         return false;
271     }
272
273     /**
274      * Returns the value of field 'id'. The field 'id' has the
275      * following description: Primary Key for vamsas object
276      * referencing 
277      * 
278      * @return the value of field 'Id'.
279      */
280     public java.lang.String getId(
281     ) {
282         return this._id;
283     }
284
285     /**
286      * Returns the value of field 'modifiable'.
287      * 
288      * @return the value of field 'Modifiable'.
289      */
290     public java.lang.String getModifiable(
291     ) {
292         return this._modifiable;
293     }
294
295     /**
296      * Method getNewick.
297      * 
298      * @param index
299      * @throws java.lang.IndexOutOfBoundsException if the index
300      * given is outside the bounds of the collection
301      * @return the value of the uk.ac.vamsas.objects.core.Newick at
302      * the given index
303      */
304     public uk.ac.vamsas.objects.core.Newick getNewick(
305             final int index)
306     throws java.lang.IndexOutOfBoundsException {
307         // check bounds for index
308         if (index < 0 || index >= this._newickList.size()) {
309             throw new IndexOutOfBoundsException("getNewick: Index value '" + index + "' not in range [0.." + (this._newickList.size() - 1) + "]");
310         }
311         
312         return (uk.ac.vamsas.objects.core.Newick) _newickList.get(index);
313     }
314
315     /**
316      * Method getNewick.Returns the contents of the collection in
317      * an Array.  <p>Note:  Just in case the collection contents
318      * are changing in another thread, we pass a 0-length Array of
319      * the correct type into the API call.  This way we <i>know</i>
320      * that the Array returned is of exactly the correct length.
321      * 
322      * @return this collection as an Array
323      */
324     public uk.ac.vamsas.objects.core.Newick[] getNewick(
325     ) {
326         uk.ac.vamsas.objects.core.Newick[] array = new uk.ac.vamsas.objects.core.Newick[0];
327         return (uk.ac.vamsas.objects.core.Newick[]) this._newickList.toArray(array);
328     }
329
330     /**
331      * Method getNewickAsReference.Returns a reference to
332      * '_newickList'. No type checking is performed on any
333      * modifications to the Vector.
334      * 
335      * @return a reference to the Vector backing this class
336      */
337     public java.util.Vector getNewickAsReference(
338     ) {
339         return this._newickList;
340     }
341
342     /**
343      * Method getNewickCount.
344      * 
345      * @return the size of this collection
346      */
347     public int getNewickCount(
348     ) {
349         return this._newickList.size();
350     }
351
352     /**
353      * Method getProperty.
354      * 
355      * @param index
356      * @throws java.lang.IndexOutOfBoundsException if the index
357      * given is outside the bounds of the collection
358      * @return the value of the uk.ac.vamsas.objects.core.Property
359      * at the given index
360      */
361     public uk.ac.vamsas.objects.core.Property getProperty(
362             final int index)
363     throws java.lang.IndexOutOfBoundsException {
364         // check bounds for index
365         if (index < 0 || index >= this._propertyList.size()) {
366             throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
367         }
368         
369         return (uk.ac.vamsas.objects.core.Property) _propertyList.get(index);
370     }
371
372     /**
373      * Method getProperty.Returns the contents of the collection in
374      * an Array.  <p>Note:  Just in case the collection contents
375      * are changing in another thread, we pass a 0-length Array of
376      * the correct type into the API call.  This way we <i>know</i>
377      * that the Array returned is of exactly the correct length.
378      * 
379      * @return this collection as an Array
380      */
381     public uk.ac.vamsas.objects.core.Property[] getProperty(
382     ) {
383         uk.ac.vamsas.objects.core.Property[] array = new uk.ac.vamsas.objects.core.Property[0];
384         return (uk.ac.vamsas.objects.core.Property[]) this._propertyList.toArray(array);
385     }
386
387     /**
388      * Method getPropertyAsReference.Returns a reference to
389      * '_propertyList'. No type checking is performed on any
390      * modifications to the Vector.
391      * 
392      * @return a reference to the Vector backing this class
393      */
394     public java.util.Vector getPropertyAsReference(
395     ) {
396         return this._propertyList;
397     }
398
399     /**
400      * Method getPropertyCount.
401      * 
402      * @return the size of this collection
403      */
404     public int getPropertyCount(
405     ) {
406         return this._propertyList.size();
407     }
408
409     /**
410      * Returns the value of field 'provenance'.
411      * 
412      * @return the value of field 'Provenance'.
413      */
414     public uk.ac.vamsas.objects.core.Provenance getProvenance(
415     ) {
416         return this._provenance;
417     }
418
419     /**
420      * Returns the value of field 'title'.
421      * 
422      * @return the value of field 'Title'.
423      */
424     public java.lang.String getTitle(
425     ) {
426         return this._title;
427     }
428
429     /**
430      * Method getTreenode.
431      * 
432      * @param index
433      * @throws java.lang.IndexOutOfBoundsException if the index
434      * given is outside the bounds of the collection
435      * @return the value of the uk.ac.vamsas.objects.core.Treenode
436      * at the given index
437      */
438     public uk.ac.vamsas.objects.core.Treenode getTreenode(
439             final int index)
440     throws java.lang.IndexOutOfBoundsException {
441         // check bounds for index
442         if (index < 0 || index >= this._treenodeList.size()) {
443             throw new IndexOutOfBoundsException("getTreenode: Index value '" + index + "' not in range [0.." + (this._treenodeList.size() - 1) + "]");
444         }
445         
446         return (uk.ac.vamsas.objects.core.Treenode) _treenodeList.get(index);
447     }
448
449     /**
450      * Method getTreenode.Returns the contents of the collection in
451      * an Array.  <p>Note:  Just in case the collection contents
452      * are changing in another thread, we pass a 0-length Array of
453      * the correct type into the API call.  This way we <i>know</i>
454      * that the Array returned is of exactly the correct length.
455      * 
456      * @return this collection as an Array
457      */
458     public uk.ac.vamsas.objects.core.Treenode[] getTreenode(
459     ) {
460         uk.ac.vamsas.objects.core.Treenode[] array = new uk.ac.vamsas.objects.core.Treenode[0];
461         return (uk.ac.vamsas.objects.core.Treenode[]) this._treenodeList.toArray(array);
462     }
463
464     /**
465      * Method getTreenodeAsReference.Returns a reference to
466      * '_treenodeList'. No type checking is performed on any
467      * modifications to the Vector.
468      * 
469      * @return a reference to the Vector backing this class
470      */
471     public java.util.Vector getTreenodeAsReference(
472     ) {
473         return this._treenodeList;
474     }
475
476     /**
477      * Method getTreenodeCount.
478      * 
479      * @return the size of this collection
480      */
481     public int getTreenodeCount(
482     ) {
483         return this._treenodeList.size();
484     }
485
486     /**
487      * Overrides the java.lang.Object.hashCode method.
488      * <p>
489      * The following steps came from <b>Effective Java Programming
490      * Language Guide</b> by Joshua Bloch, Chapter 3
491      * 
492      * @return a hash code value for the object.
493      */
494     public int hashCode(
495     ) {
496         int result = super.hashCode();
497         
498         long tmp;
499         if (_id != null) {
500            result = 37 * result + _id.hashCode();
501         }
502         if (_modifiable != null) {
503            result = 37 * result + _modifiable.hashCode();
504         }
505         if (_title != null) {
506            result = 37 * result + _title.hashCode();
507         }
508         if (_newickList != null) {
509            result = 37 * result + _newickList.hashCode();
510         }
511         if (_treenodeList != null) {
512            result = 37 * result + _treenodeList.hashCode();
513         }
514         if (_propertyList != null) {
515            result = 37 * result + _propertyList.hashCode();
516         }
517         if (_provenance != null) {
518            result = 37 * result + _provenance.hashCode();
519         }
520         
521         return result;
522     }
523
524     /**
525      * Method isValid.
526      * 
527      * @return true if this object is valid according to the schema
528      */
529     public boolean isValid(
530     ) {
531         try {
532             validate();
533         } catch (org.exolab.castor.xml.ValidationException vex) {
534             return false;
535         }
536         return true;
537     }
538
539     /**
540      * 
541      * 
542      * @param out
543      * @throws org.exolab.castor.xml.MarshalException if object is
544      * null or if any SAXException is thrown during marshaling
545      * @throws org.exolab.castor.xml.ValidationException if this
546      * object is an invalid instance according to the schema
547      */
548     public void marshal(
549             final java.io.Writer out)
550     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
551         Marshaller.marshal(this, out);
552     }
553
554     /**
555      * 
556      * 
557      * @param handler
558      * @throws java.io.IOException if an IOException occurs during
559      * marshaling
560      * @throws org.exolab.castor.xml.ValidationException if this
561      * object is an invalid instance according to the schema
562      * @throws org.exolab.castor.xml.MarshalException if object is
563      * null or if any SAXException is thrown during marshaling
564      */
565     public void marshal(
566             final org.xml.sax.ContentHandler handler)
567     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
568         Marshaller.marshal(this, handler);
569     }
570
571     /**
572      */
573     public void removeAllNewick(
574     ) {
575         this._newickList.clear();
576     }
577
578     /**
579      */
580     public void removeAllProperty(
581     ) {
582         this._propertyList.clear();
583     }
584
585     /**
586      */
587     public void removeAllTreenode(
588     ) {
589         this._treenodeList.clear();
590     }
591
592     /**
593      * Method removeNewick.
594      * 
595      * @param vNewick
596      * @return true if the object was removed from the collection.
597      */
598     public boolean removeNewick(
599             final uk.ac.vamsas.objects.core.Newick vNewick) {
600         boolean removed = _newickList.remove(vNewick);
601         return removed;
602     }
603
604     /**
605      * Method removeNewickAt.
606      * 
607      * @param index
608      * @return the element removed from the collection
609      */
610     public uk.ac.vamsas.objects.core.Newick removeNewickAt(
611             final int index) {
612         java.lang.Object obj = this._newickList.remove(index);
613         return (uk.ac.vamsas.objects.core.Newick) obj;
614     }
615
616     /**
617      * Method removeProperty.
618      * 
619      * @param vProperty
620      * @return true if the object was removed from the collection.
621      */
622     public boolean removeProperty(
623             final uk.ac.vamsas.objects.core.Property vProperty) {
624         boolean removed = _propertyList.remove(vProperty);
625         return removed;
626     }
627
628     /**
629      * Method removePropertyAt.
630      * 
631      * @param index
632      * @return the element removed from the collection
633      */
634     public uk.ac.vamsas.objects.core.Property removePropertyAt(
635             final int index) {
636         java.lang.Object obj = this._propertyList.remove(index);
637         return (uk.ac.vamsas.objects.core.Property) obj;
638     }
639
640     /**
641      * Method removeTreenode.
642      * 
643      * @param vTreenode
644      * @return true if the object was removed from the collection.
645      */
646     public boolean removeTreenode(
647             final uk.ac.vamsas.objects.core.Treenode vTreenode) {
648         boolean removed = _treenodeList.remove(vTreenode);
649         return removed;
650     }
651
652     /**
653      * Method removeTreenodeAt.
654      * 
655      * @param index
656      * @return the element removed from the collection
657      */
658     public uk.ac.vamsas.objects.core.Treenode removeTreenodeAt(
659             final int index) {
660         java.lang.Object obj = this._treenodeList.remove(index);
661         return (uk.ac.vamsas.objects.core.Treenode) obj;
662     }
663
664     /**
665      * Sets the value of field 'id'. The field 'id' has the
666      * following description: Primary Key for vamsas object
667      * referencing 
668      * 
669      * @param id the value of field 'id'.
670      */
671     public void setId(
672             final java.lang.String id) {
673         this._id = id;
674     }
675
676     /**
677      * Sets the value of field 'modifiable'.
678      * 
679      * @param modifiable the value of field 'modifiable'.
680      */
681     public void setModifiable(
682             final java.lang.String modifiable) {
683         this._modifiable = modifiable;
684     }
685
686     /**
687      * 
688      * 
689      * @param index
690      * @param vNewick
691      * @throws java.lang.IndexOutOfBoundsException if the index
692      * given is outside the bounds of the collection
693      */
694     public void setNewick(
695             final int index,
696             final uk.ac.vamsas.objects.core.Newick vNewick)
697     throws java.lang.IndexOutOfBoundsException {
698         // check bounds for index
699         if (index < 0 || index >= this._newickList.size()) {
700             throw new IndexOutOfBoundsException("setNewick: Index value '" + index + "' not in range [0.." + (this._newickList.size() - 1) + "]");
701         }
702         
703         this._newickList.set(index, vNewick);
704     }
705
706     /**
707      * 
708      * 
709      * @param vNewickArray
710      */
711     public void setNewick(
712             final uk.ac.vamsas.objects.core.Newick[] vNewickArray) {
713         //-- copy array
714         _newickList.clear();
715         
716         for (int i = 0; i < vNewickArray.length; i++) {
717                 this._newickList.add(vNewickArray[i]);
718         }
719     }
720
721     /**
722      * Sets the value of '_newickList' by copying the given Vector.
723      * All elements will be checked for type safety.
724      * 
725      * @param vNewickList the Vector to copy.
726      */
727     public void setNewick(
728             final java.util.Vector vNewickList) {
729         // copy vector
730         this._newickList.clear();
731         
732         this._newickList.addAll(vNewickList);
733     }
734
735     /**
736      * Sets the value of '_newickList' by setting it to the given
737      * Vector. No type checking is performed.
738      * @deprecated
739      * 
740      * @param newickVector the Vector to set.
741      */
742     public void setNewickAsReference(
743             final java.util.Vector newickVector) {
744         this._newickList = newickVector;
745     }
746
747     /**
748      * 
749      * 
750      * @param index
751      * @param vProperty
752      * @throws java.lang.IndexOutOfBoundsException if the index
753      * given is outside the bounds of the collection
754      */
755     public void setProperty(
756             final int index,
757             final uk.ac.vamsas.objects.core.Property vProperty)
758     throws java.lang.IndexOutOfBoundsException {
759         // check bounds for index
760         if (index < 0 || index >= this._propertyList.size()) {
761             throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
762         }
763         
764         this._propertyList.set(index, vProperty);
765     }
766
767     /**
768      * 
769      * 
770      * @param vPropertyArray
771      */
772     public void setProperty(
773             final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {
774         //-- copy array
775         _propertyList.clear();
776         
777         for (int i = 0; i < vPropertyArray.length; i++) {
778                 this._propertyList.add(vPropertyArray[i]);
779         }
780     }
781
782     /**
783      * Sets the value of '_propertyList' by copying the given
784      * Vector. All elements will be checked for type safety.
785      * 
786      * @param vPropertyList the Vector to copy.
787      */
788     public void setProperty(
789             final java.util.Vector vPropertyList) {
790         // copy vector
791         this._propertyList.clear();
792         
793         this._propertyList.addAll(vPropertyList);
794     }
795
796     /**
797      * Sets the value of '_propertyList' by setting it to the given
798      * Vector. No type checking is performed.
799      * @deprecated
800      * 
801      * @param propertyVector the Vector to set.
802      */
803     public void setPropertyAsReference(
804             final java.util.Vector propertyVector) {
805         this._propertyList = propertyVector;
806     }
807
808     /**
809      * Sets the value of field 'provenance'.
810      * 
811      * @param provenance the value of field 'provenance'.
812      */
813     public void setProvenance(
814             final uk.ac.vamsas.objects.core.Provenance provenance) {
815         this._provenance = provenance;
816     }
817
818     /**
819      * Sets the value of field 'title'.
820      * 
821      * @param title the value of field 'title'.
822      */
823     public void setTitle(
824             final java.lang.String title) {
825         this._title = title;
826     }
827
828     /**
829      * 
830      * 
831      * @param index
832      * @param vTreenode
833      * @throws java.lang.IndexOutOfBoundsException if the index
834      * given is outside the bounds of the collection
835      */
836     public void setTreenode(
837             final int index,
838             final uk.ac.vamsas.objects.core.Treenode vTreenode)
839     throws java.lang.IndexOutOfBoundsException {
840         // check bounds for index
841         if (index < 0 || index >= this._treenodeList.size()) {
842             throw new IndexOutOfBoundsException("setTreenode: Index value '" + index + "' not in range [0.." + (this._treenodeList.size() - 1) + "]");
843         }
844         
845         this._treenodeList.set(index, vTreenode);
846     }
847
848     /**
849      * 
850      * 
851      * @param vTreenodeArray
852      */
853     public void setTreenode(
854             final uk.ac.vamsas.objects.core.Treenode[] vTreenodeArray) {
855         //-- copy array
856         _treenodeList.clear();
857         
858         for (int i = 0; i < vTreenodeArray.length; i++) {
859                 this._treenodeList.add(vTreenodeArray[i]);
860         }
861     }
862
863     /**
864      * Sets the value of '_treenodeList' by copying the given
865      * Vector. All elements will be checked for type safety.
866      * 
867      * @param vTreenodeList the Vector to copy.
868      */
869     public void setTreenode(
870             final java.util.Vector vTreenodeList) {
871         // copy vector
872         this._treenodeList.clear();
873         
874         this._treenodeList.addAll(vTreenodeList);
875     }
876
877     /**
878      * Sets the value of '_treenodeList' by setting it to the given
879      * Vector. No type checking is performed.
880      * @deprecated
881      * 
882      * @param treenodeVector the Vector to set.
883      */
884     public void setTreenodeAsReference(
885             final java.util.Vector treenodeVector) {
886         this._treenodeList = treenodeVector;
887     }
888
889     /**
890      * Method unmarshal.
891      * 
892      * @param reader
893      * @throws org.exolab.castor.xml.MarshalException if object is
894      * null or if any SAXException is thrown during marshaling
895      * @throws org.exolab.castor.xml.ValidationException if this
896      * object is an invalid instance according to the schema
897      * @return the unmarshaled uk.ac.vamsas.objects.core.Tree
898      */
899     public static uk.ac.vamsas.objects.core.Tree unmarshal(
900             final java.io.Reader reader)
901     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
902         return (uk.ac.vamsas.objects.core.Tree) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Tree.class, reader);
903     }
904
905     /**
906      * 
907      * 
908      * @throws org.exolab.castor.xml.ValidationException if this
909      * object is an invalid instance according to the schema
910      */
911     public void validate(
912     )
913     throws org.exolab.castor.xml.ValidationException {
914         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
915         validator.validate(this);
916     }
917
918 }