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