2 * This file is part of the Vamsas Client version 0.2.
3 * Copyright 2010 by Jim Procter, Iain Milne, Pierre Marguerite,
4 * Andrew Waterhouse and Dominik Lindner.
6 * Earlier versions have also been incorporated into Jalview version 2.4
7 * since 2008, and TOPALi version 2 since 2007.
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.
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.
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/>.
22 package uk.ac.vamsas.objects.core;
24 //---------------------------------/
25 //- Imported classes and packages -/
26 //---------------------------------/
28 import org.exolab.castor.xml.Marshaller;
29 import org.exolab.castor.xml.Unmarshaller;
34 * @version $Revision$ $Date: 2007-06-28 14:51:44 +0100 (Thu, 28 Jun 2007)
37 public class Entry extends uk.ac.vamsas.client.Vobject implements
38 java.io.Serializable {
40 // --------------------------/
41 // - Class/Member Variables -/
42 // --------------------------/
45 * Primary Key for vamsas object referencing
48 private java.lang.String _id;
53 private java.lang.String _user;
56 * With which application
58 private java.lang.String _app;
63 private java.lang.String _action;
68 private java.util.Date _date;
71 * additional information
73 private java.util.Vector _propertyList;
76 * parameter for the action
78 private java.util.Vector _paramList;
81 * bioinformatic objects input to action
84 private java.util.Vector _inputList;
92 this._propertyList = new java.util.Vector();
93 this._paramList = new java.util.Vector();
94 this._inputList = new java.util.Vector();
105 * @throws java.lang.IndexOutOfBoundsException
106 * if the index given is outside the bounds of the collection
108 public void addInput(final uk.ac.vamsas.objects.core.Input vInput)
109 throws java.lang.IndexOutOfBoundsException {
110 this._inputList.addElement(vInput);
118 * @throws java.lang.IndexOutOfBoundsException
119 * if the index given is outside the bounds of the collection
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);
131 * @throws java.lang.IndexOutOfBoundsException
132 * if the index given is outside the bounds of the collection
134 public void addParam(final uk.ac.vamsas.objects.core.Param vParam)
135 throws java.lang.IndexOutOfBoundsException {
136 this._paramList.addElement(vParam);
144 * @throws java.lang.IndexOutOfBoundsException
145 * if the index given is outside the bounds of the collection
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);
157 * @throws java.lang.IndexOutOfBoundsException
158 * if the index given is outside the bounds of the collection
160 public void addProperty(final uk.ac.vamsas.objects.core.Property vProperty)
161 throws java.lang.IndexOutOfBoundsException {
162 this._propertyList.addElement(vProperty);
170 * @throws java.lang.IndexOutOfBoundsException
171 * if the index given is outside the bounds of the collection
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);
180 * Method enumerateInput.
182 * @return an Enumeration over all uk.ac.vamsas.objects.core.Input elements
184 public java.util.Enumeration enumerateInput() {
185 return this._inputList.elements();
189 * Method enumerateParam.
191 * @return an Enumeration over all uk.ac.vamsas.objects.core.Param elements
193 public java.util.Enumeration enumerateParam() {
194 return this._paramList.elements();
198 * Method enumerateProperty.
200 * @return an Enumeration over all uk.ac.vamsas.objects.core.Property elements
202 public java.util.Enumeration enumerateProperty() {
203 return this._propertyList.elements();
207 * Overrides the java.lang.Object.equals method.
210 * @return true if the objects are equal.
212 public boolean equals(final java.lang.Object obj) {
216 if (super.equals(obj) == false)
219 if (obj instanceof Entry) {
221 Entry temp = (Entry) obj;
224 if (this._id != null) {
225 if (temp._id == null)
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) {
232 org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
236 org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
242 if (!this._id.equals(temp._id)) {
243 org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
244 org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
247 org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
248 org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
251 } else if (temp._id != null)
253 if (this._user != null) {
254 if (temp._user == null)
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) {
261 org.castor.util.CycleBreaker.releaseCycleHandle(this._user);
265 org.castor.util.CycleBreaker.releaseCycleHandle(temp._user);
271 if (!this._user.equals(temp._user)) {
272 org.castor.util.CycleBreaker.releaseCycleHandle(this._user);
273 org.castor.util.CycleBreaker.releaseCycleHandle(temp._user);
276 org.castor.util.CycleBreaker.releaseCycleHandle(this._user);
277 org.castor.util.CycleBreaker.releaseCycleHandle(temp._user);
280 } else if (temp._user != null)
282 if (this._app != null) {
283 if (temp._app == null)
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) {
290 org.castor.util.CycleBreaker.releaseCycleHandle(this._app);
294 org.castor.util.CycleBreaker.releaseCycleHandle(temp._app);
300 if (!this._app.equals(temp._app)) {
301 org.castor.util.CycleBreaker.releaseCycleHandle(this._app);
302 org.castor.util.CycleBreaker.releaseCycleHandle(temp._app);
305 org.castor.util.CycleBreaker.releaseCycleHandle(this._app);
306 org.castor.util.CycleBreaker.releaseCycleHandle(temp._app);
309 } else if (temp._app != null)
311 if (this._action != null) {
312 if (temp._action == null)
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) {
319 org.castor.util.CycleBreaker.releaseCycleHandle(this._action);
323 org.castor.util.CycleBreaker.releaseCycleHandle(temp._action);
329 if (!this._action.equals(temp._action)) {
330 org.castor.util.CycleBreaker.releaseCycleHandle(this._action);
331 org.castor.util.CycleBreaker.releaseCycleHandle(temp._action);
334 org.castor.util.CycleBreaker.releaseCycleHandle(this._action);
335 org.castor.util.CycleBreaker.releaseCycleHandle(temp._action);
338 } else if (temp._action != null)
340 if (this._date != null) {
341 if (temp._date == null)
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) {
348 org.castor.util.CycleBreaker.releaseCycleHandle(this._date);
352 org.castor.util.CycleBreaker.releaseCycleHandle(temp._date);
358 if (!this._date.equals(temp._date)) {
359 org.castor.util.CycleBreaker.releaseCycleHandle(this._date);
360 org.castor.util.CycleBreaker.releaseCycleHandle(temp._date);
363 org.castor.util.CycleBreaker.releaseCycleHandle(this._date);
364 org.castor.util.CycleBreaker.releaseCycleHandle(temp._date);
367 } else if (temp._date != null)
369 if (this._propertyList != null) {
370 if (temp._propertyList == null)
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) {
379 org.castor.util.CycleBreaker
380 .releaseCycleHandle(this._propertyList);
384 org.castor.util.CycleBreaker
385 .releaseCycleHandle(temp._propertyList);
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);
398 org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
399 org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
402 } else if (temp._propertyList != null)
404 if (this._paramList != null) {
405 if (temp._paramList == null)
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) {
414 org.castor.util.CycleBreaker.releaseCycleHandle(this._paramList);
418 org.castor.util.CycleBreaker.releaseCycleHandle(temp._paramList);
424 if (!this._paramList.equals(temp._paramList)) {
425 org.castor.util.CycleBreaker.releaseCycleHandle(this._paramList);
426 org.castor.util.CycleBreaker.releaseCycleHandle(temp._paramList);
429 org.castor.util.CycleBreaker.releaseCycleHandle(this._paramList);
430 org.castor.util.CycleBreaker.releaseCycleHandle(temp._paramList);
433 } else if (temp._paramList != null)
435 if (this._inputList != null) {
436 if (temp._inputList == null)
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) {
445 org.castor.util.CycleBreaker.releaseCycleHandle(this._inputList);
449 org.castor.util.CycleBreaker.releaseCycleHandle(temp._inputList);
455 if (!this._inputList.equals(temp._inputList)) {
456 org.castor.util.CycleBreaker.releaseCycleHandle(this._inputList);
457 org.castor.util.CycleBreaker.releaseCycleHandle(temp._inputList);
460 org.castor.util.CycleBreaker.releaseCycleHandle(this._inputList);
461 org.castor.util.CycleBreaker.releaseCycleHandle(temp._inputList);
464 } else if (temp._inputList != null)
472 * Returns the value of field 'action'. The field 'action' has the following
473 * description: Did what
475 * @return the value of field 'Action'.
477 public java.lang.String getAction() {
482 * Returns the value of field 'app'. The field 'app' has the following
483 * description: With which application
485 * @return the value of field 'App'.
487 public java.lang.String getApp() {
492 * Returns the value of field 'date'. The field 'date' has the following
495 * @return the value of field 'Date'.
497 public java.util.Date getDate() {
502 * Returns the value of field 'id'. The field 'id' has the following
503 * description: Primary Key for vamsas object referencing
506 * @return the value of field 'Id'.
508 public java.lang.String getId() {
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
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) + "]");
528 return (uk.ac.vamsas.objects.core.Input) _inputList.get(index);
532 * Method getInput.Returns the contents of the collection in an Array.
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.
538 * @return this collection as an Array
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);
546 * Method getInputAsReference.Returns a reference to '_inputList'. No type
547 * checking is performed on any modifications to the Vector.
549 * @return a reference to the Vector backing this class
551 public java.util.Vector getInputAsReference() {
552 return this._inputList;
556 * Method getInputCount.
558 * @return the size of this collection
560 public int getInputCount() {
561 return this._inputList.size();
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
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) + "]");
580 return (uk.ac.vamsas.objects.core.Param) _paramList.get(index);
584 * Method getParam.Returns the contents of the collection in an Array.
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.
590 * @return this collection as an Array
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);
598 * Method getParamAsReference.Returns a reference to '_paramList'. No type
599 * checking is performed on any modifications to the Vector.
601 * @return a reference to the Vector backing this class
603 public java.util.Vector getParamAsReference() {
604 return this._paramList;
608 * Method getParamCount.
610 * @return the size of this collection
612 public int getParamCount() {
613 return this._paramList.size();
617 * Method getProperty.
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
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) + "]");
633 return (uk.ac.vamsas.objects.core.Property) _propertyList.get(index);
637 * Method getProperty.Returns the contents of the collection in an Array.
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.
643 * @return this collection as an Array
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
652 * Method getPropertyAsReference.Returns a reference to '_propertyList'. No
653 * type checking is performed on any modifications to the Vector.
655 * @return a reference to the Vector backing this class
657 public java.util.Vector getPropertyAsReference() {
658 return this._propertyList;
662 * Method getPropertyCount.
664 * @return the size of this collection
666 public int getPropertyCount() {
667 return this._propertyList.size();
671 * Returns the value of field 'user'. The field 'user' has the following
674 * @return the value of field 'User'.
676 public java.lang.String getUser() {
681 * Overrides the java.lang.Object.hashCode method.
683 * The following steps came from <b>Effective Java Programming Language
684 * Guide</b> by Joshua Bloch, Chapter 3
686 * @return a hash code value for the object.
688 public int hashCode() {
689 int result = super.hashCode();
692 if (_id != null && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
693 result = 37 * result + _id.hashCode();
694 org.castor.util.CycleBreaker.releaseCycleHandle(_id);
696 if (_user != null && !org.castor.util.CycleBreaker.startingToCycle(_user)) {
697 result = 37 * result + _user.hashCode();
698 org.castor.util.CycleBreaker.releaseCycleHandle(_user);
700 if (_app != null && !org.castor.util.CycleBreaker.startingToCycle(_app)) {
701 result = 37 * result + _app.hashCode();
702 org.castor.util.CycleBreaker.releaseCycleHandle(_app);
705 && !org.castor.util.CycleBreaker.startingToCycle(_action)) {
706 result = 37 * result + _action.hashCode();
707 org.castor.util.CycleBreaker.releaseCycleHandle(_action);
709 if (_date != null && !org.castor.util.CycleBreaker.startingToCycle(_date)) {
710 result = 37 * result + _date.hashCode();
711 org.castor.util.CycleBreaker.releaseCycleHandle(_date);
713 if (_propertyList != null
714 && !org.castor.util.CycleBreaker.startingToCycle(_propertyList)) {
715 result = 37 * result + _propertyList.hashCode();
716 org.castor.util.CycleBreaker.releaseCycleHandle(_propertyList);
718 if (_paramList != null
719 && !org.castor.util.CycleBreaker.startingToCycle(_paramList)) {
720 result = 37 * result + _paramList.hashCode();
721 org.castor.util.CycleBreaker.releaseCycleHandle(_paramList);
723 if (_inputList != null
724 && !org.castor.util.CycleBreaker.startingToCycle(_inputList)) {
725 result = 37 * result + _inputList.hashCode();
726 org.castor.util.CycleBreaker.releaseCycleHandle(_inputList);
735 * @return true if this object is valid according to the schema
737 public boolean isValid() {
740 } catch (org.exolab.castor.xml.ValidationException vex) {
750 * @throws org.exolab.castor.xml.MarshalException
751 * if object is null or if any SAXException is thrown during
753 * @throws org.exolab.castor.xml.ValidationException
754 * if this object is an invalid instance according to the schema
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);
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
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);
782 public void removeAllInput() {
783 this._inputList.clear();
788 public void removeAllParam() {
789 this._paramList.clear();
794 public void removeAllProperty() {
795 this._propertyList.clear();
799 * Method removeInput.
802 * @return true if the object was removed from the collection.
804 public boolean removeInput(final uk.ac.vamsas.objects.core.Input vInput) {
805 boolean removed = _inputList.remove(vInput);
810 * Method removeInputAt.
813 * @return the element removed from the collection
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;
821 * Method removeParam.
824 * @return true if the object was removed from the collection.
826 public boolean removeParam(final uk.ac.vamsas.objects.core.Param vParam) {
827 boolean removed = _paramList.remove(vParam);
832 * Method removeParamAt.
835 * @return the element removed from the collection
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;
843 * Method removeProperty.
846 * @return true if the object was removed from the collection.
848 public boolean removeProperty(
849 final uk.ac.vamsas.objects.core.Property vProperty) {
850 boolean removed = _propertyList.remove(vProperty);
855 * Method removePropertyAt.
858 * @return the element removed from the collection
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;
866 * Sets the value of field 'action'. The field 'action' has the following
867 * description: Did what
870 * the value of field 'action'.
872 public void setAction(final java.lang.String action) {
873 this._action = action;
877 * Sets the value of field 'app'. The field 'app' has the following
878 * description: With which application
881 * the value of field 'app'.
883 public void setApp(final java.lang.String app) {
888 * Sets the value of field 'date'. The field 'date' has the following
892 * the value of field 'date'.
894 public void setDate(final java.util.Date date) {
899 * Sets the value of field 'id'. The field 'id' has the following description:
900 * Primary Key for vamsas object referencing
904 * the value of field 'id'.
906 public void setId(final java.lang.String id) {
915 * @throws java.lang.IndexOutOfBoundsException
916 * if the index given is outside the bounds of the collection
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) + "]");
927 this._inputList.set(index, vInput);
935 public void setInput(final uk.ac.vamsas.objects.core.Input[] vInputArray) {
939 for (int i = 0; i < vInputArray.length; i++) {
940 this._inputList.add(vInputArray[i]);
945 * Sets the value of '_inputList' by copying the given Vector. All elements
946 * will be checked for type safety.
949 * the Vector to copy.
951 public void setInput(final java.util.Vector vInputList) {
953 this._inputList.clear();
955 this._inputList.addAll(vInputList);
959 * Sets the value of '_inputList' by setting it to the given Vector. No type
960 * checking is performed.
967 public void setInputAsReference(final java.util.Vector inputVector) {
968 this._inputList = inputVector;
976 * @throws java.lang.IndexOutOfBoundsException
977 * if the index given is outside the bounds of the collection
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) + "]");
988 this._paramList.set(index, vParam);
996 public void setParam(final uk.ac.vamsas.objects.core.Param[] vParamArray) {
1000 for (int i = 0; i < vParamArray.length; i++) {
1001 this._paramList.add(vParamArray[i]);
1006 * Sets the value of '_paramList' by copying the given Vector. All elements
1007 * will be checked for type safety.
1010 * the Vector to copy.
1012 public void setParam(final java.util.Vector vParamList) {
1014 this._paramList.clear();
1016 this._paramList.addAll(vParamList);
1020 * Sets the value of '_paramList' by setting it to the given Vector. No type
1021 * checking is performed.
1025 * @param paramVector
1026 * the Vector to set.
1028 public void setParamAsReference(final java.util.Vector paramVector) {
1029 this._paramList = paramVector;
1037 * @throws java.lang.IndexOutOfBoundsException
1038 * if the index given is outside the bounds of the collection
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) + "]");
1049 this._propertyList.set(index, vProperty);
1055 * @param vPropertyArray
1057 public void setProperty(
1058 final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {
1060 _propertyList.clear();
1062 for (int i = 0; i < vPropertyArray.length; i++) {
1063 this._propertyList.add(vPropertyArray[i]);
1068 * Sets the value of '_propertyList' by copying the given Vector. All elements
1069 * will be checked for type safety.
1071 * @param vPropertyList
1072 * the Vector to copy.
1074 public void setProperty(final java.util.Vector vPropertyList) {
1076 this._propertyList.clear();
1078 this._propertyList.addAll(vPropertyList);
1082 * Sets the value of '_propertyList' by setting it to the given Vector. No
1083 * type checking is performed.
1087 * @param propertyVector
1088 * the Vector to set.
1090 public void setPropertyAsReference(final java.util.Vector propertyVector) {
1091 this._propertyList = propertyVector;
1095 * Sets the value of field 'user'. The field 'user' has the following
1099 * the value of field 'user'.
1101 public void setUser(final java.lang.String user) {
1109 * @throws org.exolab.castor.xml.MarshalException
1110 * if object is null or if any SAXException is thrown during
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
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);
1127 * @throws org.exolab.castor.xml.ValidationException
1128 * if this object is an invalid instance according to the schema
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);