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