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