2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
\r
8 package uk.ac.vamsas.objects.core;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import org.exolab.castor.xml.Marshaller;
\r
15 import org.exolab.castor.xml.Unmarshaller;
\r
18 * Annotation for a rangeSpec - values can be attached for the
\r
20 * specification, and to each position within the spec. following
\r
22 * specified by the ordered set of rangeSpec (pos, seg) elements.
\r
24 * @version $Revision$ $Date$
\r
26 public class RangeAnnotation extends uk.ac.vamsas.objects.core.RangeType
\r
27 implements java.io.Serializable
\r
31 //--------------------------/
\r
32 //- Class/Member Variables -/
\r
33 //--------------------------/
\r
36 * Primary Key for vamsas object referencing
\r
39 private java.lang.String _id;
\r
42 * Field _modifiable.
\r
44 private java.lang.String _modifiable;
\r
47 * Annotation with the same non-empty group name are grouped
\r
50 private java.lang.String _group = "";
\r
53 * A Das Feature has both a type and a Type ID. We go the
\r
54 * route of requiring the type string to be taken from a
\r
56 * vocabulary if an application expects others to make sense
\r
58 * type may qualified - so uniprot:CHAIN is a valid type name,
\r
60 * considered distinct from someotherDB:CHAIN
\r
62 private java.lang.String _type;
\r
65 * Short, meaningful name for the annotation - if this
\r
66 * is absent, then the type string should be used in its
\r
70 private java.lang.String _label;
\r
73 * Human readable description of the annotation
\r
76 private java.lang.String _description;
\r
79 * TODO: specify this - we have considered taking the GO
\r
80 * evidence codes as a model for assessing a measure of
\r
84 private java.lang.String _status;
\r
87 * Annotation Element position maps to ordered positions
\r
88 * defined by the sequence of rangeType pos positions or
\r
90 * seg start/end segments.
\r
92 private java.util.Vector _annotationElementList;
\r
95 * Ordered set of optionally named float values for the
\r
98 private java.util.Vector _scoreList;
\r
103 private java.util.Vector _linkList;
\r
106 * Note:These are mutable so an application should check
\r
109 private java.util.Vector _propertyList;
\r
112 //----------------/
\r
113 //- Constructors -/
\r
114 //----------------/
\r
116 public RangeAnnotation() {
\r
119 this._annotationElementList = new java.util.Vector();
\r
120 this._scoreList = new java.util.Vector();
\r
121 this._linkList = new java.util.Vector();
\r
122 this._propertyList = new java.util.Vector();
\r
133 * @param vAnnotationElement
\r
134 * @throws java.lang.IndexOutOfBoundsException if the index
\r
135 * given is outside the bounds of the collection
\r
137 public void addAnnotationElement(
\r
138 final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)
\r
139 throws java.lang.IndexOutOfBoundsException {
\r
140 this._annotationElementList.addElement(vAnnotationElement);
\r
147 * @param vAnnotationElement
\r
148 * @throws java.lang.IndexOutOfBoundsException if the index
\r
149 * given is outside the bounds of the collection
\r
151 public void addAnnotationElement(
\r
153 final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)
\r
154 throws java.lang.IndexOutOfBoundsException {
\r
155 this._annotationElementList.add(index, vAnnotationElement);
\r
162 * @throws java.lang.IndexOutOfBoundsException if the index
\r
163 * given is outside the bounds of the collection
\r
165 public void addLink(
\r
166 final uk.ac.vamsas.objects.core.Link vLink)
\r
167 throws java.lang.IndexOutOfBoundsException {
\r
168 this._linkList.addElement(vLink);
\r
176 * @throws java.lang.IndexOutOfBoundsException if the index
\r
177 * given is outside the bounds of the collection
\r
179 public void addLink(
\r
181 final uk.ac.vamsas.objects.core.Link vLink)
\r
182 throws java.lang.IndexOutOfBoundsException {
\r
183 this._linkList.add(index, vLink);
\r
190 * @throws java.lang.IndexOutOfBoundsException if the index
\r
191 * given is outside the bounds of the collection
\r
193 public void addProperty(
\r
194 final uk.ac.vamsas.objects.core.Property vProperty)
\r
195 throws java.lang.IndexOutOfBoundsException {
\r
196 this._propertyList.addElement(vProperty);
\r
204 * @throws java.lang.IndexOutOfBoundsException if the index
\r
205 * given is outside the bounds of the collection
\r
207 public void addProperty(
\r
209 final uk.ac.vamsas.objects.core.Property vProperty)
\r
210 throws java.lang.IndexOutOfBoundsException {
\r
211 this._propertyList.add(index, vProperty);
\r
218 * @throws java.lang.IndexOutOfBoundsException if the index
\r
219 * given is outside the bounds of the collection
\r
221 public void addScore(
\r
222 final uk.ac.vamsas.objects.core.Score vScore)
\r
223 throws java.lang.IndexOutOfBoundsException {
\r
224 this._scoreList.addElement(vScore);
\r
232 * @throws java.lang.IndexOutOfBoundsException if the index
\r
233 * given is outside the bounds of the collection
\r
235 public void addScore(
\r
237 final uk.ac.vamsas.objects.core.Score vScore)
\r
238 throws java.lang.IndexOutOfBoundsException {
\r
239 this._scoreList.add(index, vScore);
\r
243 * Method enumerateAnnotationElement.
\r
245 * @return an Enumeration over all
\r
246 * uk.ac.vamsas.objects.core.AnnotationElement elements
\r
248 public java.util.Enumeration enumerateAnnotationElement(
\r
250 return this._annotationElementList.elements();
\r
254 * Method enumerateLink.
\r
256 * @return an Enumeration over all
\r
257 * uk.ac.vamsas.objects.core.Link elements
\r
259 public java.util.Enumeration enumerateLink(
\r
261 return this._linkList.elements();
\r
265 * Method enumerateProperty.
\r
267 * @return an Enumeration over all
\r
268 * uk.ac.vamsas.objects.core.Property elements
\r
270 public java.util.Enumeration enumerateProperty(
\r
272 return this._propertyList.elements();
\r
276 * Method enumerateScore.
\r
278 * @return an Enumeration over all
\r
279 * uk.ac.vamsas.objects.core.Score elements
\r
281 public java.util.Enumeration enumerateScore(
\r
283 return this._scoreList.elements();
\r
287 * Overrides the java.lang.Object.equals method.
\r
290 * @return true if the objects are equal.
\r
292 public boolean equals(
\r
293 final java.lang.Object obj) {
\r
297 if (super.equals(obj)==false)
\r
300 if (obj instanceof RangeAnnotation) {
\r
302 RangeAnnotation temp = (RangeAnnotation)obj;
\r
303 if (this._id != null) {
\r
304 if (temp._id == null) return false;
\r
305 else if (!(this._id.equals(temp._id)))
\r
308 else if (temp._id != null)
\r
310 if (this._modifiable != null) {
\r
311 if (temp._modifiable == null) return false;
\r
312 else if (!(this._modifiable.equals(temp._modifiable)))
\r
315 else if (temp._modifiable != null)
\r
317 if (this._group != null) {
\r
318 if (temp._group == null) return false;
\r
319 else if (!(this._group.equals(temp._group)))
\r
322 else if (temp._group != null)
\r
324 if (this._type != null) {
\r
325 if (temp._type == null) return false;
\r
326 else if (!(this._type.equals(temp._type)))
\r
329 else if (temp._type != null)
\r
331 if (this._label != null) {
\r
332 if (temp._label == null) return false;
\r
333 else if (!(this._label.equals(temp._label)))
\r
336 else if (temp._label != null)
\r
338 if (this._description != null) {
\r
339 if (temp._description == null) return false;
\r
340 else if (!(this._description.equals(temp._description)))
\r
343 else if (temp._description != null)
\r
345 if (this._status != null) {
\r
346 if (temp._status == null) return false;
\r
347 else if (!(this._status.equals(temp._status)))
\r
350 else if (temp._status != null)
\r
352 if (this._annotationElementList != null) {
\r
353 if (temp._annotationElementList == null) return false;
\r
354 else if (!(this._annotationElementList.equals(temp._annotationElementList)))
\r
357 else if (temp._annotationElementList != null)
\r
359 if (this._scoreList != null) {
\r
360 if (temp._scoreList == null) return false;
\r
361 else if (!(this._scoreList.equals(temp._scoreList)))
\r
364 else if (temp._scoreList != null)
\r
366 if (this._linkList != null) {
\r
367 if (temp._linkList == null) return false;
\r
368 else if (!(this._linkList.equals(temp._linkList)))
\r
371 else if (temp._linkList != null)
\r
373 if (this._propertyList != null) {
\r
374 if (temp._propertyList == null) return false;
\r
375 else if (!(this._propertyList.equals(temp._propertyList)))
\r
378 else if (temp._propertyList != null)
\r
386 * Method getAnnotationElement.
\r
389 * @throws java.lang.IndexOutOfBoundsException if the index
\r
390 * given is outside the bounds of the collection
\r
391 * @return the value of the
\r
392 * uk.ac.vamsas.objects.core.AnnotationElement at the given inde
\r
394 public uk.ac.vamsas.objects.core.AnnotationElement getAnnotationElement(
\r
396 throws java.lang.IndexOutOfBoundsException {
\r
397 // check bounds for index
\r
398 if (index < 0 || index >= this._annotationElementList.size()) {
\r
399 throw new IndexOutOfBoundsException("getAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");
\r
402 return (uk.ac.vamsas.objects.core.AnnotationElement) _annotationElementList.get(index);
\r
406 * Method getAnnotationElement.Returns the contents of the
\r
407 * collection in an Array. <p>Note: Just in case the
\r
408 * collection contents are changing in another thread, we pass
\r
409 * a 0-length Array of the correct type into the API call.
\r
410 * This way we <i>know</i> that the Array returned is of
\r
411 * exactly the correct length.
\r
413 * @return this collection as an Array
\r
415 public uk.ac.vamsas.objects.core.AnnotationElement[] getAnnotationElement(
\r
417 uk.ac.vamsas.objects.core.AnnotationElement[] array = new uk.ac.vamsas.objects.core.AnnotationElement[0];
\r
418 return (uk.ac.vamsas.objects.core.AnnotationElement[]) this._annotationElementList.toArray(array);
\r
422 * Method getAnnotationElementAsReference.Returns a reference
\r
423 * to '_annotationElementList'. No type checking is performed
\r
424 * on any modifications to the Vector.
\r
426 * @return a reference to the Vector backing this class
\r
428 public java.util.Vector getAnnotationElementAsReference(
\r
430 return this._annotationElementList;
\r
434 * Method getAnnotationElementCount.
\r
436 * @return the size of this collection
\r
438 public int getAnnotationElementCount(
\r
440 return this._annotationElementList.size();
\r
444 * Returns the value of field 'description'. The field
\r
445 * 'description' has the following description: Human readable
\r
446 * description of the annotation
\r
449 * @return the value of field 'Description'.
\r
451 public java.lang.String getDescription(
\r
453 return this._description;
\r
457 * Returns the value of field 'group'. The field 'group' has
\r
458 * the following description: Annotation with the same
\r
459 * non-empty group name are grouped
\r
462 * @return the value of field 'Group'.
\r
464 public java.lang.String getGroup(
\r
466 return this._group;
\r
470 * Returns the value of field 'id'. The field 'id' has the
\r
471 * following description: Primary Key for vamsas object
\r
475 * @return the value of field 'Id'.
\r
477 public java.lang.String getId(
\r
483 * Returns the value of field 'label'. The field 'label' has
\r
484 * the following description: Short, meaningful name for the
\r
485 * annotation - if this
\r
486 * is absent, then the type string should be used in its
\r
490 * @return the value of field 'Label'.
\r
492 public java.lang.String getLabel(
\r
494 return this._label;
\r
501 * @throws java.lang.IndexOutOfBoundsException if the index
\r
502 * given is outside the bounds of the collection
\r
503 * @return the value of the uk.ac.vamsas.objects.core.Link at
\r
506 public uk.ac.vamsas.objects.core.Link getLink(
\r
508 throws java.lang.IndexOutOfBoundsException {
\r
509 // check bounds for index
\r
510 if (index < 0 || index >= this._linkList.size()) {
\r
511 throw new IndexOutOfBoundsException("getLink: Index value '" + index + "' not in range [0.." + (this._linkList.size() - 1) + "]");
\r
514 return (uk.ac.vamsas.objects.core.Link) _linkList.get(index);
\r
518 * Method getLink.Returns the contents of the collection in an
\r
519 * Array. <p>Note: Just in case the collection contents are
\r
520 * changing in another thread, we pass a 0-length Array of the
\r
521 * correct type into the API call. This way we <i>know</i>
\r
522 * that the Array returned is of exactly the correct length.
\r
524 * @return this collection as an Array
\r
526 public uk.ac.vamsas.objects.core.Link[] getLink(
\r
528 uk.ac.vamsas.objects.core.Link[] array = new uk.ac.vamsas.objects.core.Link[0];
\r
529 return (uk.ac.vamsas.objects.core.Link[]) this._linkList.toArray(array);
\r
533 * Method getLinkAsReference.Returns a reference to
\r
534 * '_linkList'. No type checking is performed on any
\r
535 * modifications to the Vector.
\r
537 * @return a reference to the Vector backing this class
\r
539 public java.util.Vector getLinkAsReference(
\r
541 return this._linkList;
\r
545 * Method getLinkCount.
\r
547 * @return the size of this collection
\r
549 public int getLinkCount(
\r
551 return this._linkList.size();
\r
555 * Returns the value of field 'modifiable'.
\r
557 * @return the value of field 'Modifiable'.
\r
559 public java.lang.String getModifiable(
\r
561 return this._modifiable;
\r
565 * Method getProperty.
\r
568 * @throws java.lang.IndexOutOfBoundsException if the index
\r
569 * given is outside the bounds of the collection
\r
570 * @return the value of the uk.ac.vamsas.objects.core.Property
\r
571 * at the given index
\r
573 public uk.ac.vamsas.objects.core.Property getProperty(
\r
575 throws java.lang.IndexOutOfBoundsException {
\r
576 // check bounds for index
\r
577 if (index < 0 || index >= this._propertyList.size()) {
\r
578 throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
\r
581 return (uk.ac.vamsas.objects.core.Property) _propertyList.get(index);
\r
585 * Method getProperty.Returns the contents of the collection in
\r
586 * an Array. <p>Note: Just in case the collection contents
\r
587 * are changing in another thread, we pass a 0-length Array of
\r
588 * the correct type into the API call. This way we <i>know</i>
\r
589 * that the Array returned is of exactly the correct length.
\r
591 * @return this collection as an Array
\r
593 public uk.ac.vamsas.objects.core.Property[] getProperty(
\r
595 uk.ac.vamsas.objects.core.Property[] array = new uk.ac.vamsas.objects.core.Property[0];
\r
596 return (uk.ac.vamsas.objects.core.Property[]) this._propertyList.toArray(array);
\r
600 * Method getPropertyAsReference.Returns a reference to
\r
601 * '_propertyList'. No type checking is performed on any
\r
602 * modifications to the Vector.
\r
604 * @return a reference to the Vector backing this class
\r
606 public java.util.Vector getPropertyAsReference(
\r
608 return this._propertyList;
\r
612 * Method getPropertyCount.
\r
614 * @return the size of this collection
\r
616 public int getPropertyCount(
\r
618 return this._propertyList.size();
\r
625 * @throws java.lang.IndexOutOfBoundsException if the index
\r
626 * given is outside the bounds of the collection
\r
627 * @return the value of the uk.ac.vamsas.objects.core.Score at
\r
630 public uk.ac.vamsas.objects.core.Score getScore(
\r
632 throws java.lang.IndexOutOfBoundsException {
\r
633 // check bounds for index
\r
634 if (index < 0 || index >= this._scoreList.size()) {
\r
635 throw new IndexOutOfBoundsException("getScore: Index value '" + index + "' not in range [0.." + (this._scoreList.size() - 1) + "]");
\r
638 return (uk.ac.vamsas.objects.core.Score) _scoreList.get(index);
\r
642 * Method getScore.Returns the contents of the collection in an
\r
643 * Array. <p>Note: Just in case the collection contents are
\r
644 * changing in another thread, we pass a 0-length Array of the
\r
645 * correct type into the API call. This way we <i>know</i>
\r
646 * that the Array returned is of exactly the correct length.
\r
648 * @return this collection as an Array
\r
650 public uk.ac.vamsas.objects.core.Score[] getScore(
\r
652 uk.ac.vamsas.objects.core.Score[] array = new uk.ac.vamsas.objects.core.Score[0];
\r
653 return (uk.ac.vamsas.objects.core.Score[]) this._scoreList.toArray(array);
\r
657 * Method getScoreAsReference.Returns a reference to
\r
658 * '_scoreList'. No type checking is performed on any
\r
659 * modifications to the Vector.
\r
661 * @return a reference to the Vector backing this class
\r
663 public java.util.Vector getScoreAsReference(
\r
665 return this._scoreList;
\r
669 * Method getScoreCount.
\r
671 * @return the size of this collection
\r
673 public int getScoreCount(
\r
675 return this._scoreList.size();
\r
679 * Returns the value of field 'status'. The field 'status' has
\r
680 * the following description: TODO: specify this - we have
\r
681 * considered taking the GO
\r
682 * evidence codes as a model for assessing a measure of
\r
686 * @return the value of field 'Status'.
\r
688 public java.lang.String getStatus(
\r
690 return this._status;
\r
694 * Returns the value of field 'type'. The field 'type' has the
\r
695 * following description: A Das Feature has both a type and a
\r
696 * Type ID. We go the
\r
697 * route of requiring the type string to be taken from a
\r
699 * vocabulary if an application expects others to make sense
\r
701 * type may qualified - so uniprot:CHAIN is a valid type name,
\r
703 * considered distinct from someotherDB:CHAIN
\r
705 * @return the value of field 'Type'.
\r
707 public java.lang.String getType(
\r
713 * Overrides the java.lang.Object.hashCode method.
\r
715 * The following steps came from <b>Effective Java Programming
\r
716 * Language Guide</b> by Joshua Bloch, Chapter 3
\r
718 * @return a hash code value for the object.
\r
720 public int hashCode(
\r
722 int result = super.hashCode();
\r
726 result = 37 * result + _id.hashCode();
\r
728 if (_modifiable != null) {
\r
729 result = 37 * result + _modifiable.hashCode();
\r
731 if (_group != null) {
\r
732 result = 37 * result + _group.hashCode();
\r
734 if (_type != null) {
\r
735 result = 37 * result + _type.hashCode();
\r
737 if (_label != null) {
\r
738 result = 37 * result + _label.hashCode();
\r
740 if (_description != null) {
\r
741 result = 37 * result + _description.hashCode();
\r
743 if (_status != null) {
\r
744 result = 37 * result + _status.hashCode();
\r
746 if (_annotationElementList != null) {
\r
747 result = 37 * result + _annotationElementList.hashCode();
\r
749 if (_scoreList != null) {
\r
750 result = 37 * result + _scoreList.hashCode();
\r
752 if (_linkList != null) {
\r
753 result = 37 * result + _linkList.hashCode();
\r
755 if (_propertyList != null) {
\r
756 result = 37 * result + _propertyList.hashCode();
\r
765 * @return true if this object is valid according to the schema
\r
767 public boolean isValid(
\r
771 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
781 * @throws org.exolab.castor.xml.MarshalException if object is
\r
782 * null or if any SAXException is thrown during marshaling
\r
783 * @throws org.exolab.castor.xml.ValidationException if this
\r
784 * object is an invalid instance according to the schema
\r
786 public void marshal(
\r
787 final java.io.Writer out)
\r
788 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
789 Marshaller.marshal(this, out);
\r
796 * @throws java.io.IOException if an IOException occurs during
\r
798 * @throws org.exolab.castor.xml.ValidationException if this
\r
799 * object is an invalid instance according to the schema
\r
800 * @throws org.exolab.castor.xml.MarshalException if object is
\r
801 * null or if any SAXException is thrown during marshaling
\r
803 public void marshal(
\r
804 final org.xml.sax.ContentHandler handler)
\r
805 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
806 Marshaller.marshal(this, handler);
\r
811 public void removeAllAnnotationElement(
\r
813 this._annotationElementList.clear();
\r
818 public void removeAllLink(
\r
820 this._linkList.clear();
\r
825 public void removeAllProperty(
\r
827 this._propertyList.clear();
\r
832 public void removeAllScore(
\r
834 this._scoreList.clear();
\r
838 * Method removeAnnotationElement.
\r
840 * @param vAnnotationElement
\r
841 * @return true if the object was removed from the collection.
\r
843 public boolean removeAnnotationElement(
\r
844 final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement) {
\r
845 boolean removed = _annotationElementList.remove(vAnnotationElement);
\r
850 * Method removeAnnotationElementAt.
\r
853 * @return the element removed from the collection
\r
855 public uk.ac.vamsas.objects.core.AnnotationElement removeAnnotationElementAt(
\r
857 java.lang.Object obj = this._annotationElementList.remove(index);
\r
858 return (uk.ac.vamsas.objects.core.AnnotationElement) obj;
\r
862 * Method removeLink.
\r
865 * @return true if the object was removed from the collection.
\r
867 public boolean removeLink(
\r
868 final uk.ac.vamsas.objects.core.Link vLink) {
\r
869 boolean removed = _linkList.remove(vLink);
\r
874 * Method removeLinkAt.
\r
877 * @return the element removed from the collection
\r
879 public uk.ac.vamsas.objects.core.Link removeLinkAt(
\r
881 java.lang.Object obj = this._linkList.remove(index);
\r
882 return (uk.ac.vamsas.objects.core.Link) obj;
\r
886 * Method removeProperty.
\r
889 * @return true if the object was removed from the collection.
\r
891 public boolean removeProperty(
\r
892 final uk.ac.vamsas.objects.core.Property vProperty) {
\r
893 boolean removed = _propertyList.remove(vProperty);
\r
898 * Method removePropertyAt.
\r
901 * @return the element removed from the collection
\r
903 public uk.ac.vamsas.objects.core.Property removePropertyAt(
\r
905 java.lang.Object obj = this._propertyList.remove(index);
\r
906 return (uk.ac.vamsas.objects.core.Property) obj;
\r
910 * Method removeScore.
\r
913 * @return true if the object was removed from the collection.
\r
915 public boolean removeScore(
\r
916 final uk.ac.vamsas.objects.core.Score vScore) {
\r
917 boolean removed = _scoreList.remove(vScore);
\r
922 * Method removeScoreAt.
\r
925 * @return the element removed from the collection
\r
927 public uk.ac.vamsas.objects.core.Score removeScoreAt(
\r
929 java.lang.Object obj = this._scoreList.remove(index);
\r
930 return (uk.ac.vamsas.objects.core.Score) obj;
\r
937 * @param vAnnotationElement
\r
938 * @throws java.lang.IndexOutOfBoundsException if the index
\r
939 * given is outside the bounds of the collection
\r
941 public void setAnnotationElement(
\r
943 final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)
\r
944 throws java.lang.IndexOutOfBoundsException {
\r
945 // check bounds for index
\r
946 if (index < 0 || index >= this._annotationElementList.size()) {
\r
947 throw new IndexOutOfBoundsException("setAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");
\r
950 this._annotationElementList.set(index, vAnnotationElement);
\r
956 * @param vAnnotationElementArray
\r
958 public void setAnnotationElement(
\r
959 final uk.ac.vamsas.objects.core.AnnotationElement[] vAnnotationElementArray) {
\r
961 _annotationElementList.clear();
\r
963 for (int i = 0; i < vAnnotationElementArray.length; i++) {
\r
964 this._annotationElementList.add(vAnnotationElementArray[i]);
\r
969 * Sets the value of '_annotationElementList' by copying the
\r
970 * given Vector. All elements will be checked for type safety.
\r
972 * @param vAnnotationElementList the Vector to copy.
\r
974 public void setAnnotationElement(
\r
975 final java.util.Vector vAnnotationElementList) {
\r
977 this._annotationElementList.clear();
\r
979 this._annotationElementList.addAll(vAnnotationElementList);
\r
983 * Sets the value of '_annotationElementList' by setting it to
\r
984 * the given Vector. No type checking is performed.
\r
987 * @param annotationElementVector the Vector to set.
\r
989 public void setAnnotationElementAsReference(
\r
990 final java.util.Vector annotationElementVector) {
\r
991 this._annotationElementList = annotationElementVector;
\r
995 * Sets the value of field 'description'. The field
\r
996 * 'description' has the following description: Human readable
\r
997 * description of the annotation
\r
1000 * @param description the value of field 'description'.
\r
1002 public void setDescription(
\r
1003 final java.lang.String description) {
\r
1004 this._description = description;
\r
1008 * Sets the value of field 'group'. The field 'group' has the
\r
1009 * following description: Annotation with the same non-empty
\r
1010 * group name are grouped
\r
1013 * @param group the value of field 'group'.
\r
1015 public void setGroup(
\r
1016 final java.lang.String group) {
\r
1017 this._group = group;
\r
1021 * Sets the value of field 'id'. The field 'id' has the
\r
1022 * following description: Primary Key for vamsas object
\r
1026 * @param id the value of field 'id'.
\r
1028 public void setId(
\r
1029 final java.lang.String id) {
\r
1034 * Sets the value of field 'label'. The field 'label' has the
\r
1035 * following description: Short, meaningful name for the
\r
1036 * annotation - if this
\r
1037 * is absent, then the type string should be used in its
\r
1041 * @param label the value of field 'label'.
\r
1043 public void setLabel(
\r
1044 final java.lang.String label) {
\r
1045 this._label = label;
\r
1053 * @throws java.lang.IndexOutOfBoundsException if the index
\r
1054 * given is outside the bounds of the collection
\r
1056 public void setLink(
\r
1058 final uk.ac.vamsas.objects.core.Link vLink)
\r
1059 throws java.lang.IndexOutOfBoundsException {
\r
1060 // check bounds for index
\r
1061 if (index < 0 || index >= this._linkList.size()) {
\r
1062 throw new IndexOutOfBoundsException("setLink: Index value '" + index + "' not in range [0.." + (this._linkList.size() - 1) + "]");
\r
1065 this._linkList.set(index, vLink);
\r
1071 * @param vLinkArray
\r
1073 public void setLink(
\r
1074 final uk.ac.vamsas.objects.core.Link[] vLinkArray) {
\r
1076 _linkList.clear();
\r
1078 for (int i = 0; i < vLinkArray.length; i++) {
\r
1079 this._linkList.add(vLinkArray[i]);
\r
1084 * Sets the value of '_linkList' by copying the given Vector.
\r
1085 * All elements will be checked for type safety.
\r
1087 * @param vLinkList the Vector to copy.
\r
1089 public void setLink(
\r
1090 final java.util.Vector vLinkList) {
\r
1092 this._linkList.clear();
\r
1094 this._linkList.addAll(vLinkList);
\r
1098 * Sets the value of '_linkList' by setting it to the given
\r
1099 * Vector. No type checking is performed.
\r
1102 * @param linkVector the Vector to set.
\r
1104 public void setLinkAsReference(
\r
1105 final java.util.Vector linkVector) {
\r
1106 this._linkList = linkVector;
\r
1110 * Sets the value of field 'modifiable'.
\r
1112 * @param modifiable the value of field 'modifiable'.
\r
1114 public void setModifiable(
\r
1115 final java.lang.String modifiable) {
\r
1116 this._modifiable = modifiable;
\r
1123 * @param vProperty
\r
1124 * @throws java.lang.IndexOutOfBoundsException if the index
\r
1125 * given is outside the bounds of the collection
\r
1127 public void setProperty(
\r
1129 final uk.ac.vamsas.objects.core.Property vProperty)
\r
1130 throws java.lang.IndexOutOfBoundsException {
\r
1131 // check bounds for index
\r
1132 if (index < 0 || index >= this._propertyList.size()) {
\r
1133 throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
\r
1136 this._propertyList.set(index, vProperty);
\r
1142 * @param vPropertyArray
\r
1144 public void setProperty(
\r
1145 final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {
\r
1147 _propertyList.clear();
\r
1149 for (int i = 0; i < vPropertyArray.length; i++) {
\r
1150 this._propertyList.add(vPropertyArray[i]);
\r
1155 * Sets the value of '_propertyList' by copying the given
\r
1156 * Vector. All elements will be checked for type safety.
\r
1158 * @param vPropertyList the Vector to copy.
\r
1160 public void setProperty(
\r
1161 final java.util.Vector vPropertyList) {
\r
1163 this._propertyList.clear();
\r
1165 this._propertyList.addAll(vPropertyList);
\r
1169 * Sets the value of '_propertyList' by setting it to the given
\r
1170 * Vector. No type checking is performed.
\r
1173 * @param propertyVector the Vector to set.
\r
1175 public void setPropertyAsReference(
\r
1176 final java.util.Vector propertyVector) {
\r
1177 this._propertyList = propertyVector;
\r
1185 * @throws java.lang.IndexOutOfBoundsException if the index
\r
1186 * given is outside the bounds of the collection
\r
1188 public void setScore(
\r
1190 final uk.ac.vamsas.objects.core.Score vScore)
\r
1191 throws java.lang.IndexOutOfBoundsException {
\r
1192 // check bounds for index
\r
1193 if (index < 0 || index >= this._scoreList.size()) {
\r
1194 throw new IndexOutOfBoundsException("setScore: Index value '" + index + "' not in range [0.." + (this._scoreList.size() - 1) + "]");
\r
1197 this._scoreList.set(index, vScore);
\r
1203 * @param vScoreArray
\r
1205 public void setScore(
\r
1206 final uk.ac.vamsas.objects.core.Score[] vScoreArray) {
\r
1208 _scoreList.clear();
\r
1210 for (int i = 0; i < vScoreArray.length; i++) {
\r
1211 this._scoreList.add(vScoreArray[i]);
\r
1216 * Sets the value of '_scoreList' by copying the given Vector.
\r
1217 * All elements will be checked for type safety.
\r
1219 * @param vScoreList the Vector to copy.
\r
1221 public void setScore(
\r
1222 final java.util.Vector vScoreList) {
\r
1224 this._scoreList.clear();
\r
1226 this._scoreList.addAll(vScoreList);
\r
1230 * Sets the value of '_scoreList' by setting it to the given
\r
1231 * Vector. No type checking is performed.
\r
1234 * @param scoreVector the Vector to set.
\r
1236 public void setScoreAsReference(
\r
1237 final java.util.Vector scoreVector) {
\r
1238 this._scoreList = scoreVector;
\r
1242 * Sets the value of field 'status'. The field 'status' has the
\r
1243 * following description: TODO: specify this - we have
\r
1244 * considered taking the GO
\r
1245 * evidence codes as a model for assessing a measure of
\r
1249 * @param status the value of field 'status'.
\r
1251 public void setStatus(
\r
1252 final java.lang.String status) {
\r
1253 this._status = status;
\r
1257 * Sets the value of field 'type'. The field 'type' has the
\r
1258 * following description: A Das Feature has both a type and a
\r
1259 * Type ID. We go the
\r
1260 * route of requiring the type string to be taken from a
\r
1262 * vocabulary if an application expects others to make sense
\r
1264 * type may qualified - so uniprot:CHAIN is a valid type name,
\r
1266 * considered distinct from someotherDB:CHAIN
\r
1268 * @param type the value of field 'type'.
\r
1270 public void setType(
\r
1271 final java.lang.String type) {
\r
1272 this._type = type;
\r
1276 * Method unmarshal.
\r
1279 * @throws org.exolab.castor.xml.MarshalException if object is
\r
1280 * null or if any SAXException is thrown during marshaling
\r
1281 * @throws org.exolab.castor.xml.ValidationException if this
\r
1282 * object is an invalid instance according to the schema
\r
1283 * @return the unmarshaled uk.ac.vamsas.objects.core.RangeType
\r
1285 public static uk.ac.vamsas.objects.core.RangeType unmarshal(
\r
1286 final java.io.Reader reader)
\r
1287 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
1288 return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.RangeAnnotation.class, reader);
\r
1294 * @throws org.exolab.castor.xml.ValidationException if this
\r
1295 * object is an invalid instance according to the schema
\r
1297 public void validate(
\r
1299 throws org.exolab.castor.xml.ValidationException {
\r
1300 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
1301 validator.validate(this);
\r