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