applied LGPLv3 and source code formatting.
[vamsas.git] / src / uk / ac / vamsas / objects / core / Entry.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 Entry.
33  * 
34  * @version $Revision$ $Date: 2007-06-28 14:51:44 +0100 (Thu, 28 Jun 2007)
35  *          $
36  */
37 public class Entry extends uk.ac.vamsas.client.Vobject implements
38     java.io.Serializable {
39
40   // --------------------------/
41   // - Class/Member Variables -/
42   // --------------------------/
43
44   /**
45    * Primary Key for vamsas object referencing
46    * 
47    */
48   private java.lang.String _id;
49
50   /**
51    * Who
52    */
53   private java.lang.String _user;
54
55   /**
56    * With which application
57    */
58   private java.lang.String _app;
59
60   /**
61    * Did what
62    */
63   private java.lang.String _action;
64
65   /**
66    * When
67    */
68   private java.util.Date _date;
69
70   /**
71    * additional information
72    */
73   private java.util.Vector _propertyList;
74
75   /**
76    * parameter for the action
77    */
78   private java.util.Vector _paramList;
79
80   /**
81    * bioinformatic objects input to action
82    * 
83    */
84   private java.util.Vector _inputList;
85
86   // ----------------/
87   // - Constructors -/
88   // ----------------/
89
90   public Entry() {
91     super();
92     this._propertyList = new java.util.Vector();
93     this._paramList = new java.util.Vector();
94     this._inputList = new java.util.Vector();
95   }
96
97   // -----------/
98   // - Methods -/
99   // -----------/
100
101   /**
102    * 
103    * 
104    * @param vInput
105    * @throws java.lang.IndexOutOfBoundsException
106    *           if the index given is outside the bounds of the collection
107    */
108   public void addInput(final uk.ac.vamsas.objects.core.Input vInput)
109       throws java.lang.IndexOutOfBoundsException {
110     this._inputList.addElement(vInput);
111   }
112
113   /**
114    * 
115    * 
116    * @param index
117    * @param vInput
118    * @throws java.lang.IndexOutOfBoundsException
119    *           if the index given is outside the bounds of the collection
120    */
121   public void addInput(final int index,
122       final uk.ac.vamsas.objects.core.Input vInput)
123       throws java.lang.IndexOutOfBoundsException {
124     this._inputList.add(index, vInput);
125   }
126
127   /**
128    * 
129    * 
130    * @param vParam
131    * @throws java.lang.IndexOutOfBoundsException
132    *           if the index given is outside the bounds of the collection
133    */
134   public void addParam(final uk.ac.vamsas.objects.core.Param vParam)
135       throws java.lang.IndexOutOfBoundsException {
136     this._paramList.addElement(vParam);
137   }
138
139   /**
140    * 
141    * 
142    * @param index
143    * @param vParam
144    * @throws java.lang.IndexOutOfBoundsException
145    *           if the index given is outside the bounds of the collection
146    */
147   public void addParam(final int index,
148       final uk.ac.vamsas.objects.core.Param vParam)
149       throws java.lang.IndexOutOfBoundsException {
150     this._paramList.add(index, vParam);
151   }
152
153   /**
154    * 
155    * 
156    * @param vProperty
157    * @throws java.lang.IndexOutOfBoundsException
158    *           if the index given is outside the bounds of the collection
159    */
160   public void addProperty(final uk.ac.vamsas.objects.core.Property vProperty)
161       throws java.lang.IndexOutOfBoundsException {
162     this._propertyList.addElement(vProperty);
163   }
164
165   /**
166    * 
167    * 
168    * @param index
169    * @param vProperty
170    * @throws java.lang.IndexOutOfBoundsException
171    *           if the index given is outside the bounds of the collection
172    */
173   public void addProperty(final int index,
174       final uk.ac.vamsas.objects.core.Property vProperty)
175       throws java.lang.IndexOutOfBoundsException {
176     this._propertyList.add(index, vProperty);
177   }
178
179   /**
180    * Method enumerateInput.
181    * 
182    * @return an Enumeration over all uk.ac.vamsas.objects.core.Input elements
183    */
184   public java.util.Enumeration enumerateInput() {
185     return this._inputList.elements();
186   }
187
188   /**
189    * Method enumerateParam.
190    * 
191    * @return an Enumeration over all uk.ac.vamsas.objects.core.Param elements
192    */
193   public java.util.Enumeration enumerateParam() {
194     return this._paramList.elements();
195   }
196
197   /**
198    * Method enumerateProperty.
199    * 
200    * @return an Enumeration over all uk.ac.vamsas.objects.core.Property elements
201    */
202   public java.util.Enumeration enumerateProperty() {
203     return this._propertyList.elements();
204   }
205
206   /**
207    * Overrides the java.lang.Object.equals method.
208    * 
209    * @param obj
210    * @return true if the objects are equal.
211    */
212   public boolean equals(final java.lang.Object obj) {
213     if (this == obj)
214       return true;
215
216     if (super.equals(obj) == false)
217       return false;
218
219     if (obj instanceof Entry) {
220
221       Entry temp = (Entry) obj;
222       boolean thcycle;
223       boolean tmcycle;
224       if (this._id != null) {
225         if (temp._id == null)
226           return false;
227         if (this._id != temp._id) {
228           thcycle = org.castor.util.CycleBreaker.startingToCycle(this._id);
229           tmcycle = org.castor.util.CycleBreaker.startingToCycle(temp._id);
230           if (thcycle != tmcycle) {
231             if (!thcycle) {
232               org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
233             }
234             ;
235             if (!tmcycle) {
236               org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
237             }
238             ;
239             return false;
240           }
241           if (!thcycle) {
242             if (!this._id.equals(temp._id)) {
243               org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
244               org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
245               return false;
246             }
247             org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
248             org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
249           }
250         }
251       } else if (temp._id != null)
252         return false;
253       if (this._user != null) {
254         if (temp._user == null)
255           return false;
256         if (this._user != temp._user) {
257           thcycle = org.castor.util.CycleBreaker.startingToCycle(this._user);
258           tmcycle = org.castor.util.CycleBreaker.startingToCycle(temp._user);
259           if (thcycle != tmcycle) {
260             if (!thcycle) {
261               org.castor.util.CycleBreaker.releaseCycleHandle(this._user);
262             }
263             ;
264             if (!tmcycle) {
265               org.castor.util.CycleBreaker.releaseCycleHandle(temp._user);
266             }
267             ;
268             return false;
269           }
270           if (!thcycle) {
271             if (!this._user.equals(temp._user)) {
272               org.castor.util.CycleBreaker.releaseCycleHandle(this._user);
273               org.castor.util.CycleBreaker.releaseCycleHandle(temp._user);
274               return false;
275             }
276             org.castor.util.CycleBreaker.releaseCycleHandle(this._user);
277             org.castor.util.CycleBreaker.releaseCycleHandle(temp._user);
278           }
279         }
280       } else if (temp._user != null)
281         return false;
282       if (this._app != null) {
283         if (temp._app == null)
284           return false;
285         if (this._app != temp._app) {
286           thcycle = org.castor.util.CycleBreaker.startingToCycle(this._app);
287           tmcycle = org.castor.util.CycleBreaker.startingToCycle(temp._app);
288           if (thcycle != tmcycle) {
289             if (!thcycle) {
290               org.castor.util.CycleBreaker.releaseCycleHandle(this._app);
291             }
292             ;
293             if (!tmcycle) {
294               org.castor.util.CycleBreaker.releaseCycleHandle(temp._app);
295             }
296             ;
297             return false;
298           }
299           if (!thcycle) {
300             if (!this._app.equals(temp._app)) {
301               org.castor.util.CycleBreaker.releaseCycleHandle(this._app);
302               org.castor.util.CycleBreaker.releaseCycleHandle(temp._app);
303               return false;
304             }
305             org.castor.util.CycleBreaker.releaseCycleHandle(this._app);
306             org.castor.util.CycleBreaker.releaseCycleHandle(temp._app);
307           }
308         }
309       } else if (temp._app != null)
310         return false;
311       if (this._action != null) {
312         if (temp._action == null)
313           return false;
314         if (this._action != temp._action) {
315           thcycle = org.castor.util.CycleBreaker.startingToCycle(this._action);
316           tmcycle = org.castor.util.CycleBreaker.startingToCycle(temp._action);
317           if (thcycle != tmcycle) {
318             if (!thcycle) {
319               org.castor.util.CycleBreaker.releaseCycleHandle(this._action);
320             }
321             ;
322             if (!tmcycle) {
323               org.castor.util.CycleBreaker.releaseCycleHandle(temp._action);
324             }
325             ;
326             return false;
327           }
328           if (!thcycle) {
329             if (!this._action.equals(temp._action)) {
330               org.castor.util.CycleBreaker.releaseCycleHandle(this._action);
331               org.castor.util.CycleBreaker.releaseCycleHandle(temp._action);
332               return false;
333             }
334             org.castor.util.CycleBreaker.releaseCycleHandle(this._action);
335             org.castor.util.CycleBreaker.releaseCycleHandle(temp._action);
336           }
337         }
338       } else if (temp._action != null)
339         return false;
340       if (this._date != null) {
341         if (temp._date == null)
342           return false;
343         if (this._date != temp._date) {
344           thcycle = org.castor.util.CycleBreaker.startingToCycle(this._date);
345           tmcycle = org.castor.util.CycleBreaker.startingToCycle(temp._date);
346           if (thcycle != tmcycle) {
347             if (!thcycle) {
348               org.castor.util.CycleBreaker.releaseCycleHandle(this._date);
349             }
350             ;
351             if (!tmcycle) {
352               org.castor.util.CycleBreaker.releaseCycleHandle(temp._date);
353             }
354             ;
355             return false;
356           }
357           if (!thcycle) {
358             if (!this._date.equals(temp._date)) {
359               org.castor.util.CycleBreaker.releaseCycleHandle(this._date);
360               org.castor.util.CycleBreaker.releaseCycleHandle(temp._date);
361               return false;
362             }
363             org.castor.util.CycleBreaker.releaseCycleHandle(this._date);
364             org.castor.util.CycleBreaker.releaseCycleHandle(temp._date);
365           }
366         }
367       } else if (temp._date != null)
368         return false;
369       if (this._propertyList != null) {
370         if (temp._propertyList == null)
371           return false;
372         if (this._propertyList != temp._propertyList) {
373           thcycle = org.castor.util.CycleBreaker
374               .startingToCycle(this._propertyList);
375           tmcycle = org.castor.util.CycleBreaker
376               .startingToCycle(temp._propertyList);
377           if (thcycle != tmcycle) {
378             if (!thcycle) {
379               org.castor.util.CycleBreaker
380                   .releaseCycleHandle(this._propertyList);
381             }
382             ;
383             if (!tmcycle) {
384               org.castor.util.CycleBreaker
385                   .releaseCycleHandle(temp._propertyList);
386             }
387             ;
388             return false;
389           }
390           if (!thcycle) {
391             if (!this._propertyList.equals(temp._propertyList)) {
392               org.castor.util.CycleBreaker
393                   .releaseCycleHandle(this._propertyList);
394               org.castor.util.CycleBreaker
395                   .releaseCycleHandle(temp._propertyList);
396               return false;
397             }
398             org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
399             org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
400           }
401         }
402       } else if (temp._propertyList != null)
403         return false;
404       if (this._paramList != null) {
405         if (temp._paramList == null)
406           return false;
407         if (this._paramList != temp._paramList) {
408           thcycle = org.castor.util.CycleBreaker
409               .startingToCycle(this._paramList);
410           tmcycle = org.castor.util.CycleBreaker
411               .startingToCycle(temp._paramList);
412           if (thcycle != tmcycle) {
413             if (!thcycle) {
414               org.castor.util.CycleBreaker.releaseCycleHandle(this._paramList);
415             }
416             ;
417             if (!tmcycle) {
418               org.castor.util.CycleBreaker.releaseCycleHandle(temp._paramList);
419             }
420             ;
421             return false;
422           }
423           if (!thcycle) {
424             if (!this._paramList.equals(temp._paramList)) {
425               org.castor.util.CycleBreaker.releaseCycleHandle(this._paramList);
426               org.castor.util.CycleBreaker.releaseCycleHandle(temp._paramList);
427               return false;
428             }
429             org.castor.util.CycleBreaker.releaseCycleHandle(this._paramList);
430             org.castor.util.CycleBreaker.releaseCycleHandle(temp._paramList);
431           }
432         }
433       } else if (temp._paramList != null)
434         return false;
435       if (this._inputList != null) {
436         if (temp._inputList == null)
437           return false;
438         if (this._inputList != temp._inputList) {
439           thcycle = org.castor.util.CycleBreaker
440               .startingToCycle(this._inputList);
441           tmcycle = org.castor.util.CycleBreaker
442               .startingToCycle(temp._inputList);
443           if (thcycle != tmcycle) {
444             if (!thcycle) {
445               org.castor.util.CycleBreaker.releaseCycleHandle(this._inputList);
446             }
447             ;
448             if (!tmcycle) {
449               org.castor.util.CycleBreaker.releaseCycleHandle(temp._inputList);
450             }
451             ;
452             return false;
453           }
454           if (!thcycle) {
455             if (!this._inputList.equals(temp._inputList)) {
456               org.castor.util.CycleBreaker.releaseCycleHandle(this._inputList);
457               org.castor.util.CycleBreaker.releaseCycleHandle(temp._inputList);
458               return false;
459             }
460             org.castor.util.CycleBreaker.releaseCycleHandle(this._inputList);
461             org.castor.util.CycleBreaker.releaseCycleHandle(temp._inputList);
462           }
463         }
464       } else if (temp._inputList != null)
465         return false;
466       return true;
467     }
468     return false;
469   }
470
471   /**
472    * Returns the value of field 'action'. The field 'action' has the following
473    * description: Did what
474    * 
475    * @return the value of field 'Action'.
476    */
477   public java.lang.String getAction() {
478     return this._action;
479   }
480
481   /**
482    * Returns the value of field 'app'. The field 'app' has the following
483    * description: With which application
484    * 
485    * @return the value of field 'App'.
486    */
487   public java.lang.String getApp() {
488     return this._app;
489   }
490
491   /**
492    * Returns the value of field 'date'. The field 'date' has the following
493    * description: When
494    * 
495    * @return the value of field 'Date'.
496    */
497   public java.util.Date getDate() {
498     return this._date;
499   }
500
501   /**
502    * Returns the value of field 'id'. The field 'id' has the following
503    * description: Primary Key for vamsas object referencing
504    * 
505    * 
506    * @return the value of field 'Id'.
507    */
508   public java.lang.String getId() {
509     return this._id;
510   }
511
512   /**
513    * Method getInput.
514    * 
515    * @param index
516    * @throws java.lang.IndexOutOfBoundsException
517    *           if the index given is outside the bounds of the collection
518    * @return the value of the uk.ac.vamsas.objects.core.Input at the given index
519    */
520   public uk.ac.vamsas.objects.core.Input getInput(final int index)
521       throws java.lang.IndexOutOfBoundsException {
522     // check bounds for index
523     if (index < 0 || index >= this._inputList.size()) {
524       throw new IndexOutOfBoundsException("getInput: Index value '" + index
525           + "' not in range [0.." + (this._inputList.size() - 1) + "]");
526     }
527
528     return (uk.ac.vamsas.objects.core.Input) _inputList.get(index);
529   }
530
531   /**
532    * Method getInput.Returns the contents of the collection in an Array.
533    * <p>
534    * Note: Just in case the collection contents are changing in another thread,
535    * we pass a 0-length Array of the correct type into the API call. This way we
536    * <i>know</i> that the Array returned is of exactly the correct length.
537    * 
538    * @return this collection as an Array
539    */
540   public uk.ac.vamsas.objects.core.Input[] getInput() {
541     uk.ac.vamsas.objects.core.Input[] array = new uk.ac.vamsas.objects.core.Input[0];
542     return (uk.ac.vamsas.objects.core.Input[]) this._inputList.toArray(array);
543   }
544
545   /**
546    * Method getInputAsReference.Returns a reference to '_inputList'. No type
547    * checking is performed on any modifications to the Vector.
548    * 
549    * @return a reference to the Vector backing this class
550    */
551   public java.util.Vector getInputAsReference() {
552     return this._inputList;
553   }
554
555   /**
556    * Method getInputCount.
557    * 
558    * @return the size of this collection
559    */
560   public int getInputCount() {
561     return this._inputList.size();
562   }
563
564   /**
565    * Method getParam.
566    * 
567    * @param index
568    * @throws java.lang.IndexOutOfBoundsException
569    *           if the index given is outside the bounds of the collection
570    * @return the value of the uk.ac.vamsas.objects.core.Param at the given index
571    */
572   public uk.ac.vamsas.objects.core.Param getParam(final int index)
573       throws java.lang.IndexOutOfBoundsException {
574     // check bounds for index
575     if (index < 0 || index >= this._paramList.size()) {
576       throw new IndexOutOfBoundsException("getParam: Index value '" + index
577           + "' not in range [0.." + (this._paramList.size() - 1) + "]");
578     }
579
580     return (uk.ac.vamsas.objects.core.Param) _paramList.get(index);
581   }
582
583   /**
584    * Method getParam.Returns the contents of the collection in an Array.
585    * <p>
586    * Note: Just in case the collection contents are changing in another thread,
587    * we pass a 0-length Array of the correct type into the API call. This way we
588    * <i>know</i> that the Array returned is of exactly the correct length.
589    * 
590    * @return this collection as an Array
591    */
592   public uk.ac.vamsas.objects.core.Param[] getParam() {
593     uk.ac.vamsas.objects.core.Param[] array = new uk.ac.vamsas.objects.core.Param[0];
594     return (uk.ac.vamsas.objects.core.Param[]) this._paramList.toArray(array);
595   }
596
597   /**
598    * Method getParamAsReference.Returns a reference to '_paramList'. No type
599    * checking is performed on any modifications to the Vector.
600    * 
601    * @return a reference to the Vector backing this class
602    */
603   public java.util.Vector getParamAsReference() {
604     return this._paramList;
605   }
606
607   /**
608    * Method getParamCount.
609    * 
610    * @return the size of this collection
611    */
612   public int getParamCount() {
613     return this._paramList.size();
614   }
615
616   /**
617    * Method getProperty.
618    * 
619    * @param index
620    * @throws java.lang.IndexOutOfBoundsException
621    *           if the index given is outside the bounds of the collection
622    * @return the value of the uk.ac.vamsas.objects.core.Property at the given
623    *         index
624    */
625   public uk.ac.vamsas.objects.core.Property getProperty(final int index)
626       throws java.lang.IndexOutOfBoundsException {
627     // check bounds for index
628     if (index < 0 || index >= this._propertyList.size()) {
629       throw new IndexOutOfBoundsException("getProperty: Index value '" + index
630           + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
631     }
632
633     return (uk.ac.vamsas.objects.core.Property) _propertyList.get(index);
634   }
635
636   /**
637    * Method getProperty.Returns the contents of the collection in an Array.
638    * <p>
639    * Note: Just in case the collection contents are changing in another thread,
640    * we pass a 0-length Array of the correct type into the API call. This way we
641    * <i>know</i> that the Array returned is of exactly the correct length.
642    * 
643    * @return this collection as an Array
644    */
645   public uk.ac.vamsas.objects.core.Property[] getProperty() {
646     uk.ac.vamsas.objects.core.Property[] array = new uk.ac.vamsas.objects.core.Property[0];
647     return (uk.ac.vamsas.objects.core.Property[]) this._propertyList
648         .toArray(array);
649   }
650
651   /**
652    * Method getPropertyAsReference.Returns a reference to '_propertyList'. No
653    * type checking is performed on any modifications to the Vector.
654    * 
655    * @return a reference to the Vector backing this class
656    */
657   public java.util.Vector getPropertyAsReference() {
658     return this._propertyList;
659   }
660
661   /**
662    * Method getPropertyCount.
663    * 
664    * @return the size of this collection
665    */
666   public int getPropertyCount() {
667     return this._propertyList.size();
668   }
669
670   /**
671    * Returns the value of field 'user'. The field 'user' has the following
672    * description: Who
673    * 
674    * @return the value of field 'User'.
675    */
676   public java.lang.String getUser() {
677     return this._user;
678   }
679
680   /**
681    * Overrides the java.lang.Object.hashCode method.
682    * <p>
683    * The following steps came from <b>Effective Java Programming Language
684    * Guide</b> by Joshua Bloch, Chapter 3
685    * 
686    * @return a hash code value for the object.
687    */
688   public int hashCode() {
689     int result = super.hashCode();
690
691     long tmp;
692     if (_id != null && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
693       result = 37 * result + _id.hashCode();
694       org.castor.util.CycleBreaker.releaseCycleHandle(_id);
695     }
696     if (_user != null && !org.castor.util.CycleBreaker.startingToCycle(_user)) {
697       result = 37 * result + _user.hashCode();
698       org.castor.util.CycleBreaker.releaseCycleHandle(_user);
699     }
700     if (_app != null && !org.castor.util.CycleBreaker.startingToCycle(_app)) {
701       result = 37 * result + _app.hashCode();
702       org.castor.util.CycleBreaker.releaseCycleHandle(_app);
703     }
704     if (_action != null
705         && !org.castor.util.CycleBreaker.startingToCycle(_action)) {
706       result = 37 * result + _action.hashCode();
707       org.castor.util.CycleBreaker.releaseCycleHandle(_action);
708     }
709     if (_date != null && !org.castor.util.CycleBreaker.startingToCycle(_date)) {
710       result = 37 * result + _date.hashCode();
711       org.castor.util.CycleBreaker.releaseCycleHandle(_date);
712     }
713     if (_propertyList != null
714         && !org.castor.util.CycleBreaker.startingToCycle(_propertyList)) {
715       result = 37 * result + _propertyList.hashCode();
716       org.castor.util.CycleBreaker.releaseCycleHandle(_propertyList);
717     }
718     if (_paramList != null
719         && !org.castor.util.CycleBreaker.startingToCycle(_paramList)) {
720       result = 37 * result + _paramList.hashCode();
721       org.castor.util.CycleBreaker.releaseCycleHandle(_paramList);
722     }
723     if (_inputList != null
724         && !org.castor.util.CycleBreaker.startingToCycle(_inputList)) {
725       result = 37 * result + _inputList.hashCode();
726       org.castor.util.CycleBreaker.releaseCycleHandle(_inputList);
727     }
728
729     return result;
730   }
731
732   /**
733    * Method isValid.
734    * 
735    * @return true if this object is valid according to the schema
736    */
737   public boolean isValid() {
738     try {
739       validate();
740     } catch (org.exolab.castor.xml.ValidationException vex) {
741       return false;
742     }
743     return true;
744   }
745
746   /**
747    * 
748    * 
749    * @param out
750    * @throws org.exolab.castor.xml.MarshalException
751    *           if object is null or if any SAXException is thrown during
752    *           marshaling
753    * @throws org.exolab.castor.xml.ValidationException
754    *           if this object is an invalid instance according to the schema
755    */
756   public void marshal(final java.io.Writer out)
757       throws org.exolab.castor.xml.MarshalException,
758       org.exolab.castor.xml.ValidationException {
759     Marshaller.marshal(this, out);
760   }
761
762   /**
763    * 
764    * 
765    * @param handler
766    * @throws java.io.IOException
767    *           if an IOException occurs during marshaling
768    * @throws org.exolab.castor.xml.ValidationException
769    *           if this object is an invalid instance according to the schema
770    * @throws org.exolab.castor.xml.MarshalException
771    *           if object is null or if any SAXException is thrown during
772    *           marshaling
773    */
774   public void marshal(final org.xml.sax.ContentHandler handler)
775       throws java.io.IOException, org.exolab.castor.xml.MarshalException,
776       org.exolab.castor.xml.ValidationException {
777     Marshaller.marshal(this, handler);
778   }
779
780   /**
781      */
782   public void removeAllInput() {
783     this._inputList.clear();
784   }
785
786   /**
787      */
788   public void removeAllParam() {
789     this._paramList.clear();
790   }
791
792   /**
793      */
794   public void removeAllProperty() {
795     this._propertyList.clear();
796   }
797
798   /**
799    * Method removeInput.
800    * 
801    * @param vInput
802    * @return true if the object was removed from the collection.
803    */
804   public boolean removeInput(final uk.ac.vamsas.objects.core.Input vInput) {
805     boolean removed = _inputList.remove(vInput);
806     return removed;
807   }
808
809   /**
810    * Method removeInputAt.
811    * 
812    * @param index
813    * @return the element removed from the collection
814    */
815   public uk.ac.vamsas.objects.core.Input removeInputAt(final int index) {
816     java.lang.Object obj = this._inputList.remove(index);
817     return (uk.ac.vamsas.objects.core.Input) obj;
818   }
819
820   /**
821    * Method removeParam.
822    * 
823    * @param vParam
824    * @return true if the object was removed from the collection.
825    */
826   public boolean removeParam(final uk.ac.vamsas.objects.core.Param vParam) {
827     boolean removed = _paramList.remove(vParam);
828     return removed;
829   }
830
831   /**
832    * Method removeParamAt.
833    * 
834    * @param index
835    * @return the element removed from the collection
836    */
837   public uk.ac.vamsas.objects.core.Param removeParamAt(final int index) {
838     java.lang.Object obj = this._paramList.remove(index);
839     return (uk.ac.vamsas.objects.core.Param) obj;
840   }
841
842   /**
843    * Method removeProperty.
844    * 
845    * @param vProperty
846    * @return true if the object was removed from the collection.
847    */
848   public boolean removeProperty(
849       final uk.ac.vamsas.objects.core.Property vProperty) {
850     boolean removed = _propertyList.remove(vProperty);
851     return removed;
852   }
853
854   /**
855    * Method removePropertyAt.
856    * 
857    * @param index
858    * @return the element removed from the collection
859    */
860   public uk.ac.vamsas.objects.core.Property removePropertyAt(final int index) {
861     java.lang.Object obj = this._propertyList.remove(index);
862     return (uk.ac.vamsas.objects.core.Property) obj;
863   }
864
865   /**
866    * Sets the value of field 'action'. The field 'action' has the following
867    * description: Did what
868    * 
869    * @param action
870    *          the value of field 'action'.
871    */
872   public void setAction(final java.lang.String action) {
873     this._action = action;
874   }
875
876   /**
877    * Sets the value of field 'app'. The field 'app' has the following
878    * description: With which application
879    * 
880    * @param app
881    *          the value of field 'app'.
882    */
883   public void setApp(final java.lang.String app) {
884     this._app = app;
885   }
886
887   /**
888    * Sets the value of field 'date'. The field 'date' has the following
889    * description: When
890    * 
891    * @param date
892    *          the value of field 'date'.
893    */
894   public void setDate(final java.util.Date date) {
895     this._date = date;
896   }
897
898   /**
899    * Sets the value of field 'id'. The field 'id' has the following description:
900    * Primary Key for vamsas object referencing
901    * 
902    * 
903    * @param id
904    *          the value of field 'id'.
905    */
906   public void setId(final java.lang.String id) {
907     this._id = id;
908   }
909
910   /**
911    * 
912    * 
913    * @param index
914    * @param vInput
915    * @throws java.lang.IndexOutOfBoundsException
916    *           if the index given is outside the bounds of the collection
917    */
918   public void setInput(final int index,
919       final uk.ac.vamsas.objects.core.Input vInput)
920       throws java.lang.IndexOutOfBoundsException {
921     // check bounds for index
922     if (index < 0 || index >= this._inputList.size()) {
923       throw new IndexOutOfBoundsException("setInput: Index value '" + index
924           + "' not in range [0.." + (this._inputList.size() - 1) + "]");
925     }
926
927     this._inputList.set(index, vInput);
928   }
929
930   /**
931    * 
932    * 
933    * @param vInputArray
934    */
935   public void setInput(final uk.ac.vamsas.objects.core.Input[] vInputArray) {
936     // -- copy array
937     _inputList.clear();
938
939     for (int i = 0; i < vInputArray.length; i++) {
940       this._inputList.add(vInputArray[i]);
941     }
942   }
943
944   /**
945    * Sets the value of '_inputList' by copying the given Vector. All elements
946    * will be checked for type safety.
947    * 
948    * @param vInputList
949    *          the Vector to copy.
950    */
951   public void setInput(final java.util.Vector vInputList) {
952     // copy vector
953     this._inputList.clear();
954
955     this._inputList.addAll(vInputList);
956   }
957
958   /**
959    * Sets the value of '_inputList' by setting it to the given Vector. No type
960    * checking is performed.
961    * 
962    * @deprecated
963    * 
964    * @param inputVector
965    *          the Vector to set.
966    */
967   public void setInputAsReference(final java.util.Vector inputVector) {
968     this._inputList = inputVector;
969   }
970
971   /**
972    * 
973    * 
974    * @param index
975    * @param vParam
976    * @throws java.lang.IndexOutOfBoundsException
977    *           if the index given is outside the bounds of the collection
978    */
979   public void setParam(final int index,
980       final uk.ac.vamsas.objects.core.Param vParam)
981       throws java.lang.IndexOutOfBoundsException {
982     // check bounds for index
983     if (index < 0 || index >= this._paramList.size()) {
984       throw new IndexOutOfBoundsException("setParam: Index value '" + index
985           + "' not in range [0.." + (this._paramList.size() - 1) + "]");
986     }
987
988     this._paramList.set(index, vParam);
989   }
990
991   /**
992    * 
993    * 
994    * @param vParamArray
995    */
996   public void setParam(final uk.ac.vamsas.objects.core.Param[] vParamArray) {
997     // -- copy array
998     _paramList.clear();
999
1000     for (int i = 0; i < vParamArray.length; i++) {
1001       this._paramList.add(vParamArray[i]);
1002     }
1003   }
1004
1005   /**
1006    * Sets the value of '_paramList' by copying the given Vector. All elements
1007    * will be checked for type safety.
1008    * 
1009    * @param vParamList
1010    *          the Vector to copy.
1011    */
1012   public void setParam(final java.util.Vector vParamList) {
1013     // copy vector
1014     this._paramList.clear();
1015
1016     this._paramList.addAll(vParamList);
1017   }
1018
1019   /**
1020    * Sets the value of '_paramList' by setting it to the given Vector. No type
1021    * checking is performed.
1022    * 
1023    * @deprecated
1024    * 
1025    * @param paramVector
1026    *          the Vector to set.
1027    */
1028   public void setParamAsReference(final java.util.Vector paramVector) {
1029     this._paramList = paramVector;
1030   }
1031
1032   /**
1033    * 
1034    * 
1035    * @param index
1036    * @param vProperty
1037    * @throws java.lang.IndexOutOfBoundsException
1038    *           if the index given is outside the bounds of the collection
1039    */
1040   public void setProperty(final int index,
1041       final uk.ac.vamsas.objects.core.Property vProperty)
1042       throws java.lang.IndexOutOfBoundsException {
1043     // check bounds for index
1044     if (index < 0 || index >= this._propertyList.size()) {
1045       throw new IndexOutOfBoundsException("setProperty: Index value '" + index
1046           + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
1047     }
1048
1049     this._propertyList.set(index, vProperty);
1050   }
1051
1052   /**
1053    * 
1054    * 
1055    * @param vPropertyArray
1056    */
1057   public void setProperty(
1058       final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {
1059     // -- copy array
1060     _propertyList.clear();
1061
1062     for (int i = 0; i < vPropertyArray.length; i++) {
1063       this._propertyList.add(vPropertyArray[i]);
1064     }
1065   }
1066
1067   /**
1068    * Sets the value of '_propertyList' by copying the given Vector. All elements
1069    * will be checked for type safety.
1070    * 
1071    * @param vPropertyList
1072    *          the Vector to copy.
1073    */
1074   public void setProperty(final java.util.Vector vPropertyList) {
1075     // copy vector
1076     this._propertyList.clear();
1077
1078     this._propertyList.addAll(vPropertyList);
1079   }
1080
1081   /**
1082    * Sets the value of '_propertyList' by setting it to the given Vector. No
1083    * type checking is performed.
1084    * 
1085    * @deprecated
1086    * 
1087    * @param propertyVector
1088    *          the Vector to set.
1089    */
1090   public void setPropertyAsReference(final java.util.Vector propertyVector) {
1091     this._propertyList = propertyVector;
1092   }
1093
1094   /**
1095    * Sets the value of field 'user'. The field 'user' has the following
1096    * description: Who
1097    * 
1098    * @param user
1099    *          the value of field 'user'.
1100    */
1101   public void setUser(final java.lang.String user) {
1102     this._user = user;
1103   }
1104
1105   /**
1106    * Method unmarshal.
1107    * 
1108    * @param reader
1109    * @throws org.exolab.castor.xml.MarshalException
1110    *           if object is null or if any SAXException is thrown during
1111    *           marshaling
1112    * @throws org.exolab.castor.xml.ValidationException
1113    *           if this object is an invalid instance according to the schema
1114    * @return the unmarshaled uk.ac.vamsas.objects.core.Entry
1115    */
1116   public static uk.ac.vamsas.objects.core.Entry unmarshal(
1117       final java.io.Reader reader)
1118       throws org.exolab.castor.xml.MarshalException,
1119       org.exolab.castor.xml.ValidationException {
1120     return (uk.ac.vamsas.objects.core.Entry) Unmarshaller.unmarshal(
1121         uk.ac.vamsas.objects.core.Entry.class, reader);
1122   }
1123
1124   /**
1125    * 
1126    * 
1127    * @throws org.exolab.castor.xml.ValidationException
1128    *           if this object is an invalid instance according to the schema
1129    */
1130   public void validate() throws org.exolab.castor.xml.ValidationException {
1131     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1132     validator.validate(this);
1133   }
1134
1135 }