2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
8 package uk.ac.vamsas.objects.core;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
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;
29 * @version $Revision$ $Date$
31 public class Entry extends uk.ac.vamsas.client.Vobject
32 implements java.io.Serializable
36 //--------------------------/
37 //- Class/Member Variables -/
38 //--------------------------/
41 * Primary Key for vamsas object referencing
44 private java.lang.String _id;
49 private java.lang.String _user;
52 * With which application
54 private java.lang.String _app;
59 private java.lang.String _action;
64 private org.exolab.castor.types.Date _date;
67 * additional information
69 private java.util.Vector _propertyList;
72 * parameter for the action
74 private java.util.Vector _paramList;
77 * bioinformatic objects input to action
80 private java.util.Vector _inputList;
90 _propertyList = new Vector();
91 _paramList = new Vector();
92 _inputList = new Vector();
93 } //-- uk.ac.vamsas.objects.core.Entry()
107 public void addInput(uk.ac.vamsas.objects.core.Input vInput)
108 throws java.lang.IndexOutOfBoundsException
110 _inputList.addElement(vInput);
111 } //-- void addInput(uk.ac.vamsas.objects.core.Input)
121 public void addInput(int index, uk.ac.vamsas.objects.core.Input vInput)
122 throws java.lang.IndexOutOfBoundsException
124 _inputList.insertElementAt(vInput, index);
125 } //-- void addInput(int, uk.ac.vamsas.objects.core.Input)
134 public void addParam(uk.ac.vamsas.objects.core.Param vParam)
135 throws java.lang.IndexOutOfBoundsException
137 _paramList.addElement(vParam);
138 } //-- void addParam(uk.ac.vamsas.objects.core.Param)
148 public void addParam(int index, uk.ac.vamsas.objects.core.Param vParam)
149 throws java.lang.IndexOutOfBoundsException
151 _paramList.insertElementAt(vParam, index);
152 } //-- void addParam(int, uk.ac.vamsas.objects.core.Param)
161 public void addProperty(uk.ac.vamsas.objects.core.Property vProperty)
162 throws java.lang.IndexOutOfBoundsException
164 _propertyList.addElement(vProperty);
165 } //-- void addProperty(uk.ac.vamsas.objects.core.Property)
175 public void addProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)
176 throws java.lang.IndexOutOfBoundsException
178 _propertyList.insertElementAt(vProperty, index);
179 } //-- void addProperty(int, uk.ac.vamsas.objects.core.Property)
182 * Method enumerateInput
186 * @return Enumeration
188 public java.util.Enumeration enumerateInput()
190 return _inputList.elements();
191 } //-- java.util.Enumeration enumerateInput()
194 * Method enumerateParam
198 * @return Enumeration
200 public java.util.Enumeration enumerateParam()
202 return _paramList.elements();
203 } //-- java.util.Enumeration enumerateParam()
206 * Method enumerateProperty
210 * @return Enumeration
212 public java.util.Enumeration enumerateProperty()
214 return _propertyList.elements();
215 } //-- java.util.Enumeration enumerateProperty()
218 * Note: hashCode() has not been overriden
223 public boolean equals(java.lang.Object obj)
228 if (super.equals(obj)==false)
231 if (obj instanceof Entry) {
233 Entry temp = (Entry)obj;
234 if (this._id != null) {
235 if (temp._id == null) return false;
236 else if (!(this._id.equals(temp._id)))
239 else if (temp._id != null)
241 if (this._user != null) {
242 if (temp._user == null) return false;
243 else if (!(this._user.equals(temp._user)))
246 else if (temp._user != null)
248 if (this._app != null) {
249 if (temp._app == null) return false;
250 else if (!(this._app.equals(temp._app)))
253 else if (temp._app != null)
255 if (this._action != null) {
256 if (temp._action == null) return false;
257 else if (!(this._action.equals(temp._action)))
260 else if (temp._action != null)
262 if (this._date != null) {
263 if (temp._date == null) return false;
264 else if (!(this._date.equals(temp._date)))
267 else if (temp._date != null)
269 if (this._propertyList != null) {
270 if (temp._propertyList == null) return false;
271 else if (!(this._propertyList.equals(temp._propertyList)))
274 else if (temp._propertyList != null)
276 if (this._paramList != null) {
277 if (temp._paramList == null) return false;
278 else if (!(this._paramList.equals(temp._paramList)))
281 else if (temp._paramList != null)
283 if (this._inputList != null) {
284 if (temp._inputList == null) return false;
285 else if (!(this._inputList.equals(temp._inputList)))
288 else if (temp._inputList != null)
293 } //-- boolean equals(java.lang.Object)
296 * Returns the value of field 'action'. The field 'action' has
297 * the following description: Did what
300 * @return the value of field 'action'.
302 public java.lang.String getAction()
305 } //-- java.lang.String getAction()
308 * Returns the value of field 'app'. The field 'app' has the
309 * following description: With which application
312 * @return the value of field 'app'.
314 public java.lang.String getApp()
317 } //-- java.lang.String getApp()
320 * Returns the value of field 'date'. The field 'date' has the
321 * following description: When
324 * @return the value of field 'date'.
326 public org.exolab.castor.types.Date getDate()
329 } //-- org.exolab.castor.types.Date getDate()
332 * Returns the value of field 'id'. The field 'id' has the
333 * following description: Primary Key for vamsas object
338 * @return the value of field 'id'.
340 public java.lang.String getId()
343 } //-- java.lang.String getId()
353 public uk.ac.vamsas.objects.core.Input getInput(int index)
354 throws java.lang.IndexOutOfBoundsException
356 //-- check bounds for index
357 if ((index < 0) || (index > _inputList.size())) {
358 throw new IndexOutOfBoundsException("getInput: Index value '"+index+"' not in range [0.."+_inputList.size()+ "]");
361 return (uk.ac.vamsas.objects.core.Input) _inputList.elementAt(index);
362 } //-- uk.ac.vamsas.objects.core.Input getInput(int)
371 public uk.ac.vamsas.objects.core.Input[] getInput()
373 int size = _inputList.size();
374 uk.ac.vamsas.objects.core.Input[] mArray = new uk.ac.vamsas.objects.core.Input[size];
375 for (int index = 0; index < size; index++) {
376 mArray[index] = (uk.ac.vamsas.objects.core.Input) _inputList.elementAt(index);
379 } //-- uk.ac.vamsas.objects.core.Input[] getInput()
382 * Method getInputCount
388 public int getInputCount()
390 return _inputList.size();
391 } //-- int getInputCount()
401 public uk.ac.vamsas.objects.core.Param getParam(int index)
402 throws java.lang.IndexOutOfBoundsException
404 //-- check bounds for index
405 if ((index < 0) || (index > _paramList.size())) {
406 throw new IndexOutOfBoundsException("getParam: Index value '"+index+"' not in range [0.."+_paramList.size()+ "]");
409 return (uk.ac.vamsas.objects.core.Param) _paramList.elementAt(index);
410 } //-- uk.ac.vamsas.objects.core.Param getParam(int)
419 public uk.ac.vamsas.objects.core.Param[] getParam()
421 int size = _paramList.size();
422 uk.ac.vamsas.objects.core.Param[] mArray = new uk.ac.vamsas.objects.core.Param[size];
423 for (int index = 0; index < size; index++) {
424 mArray[index] = (uk.ac.vamsas.objects.core.Param) _paramList.elementAt(index);
427 } //-- uk.ac.vamsas.objects.core.Param[] getParam()
430 * Method getParamCount
436 public int getParamCount()
438 return _paramList.size();
439 } //-- int getParamCount()
449 public uk.ac.vamsas.objects.core.Property getProperty(int index)
450 throws java.lang.IndexOutOfBoundsException
452 //-- check bounds for index
453 if ((index < 0) || (index > _propertyList.size())) {
454 throw new IndexOutOfBoundsException("getProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");
457 return (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);
458 } //-- uk.ac.vamsas.objects.core.Property getProperty(int)
467 public uk.ac.vamsas.objects.core.Property[] getProperty()
469 int size = _propertyList.size();
470 uk.ac.vamsas.objects.core.Property[] mArray = new uk.ac.vamsas.objects.core.Property[size];
471 for (int index = 0; index < size; index++) {
472 mArray[index] = (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);
475 } //-- uk.ac.vamsas.objects.core.Property[] getProperty()
478 * Method getPropertyCount
484 public int getPropertyCount()
486 return _propertyList.size();
487 } //-- int getPropertyCount()
490 * Returns the value of field 'user'. The field 'user' has the
491 * following description: Who
494 * @return the value of field 'user'.
496 public java.lang.String getUser()
499 } //-- java.lang.String getUser()
508 public boolean isValid()
513 catch (org.exolab.castor.xml.ValidationException vex) {
517 } //-- boolean isValid()
526 public void marshal(java.io.Writer out)
527 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
530 Marshaller.marshal(this, out);
531 } //-- void marshal(java.io.Writer)
540 public void marshal(org.xml.sax.ContentHandler handler)
541 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
544 Marshaller.marshal(this, handler);
545 } //-- void marshal(org.xml.sax.ContentHandler)
548 * Method removeAllInput
551 public void removeAllInput()
553 _inputList.removeAllElements();
554 } //-- void removeAllInput()
557 * Method removeAllParam
560 public void removeAllParam()
562 _paramList.removeAllElements();
563 } //-- void removeAllParam()
566 * Method removeAllProperty
569 public void removeAllProperty()
571 _propertyList.removeAllElements();
572 } //-- void removeAllProperty()
582 public uk.ac.vamsas.objects.core.Input removeInput(int index)
584 java.lang.Object obj = _inputList.elementAt(index);
585 _inputList.removeElementAt(index);
586 return (uk.ac.vamsas.objects.core.Input) obj;
587 } //-- uk.ac.vamsas.objects.core.Input removeInput(int)
597 public uk.ac.vamsas.objects.core.Param removeParam(int index)
599 java.lang.Object obj = _paramList.elementAt(index);
600 _paramList.removeElementAt(index);
601 return (uk.ac.vamsas.objects.core.Param) obj;
602 } //-- uk.ac.vamsas.objects.core.Param removeParam(int)
605 * Method removeProperty
612 public uk.ac.vamsas.objects.core.Property removeProperty(int index)
614 java.lang.Object obj = _propertyList.elementAt(index);
615 _propertyList.removeElementAt(index);
616 return (uk.ac.vamsas.objects.core.Property) obj;
617 } //-- uk.ac.vamsas.objects.core.Property removeProperty(int)
620 * Sets the value of field 'action'. The field 'action' has the
621 * following description: Did what
623 * @param action the value of field 'action'.
625 public void setAction(java.lang.String action)
627 this._action = action;
628 } //-- void setAction(java.lang.String)
631 * Sets the value of field 'app'. The field 'app' has the
632 * following description: With which application
634 * @param app the value of field 'app'.
636 public void setApp(java.lang.String app)
639 } //-- void setApp(java.lang.String)
642 * Sets the value of field 'date'. The field 'date' has the
643 * following description: When
645 * @param date the value of field 'date'.
647 public void setDate(org.exolab.castor.types.Date date)
650 } //-- void setDate(org.exolab.castor.types.Date)
653 * Sets the value of field 'id'. The field 'id' has the
654 * following description: Primary Key for vamsas object
658 * @param id the value of field 'id'.
660 public void setId(java.lang.String id)
663 } //-- void setId(java.lang.String)
673 public void setInput(int index, uk.ac.vamsas.objects.core.Input vInput)
674 throws java.lang.IndexOutOfBoundsException
676 //-- check bounds for index
677 if ((index < 0) || (index > _inputList.size())) {
678 throw new IndexOutOfBoundsException("setInput: Index value '"+index+"' not in range [0.."+_inputList.size()+ "]");
680 _inputList.setElementAt(vInput, index);
681 } //-- void setInput(int, uk.ac.vamsas.objects.core.Input)
690 public void setInput(uk.ac.vamsas.objects.core.Input[] inputArray)
693 _inputList.removeAllElements();
694 for (int i = 0; i < inputArray.length; i++) {
695 _inputList.addElement(inputArray[i]);
697 } //-- void setInput(uk.ac.vamsas.objects.core.Input)
707 public void setParam(int index, uk.ac.vamsas.objects.core.Param vParam)
708 throws java.lang.IndexOutOfBoundsException
710 //-- check bounds for index
711 if ((index < 0) || (index > _paramList.size())) {
712 throw new IndexOutOfBoundsException("setParam: Index value '"+index+"' not in range [0.."+_paramList.size()+ "]");
714 _paramList.setElementAt(vParam, index);
715 } //-- void setParam(int, uk.ac.vamsas.objects.core.Param)
724 public void setParam(uk.ac.vamsas.objects.core.Param[] paramArray)
727 _paramList.removeAllElements();
728 for (int i = 0; i < paramArray.length; i++) {
729 _paramList.addElement(paramArray[i]);
731 } //-- void setParam(uk.ac.vamsas.objects.core.Param)
741 public void setProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)
742 throws java.lang.IndexOutOfBoundsException
744 //-- check bounds for index
745 if ((index < 0) || (index > _propertyList.size())) {
746 throw new IndexOutOfBoundsException("setProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");
748 _propertyList.setElementAt(vProperty, index);
749 } //-- void setProperty(int, uk.ac.vamsas.objects.core.Property)
756 * @param propertyArray
758 public void setProperty(uk.ac.vamsas.objects.core.Property[] propertyArray)
761 _propertyList.removeAllElements();
762 for (int i = 0; i < propertyArray.length; i++) {
763 _propertyList.addElement(propertyArray[i]);
765 } //-- void setProperty(uk.ac.vamsas.objects.core.Property)
768 * Sets the value of field 'user'. The field 'user' has the
769 * following description: Who
771 * @param user the value of field 'user'.
773 public void setUser(java.lang.String user)
776 } //-- void setUser(java.lang.String)
786 public static uk.ac.vamsas.objects.core.Entry unmarshal(java.io.Reader reader)
787 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
789 return (uk.ac.vamsas.objects.core.Entry) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Entry.class, reader);
790 } //-- uk.ac.vamsas.objects.core.Entry unmarshal(java.io.Reader)
796 public void validate()
797 throws org.exolab.castor.xml.ValidationException
799 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
800 validator.validate(this);
801 } //-- void validate()