-/*\r
- * This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
- * Schema.\r
- * $Id$\r
- */\r
-\r
-package org.vamsas.objects.core;\r
-\r
- //---------------------------------/\r
- //- Imported classes and packages -/\r
-//---------------------------------/\r
-\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import java.util.Enumeration;\r
-import java.util.Vector;\r
-import org.exolab.castor.xml.MarshalException;\r
-import org.exolab.castor.xml.Marshaller;\r
-import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
-\r
-/**\r
- * Annotation for a rangeSpec - values can be attached for the\r
- * whole\r
- * specification, and to each position within the spec. following\r
- * the orientation\r
- * specified by the ordered set of rangeSpec (pos, seg) elements. \r
- * \r
- * @version $Revision$ $Date$\r
- */\r
-public class RangeAnnotation extends org.vamsas.objects.core.RangeType \r
-implements java.io.Serializable\r
-{\r
-\r
-\r
- //--------------------------/\r
- //- Class/Member Variables -/\r
- //--------------------------/\r
-\r
- /**\r
- * Primary Key for vamsas object referencing\r
- * \r
- */\r
- private java.lang.String _id;\r
-\r
- /**\r
- * Field _modifiable\r
- */\r
- private java.lang.String _modifiable;\r
-\r
- /**\r
- * Annotation with the same non-empty group name are grouped\r
- * together \r
- */\r
- private java.lang.String _group = "";\r
-\r
- /**\r
- * A Das Feature has both a type and a Type ID. We go the\r
- * route of requiring the type string to be taken from a\r
- * controlled\r
- * vocabulary if an application expects others to make sense\r
- * of it. The\r
- * type may qualified - so uniprot:CHAIN is a valid type name,\r
- * and\r
- * considered distinct from someotherDB:CHAIN \r
- */\r
- private java.lang.String _type;\r
-\r
- /**\r
- * Short, meaningful name for the annotation - if this\r
- * is absent, then the type string should be used in its\r
- * place.\r
- * \r
- */\r
- private java.lang.String _label;\r
-\r
- /**\r
- * Human readable description of the annotation\r
- * \r
- */\r
- private java.lang.String _description;\r
-\r
- /**\r
- * TODO: specify this - we have considered taking the GO\r
- * evidence codes as a model for assessing a measure of\r
- * quality to an\r
- * annotation. \r
- */\r
- private java.lang.String _status;\r
-\r
- /**\r
- * Annotation Element position maps to ordered positions\r
- * defined by the sequence of rangeType pos positions or\r
- * concatenated\r
- * seg start/end segments. \r
- */\r
- private java.util.Vector _annotationElementList;\r
-\r
- /**\r
- * Ordered set of optionally named float values for the\r
- * whole annotation \r
- */\r
- private java.util.Vector _scoreList;\r
-\r
- /**\r
- * Field _linkList\r
- */\r
- private java.util.Vector _linkList;\r
-\r
- /**\r
- * Note:These are mutable so an application should check\r
- * them each time. \r
- */\r
- private java.util.Vector _propertyList;\r
-\r
-\r
- //----------------/\r
- //- Constructors -/\r
- //----------------/\r
-\r
- public RangeAnnotation() \r
- {\r
- super();\r
- setGroup("");\r
- _annotationElementList = new Vector();\r
- _scoreList = new Vector();\r
- _linkList = new Vector();\r
- _propertyList = new Vector();\r
- } //-- org.vamsas.objects.core.RangeAnnotation()\r
-\r
-\r
- //-----------/\r
- //- Methods -/\r
- //-----------/\r
-\r
- /**\r
- * Method addAnnotationElement\r
- * \r
- * \r
- * \r
- * @param vAnnotationElement\r
- */\r
- public void addAnnotationElement(org.vamsas.objects.core.AnnotationElement vAnnotationElement)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _annotationElementList.addElement(vAnnotationElement);\r
- } //-- void addAnnotationElement(org.vamsas.objects.core.AnnotationElement) \r
-\r
- /**\r
- * Method addAnnotationElement\r
- * \r
- * \r
- * \r
- * @param index\r
- * @param vAnnotationElement\r
- */\r
- public void addAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _annotationElementList.insertElementAt(vAnnotationElement, index);\r
- } //-- void addAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) \r
-\r
- /**\r
- * Method addLink\r
- * \r
- * \r
- * \r
- * @param vLink\r
- */\r
- public void addLink(org.vamsas.objects.core.Link vLink)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _linkList.addElement(vLink);\r
- } //-- void addLink(org.vamsas.objects.core.Link) \r
-\r
- /**\r
- * Method addLink\r
- * \r
- * \r
- * \r
- * @param index\r
- * @param vLink\r
- */\r
- public void addLink(int index, org.vamsas.objects.core.Link vLink)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _linkList.insertElementAt(vLink, index);\r
- } //-- void addLink(int, org.vamsas.objects.core.Link) \r
-\r
- /**\r
- * Method addProperty\r
- * \r
- * \r
- * \r
- * @param vProperty\r
- */\r
- public void addProperty(org.vamsas.objects.core.Property vProperty)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _propertyList.addElement(vProperty);\r
- } //-- void addProperty(org.vamsas.objects.core.Property) \r
-\r
- /**\r
- * Method addProperty\r
- * \r
- * \r
- * \r
- * @param index\r
- * @param vProperty\r
- */\r
- public void addProperty(int index, org.vamsas.objects.core.Property vProperty)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _propertyList.insertElementAt(vProperty, index);\r
- } //-- void addProperty(int, org.vamsas.objects.core.Property) \r
-\r
- /**\r
- * Method addScore\r
- * \r
- * \r
- * \r
- * @param vScore\r
- */\r
- public void addScore(org.vamsas.objects.core.Score vScore)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _scoreList.addElement(vScore);\r
- } //-- void addScore(org.vamsas.objects.core.Score) \r
-\r
- /**\r
- * Method addScore\r
- * \r
- * \r
- * \r
- * @param index\r
- * @param vScore\r
- */\r
- public void addScore(int index, org.vamsas.objects.core.Score vScore)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _scoreList.insertElementAt(vScore, index);\r
- } //-- void addScore(int, org.vamsas.objects.core.Score) \r
-\r
- /**\r
- * Method enumerateAnnotationElement\r
- * \r
- * \r
- * \r
- * @return Enumeration\r
- */\r
- public java.util.Enumeration enumerateAnnotationElement()\r
- {\r
- return _annotationElementList.elements();\r
- } //-- java.util.Enumeration enumerateAnnotationElement() \r
-\r
- /**\r
- * Method enumerateLink\r
- * \r
- * \r
- * \r
- * @return Enumeration\r
- */\r
- public java.util.Enumeration enumerateLink()\r
- {\r
- return _linkList.elements();\r
- } //-- java.util.Enumeration enumerateLink() \r
-\r
- /**\r
- * Method enumerateProperty\r
- * \r
- * \r
- * \r
- * @return Enumeration\r
- */\r
- public java.util.Enumeration enumerateProperty()\r
- {\r
- return _propertyList.elements();\r
- } //-- java.util.Enumeration enumerateProperty() \r
-\r
- /**\r
- * Method enumerateScore\r
- * \r
- * \r
- * \r
- * @return Enumeration\r
- */\r
- public java.util.Enumeration enumerateScore()\r
- {\r
- return _scoreList.elements();\r
- } //-- java.util.Enumeration enumerateScore() \r
-\r
- /**\r
- * Note: hashCode() has not been overriden\r
- * \r
- * @param obj\r
- * @return boolean\r
- */\r
- public boolean equals(java.lang.Object obj)\r
- {\r
- if ( this == obj )\r
- return true;\r
- \r
- if (super.equals(obj)==false)\r
- return false;\r
- \r
- if (obj instanceof RangeAnnotation) {\r
- \r
- RangeAnnotation temp = (RangeAnnotation)obj;\r
- if (this._id != null) {\r
- if (temp._id == null) return false;\r
- else if (!(this._id.equals(temp._id))) \r
- return false;\r
- }\r
- else if (temp._id != null)\r
- return false;\r
- if (this._modifiable != null) {\r
- if (temp._modifiable == null) return false;\r
- else if (!(this._modifiable.equals(temp._modifiable))) \r
- return false;\r
- }\r
- else if (temp._modifiable != null)\r
- return false;\r
- if (this._group != null) {\r
- if (temp._group == null) return false;\r
- else if (!(this._group.equals(temp._group))) \r
- return false;\r
- }\r
- else if (temp._group != null)\r
- return false;\r
- if (this._type != null) {\r
- if (temp._type == null) return false;\r
- else if (!(this._type.equals(temp._type))) \r
- return false;\r
- }\r
- else if (temp._type != null)\r
- return false;\r
- if (this._label != null) {\r
- if (temp._label == null) return false;\r
- else if (!(this._label.equals(temp._label))) \r
- return false;\r
- }\r
- else if (temp._label != null)\r
- return false;\r
- if (this._description != null) {\r
- if (temp._description == null) return false;\r
- else if (!(this._description.equals(temp._description))) \r
- return false;\r
- }\r
- else if (temp._description != null)\r
- return false;\r
- if (this._status != null) {\r
- if (temp._status == null) return false;\r
- else if (!(this._status.equals(temp._status))) \r
- return false;\r
- }\r
- else if (temp._status != null)\r
- return false;\r
- if (this._annotationElementList != null) {\r
- if (temp._annotationElementList == null) return false;\r
- else if (!(this._annotationElementList.equals(temp._annotationElementList))) \r
- return false;\r
- }\r
- else if (temp._annotationElementList != null)\r
- return false;\r
- if (this._scoreList != null) {\r
- if (temp._scoreList == null) return false;\r
- else if (!(this._scoreList.equals(temp._scoreList))) \r
- return false;\r
- }\r
- else if (temp._scoreList != null)\r
- return false;\r
- if (this._linkList != null) {\r
- if (temp._linkList == null) return false;\r
- else if (!(this._linkList.equals(temp._linkList))) \r
- return false;\r
- }\r
- else if (temp._linkList != null)\r
- return false;\r
- if (this._propertyList != null) {\r
- if (temp._propertyList == null) return false;\r
- else if (!(this._propertyList.equals(temp._propertyList))) \r
- return false;\r
- }\r
- else if (temp._propertyList != null)\r
- return false;\r
- return true;\r
- }\r
- return false;\r
- } //-- boolean equals(java.lang.Object) \r
-\r
- /**\r
- * Method getAnnotationElement\r
- * \r
- * \r
- * \r
- * @param index\r
- * @return AnnotationElement\r
- */\r
- public org.vamsas.objects.core.AnnotationElement getAnnotationElement(int index)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _annotationElementList.size())) {\r
- throw new IndexOutOfBoundsException("getAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");\r
- }\r
- \r
- return (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index);\r
- } //-- org.vamsas.objects.core.AnnotationElement getAnnotationElement(int) \r
-\r
- /**\r
- * Method getAnnotationElement\r
- * \r
- * \r
- * \r
- * @return AnnotationElement\r
- */\r
- public org.vamsas.objects.core.AnnotationElement[] getAnnotationElement()\r
- {\r
- int size = _annotationElementList.size();\r
- org.vamsas.objects.core.AnnotationElement[] mArray = new org.vamsas.objects.core.AnnotationElement[size];\r
- for (int index = 0; index < size; index++) {\r
- mArray[index] = (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index);\r
- }\r
- return mArray;\r
- } //-- org.vamsas.objects.core.AnnotationElement[] getAnnotationElement() \r
-\r
- /**\r
- * Method getAnnotationElementCount\r
- * \r
- * \r
- * \r
- * @return int\r
- */\r
- public int getAnnotationElementCount()\r
- {\r
- return _annotationElementList.size();\r
- } //-- int getAnnotationElementCount() \r
-\r
- /**\r
- * Returns the value of field 'description'. The field\r
- * 'description' has the following description: Human readable\r
- * description of the annotation\r
- * \r
- * \r
- * @return String\r
- * @return the value of field 'description'.\r
- */\r
- public java.lang.String getDescription()\r
- {\r
- return this._description;\r
- } //-- java.lang.String getDescription() \r
-\r
- /**\r
- * Returns the value of field 'group'. The field 'group' has\r
- * the following description: Annotation with the same\r
- * non-empty group name are grouped\r
- * together \r
- * \r
- * @return String\r
- * @return the value of field 'group'.\r
- */\r
- public java.lang.String getGroup()\r
- {\r
- return this._group;\r
- } //-- java.lang.String getGroup() \r
-\r
- /**\r
- * Returns the value of field 'id'. The field 'id' has the\r
- * following description: Primary Key for vamsas object\r
- * referencing\r
- * \r
- * \r
- * @return String\r
- * @return the value of field 'id'.\r
- */\r
- public java.lang.String getId()\r
- {\r
- return this._id;\r
- } //-- java.lang.String getId() \r
-\r
- /**\r
- * Returns the value of field 'label'. The field 'label' has\r
- * the following description: Short, meaningful name for the\r
- * annotation - if this\r
- * is absent, then the type string should be used in its\r
- * place.\r
- * \r
- * \r
- * @return String\r
- * @return the value of field 'label'.\r
- */\r
- public java.lang.String getLabel()\r
- {\r
- return this._label;\r
- } //-- java.lang.String getLabel() \r
-\r
- /**\r
- * Method getLink\r
- * \r
- * \r
- * \r
- * @param index\r
- * @return Link\r
- */\r
- public org.vamsas.objects.core.Link getLink(int index)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _linkList.size())) {\r
- throw new IndexOutOfBoundsException("getLink: Index value '"+index+"' not in range [0.."+_linkList.size()+ "]");\r
- }\r
- \r
- return (org.vamsas.objects.core.Link) _linkList.elementAt(index);\r
- } //-- org.vamsas.objects.core.Link getLink(int) \r
-\r
- /**\r
- * Method getLink\r
- * \r
- * \r
- * \r
- * @return Link\r
- */\r
- public org.vamsas.objects.core.Link[] getLink()\r
- {\r
- int size = _linkList.size();\r
- org.vamsas.objects.core.Link[] mArray = new org.vamsas.objects.core.Link[size];\r
- for (int index = 0; index < size; index++) {\r
- mArray[index] = (org.vamsas.objects.core.Link) _linkList.elementAt(index);\r
- }\r
- return mArray;\r
- } //-- org.vamsas.objects.core.Link[] getLink() \r
-\r
- /**\r
- * Method getLinkCount\r
- * \r
- * \r
- * \r
- * @return int\r
- */\r
- public int getLinkCount()\r
- {\r
- return _linkList.size();\r
- } //-- int getLinkCount() \r
-\r
- /**\r
- * Returns the value of field 'modifiable'.\r
- * \r
- * @return String\r
- * @return the value of field 'modifiable'.\r
- */\r
- public java.lang.String getModifiable()\r
- {\r
- return this._modifiable;\r
- } //-- java.lang.String getModifiable() \r
-\r
- /**\r
- * Method getProperty\r
- * \r
- * \r
- * \r
- * @param index\r
- * @return Property\r
- */\r
- public org.vamsas.objects.core.Property getProperty(int index)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _propertyList.size())) {\r
- throw new IndexOutOfBoundsException("getProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");\r
- }\r
- \r
- return (org.vamsas.objects.core.Property) _propertyList.elementAt(index);\r
- } //-- org.vamsas.objects.core.Property getProperty(int) \r
-\r
- /**\r
- * Method getProperty\r
- * \r
- * \r
- * \r
- * @return Property\r
- */\r
- public org.vamsas.objects.core.Property[] getProperty()\r
- {\r
- int size = _propertyList.size();\r
- org.vamsas.objects.core.Property[] mArray = new org.vamsas.objects.core.Property[size];\r
- for (int index = 0; index < size; index++) {\r
- mArray[index] = (org.vamsas.objects.core.Property) _propertyList.elementAt(index);\r
- }\r
- return mArray;\r
- } //-- org.vamsas.objects.core.Property[] getProperty() \r
-\r
- /**\r
- * Method getPropertyCount\r
- * \r
- * \r
- * \r
- * @return int\r
- */\r
- public int getPropertyCount()\r
- {\r
- return _propertyList.size();\r
- } //-- int getPropertyCount() \r
-\r
- /**\r
- * Method getScore\r
- * \r
- * \r
- * \r
- * @param index\r
- * @return Score\r
- */\r
- public org.vamsas.objects.core.Score getScore(int index)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _scoreList.size())) {\r
- throw new IndexOutOfBoundsException("getScore: Index value '"+index+"' not in range [0.."+_scoreList.size()+ "]");\r
- }\r
- \r
- return (org.vamsas.objects.core.Score) _scoreList.elementAt(index);\r
- } //-- org.vamsas.objects.core.Score getScore(int) \r
-\r
- /**\r
- * Method getScore\r
- * \r
- * \r
- * \r
- * @return Score\r
- */\r
- public org.vamsas.objects.core.Score[] getScore()\r
- {\r
- int size = _scoreList.size();\r
- org.vamsas.objects.core.Score[] mArray = new org.vamsas.objects.core.Score[size];\r
- for (int index = 0; index < size; index++) {\r
- mArray[index] = (org.vamsas.objects.core.Score) _scoreList.elementAt(index);\r
- }\r
- return mArray;\r
- } //-- org.vamsas.objects.core.Score[] getScore() \r
-\r
- /**\r
- * Method getScoreCount\r
- * \r
- * \r
- * \r
- * @return int\r
- */\r
- public int getScoreCount()\r
- {\r
- return _scoreList.size();\r
- } //-- int getScoreCount() \r
-\r
- /**\r
- * Returns the value of field 'status'. The field 'status' has\r
- * the following description: TODO: specify this - we have\r
- * considered taking the GO\r
- * evidence codes as a model for assessing a measure of\r
- * quality to an\r
- * annotation. \r
- * \r
- * @return String\r
- * @return the value of field 'status'.\r
- */\r
- public java.lang.String getStatus()\r
- {\r
- return this._status;\r
- } //-- java.lang.String getStatus() \r
-\r
- /**\r
- * Returns the value of field 'type'. The field 'type' has the\r
- * following description: A Das Feature has both a type and a\r
- * Type ID. We go the\r
- * route of requiring the type string to be taken from a\r
- * controlled\r
- * vocabulary if an application expects others to make sense\r
- * of it. The\r
- * type may qualified - so uniprot:CHAIN is a valid type name,\r
- * and\r
- * considered distinct from someotherDB:CHAIN \r
- * \r
- * @return String\r
- * @return the value of field 'type'.\r
- */\r
- public java.lang.String getType()\r
- {\r
- return this._type;\r
- } //-- java.lang.String getType() \r
-\r
- /**\r
- * Method isValid\r
- * \r
- * \r
- * \r
- * @return boolean\r
- */\r
- public boolean isValid()\r
- {\r
- try {\r
- validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
- return false;\r
- }\r
- return true;\r
- } //-- boolean isValid() \r
-\r
- /**\r
- * Method marshal\r
- * \r
- * \r
- * \r
- * @param out\r
- */\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
- Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
-\r
- /**\r
- * Method marshal\r
- * \r
- * \r
- * \r
- * @param handler\r
- */\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
- Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
-\r
- /**\r
- * Method removeAllAnnotationElement\r
- * \r
- */\r
- public void removeAllAnnotationElement()\r
- {\r
- _annotationElementList.removeAllElements();\r
- } //-- void removeAllAnnotationElement() \r
-\r
- /**\r
- * Method removeAllLink\r
- * \r
- */\r
- public void removeAllLink()\r
- {\r
- _linkList.removeAllElements();\r
- } //-- void removeAllLink() \r
-\r
- /**\r
- * Method removeAllProperty\r
- * \r
- */\r
- public void removeAllProperty()\r
- {\r
- _propertyList.removeAllElements();\r
- } //-- void removeAllProperty() \r
-\r
- /**\r
- * Method removeAllScore\r
- * \r
- */\r
- public void removeAllScore()\r
- {\r
- _scoreList.removeAllElements();\r
- } //-- void removeAllScore() \r
-\r
- /**\r
- * Method removeAnnotationElement\r
- * \r
- * \r
- * \r
- * @param index\r
- * @return AnnotationElement\r
- */\r
- public org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int index)\r
- {\r
- java.lang.Object obj = _annotationElementList.elementAt(index);\r
- _annotationElementList.removeElementAt(index);\r
- return (org.vamsas.objects.core.AnnotationElement) obj;\r
- } //-- org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int) \r
-\r
- /**\r
- * Method removeLink\r
- * \r
- * \r
- * \r
- * @param index\r
- * @return Link\r
- */\r
- public org.vamsas.objects.core.Link removeLink(int index)\r
- {\r
- java.lang.Object obj = _linkList.elementAt(index);\r
- _linkList.removeElementAt(index);\r
- return (org.vamsas.objects.core.Link) obj;\r
- } //-- org.vamsas.objects.core.Link removeLink(int) \r
-\r
- /**\r
- * Method removeProperty\r
- * \r
- * \r
- * \r
- * @param index\r
- * @return Property\r
- */\r
- public org.vamsas.objects.core.Property removeProperty(int index)\r
- {\r
- java.lang.Object obj = _propertyList.elementAt(index);\r
- _propertyList.removeElementAt(index);\r
- return (org.vamsas.objects.core.Property) obj;\r
- } //-- org.vamsas.objects.core.Property removeProperty(int) \r
-\r
- /**\r
- * Method removeScore\r
- * \r
- * \r
- * \r
- * @param index\r
- * @return Score\r
- */\r
- public org.vamsas.objects.core.Score removeScore(int index)\r
- {\r
- java.lang.Object obj = _scoreList.elementAt(index);\r
- _scoreList.removeElementAt(index);\r
- return (org.vamsas.objects.core.Score) obj;\r
- } //-- org.vamsas.objects.core.Score removeScore(int) \r
-\r
- /**\r
- * Method setAnnotationElement\r
- * \r
- * \r
- * \r
- * @param index\r
- * @param vAnnotationElement\r
- */\r
- public void setAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _annotationElementList.size())) {\r
- throw new IndexOutOfBoundsException("setAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");\r
- }\r
- _annotationElementList.setElementAt(vAnnotationElement, index);\r
- } //-- void setAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) \r
-\r
- /**\r
- * Method setAnnotationElement\r
- * \r
- * \r
- * \r
- * @param annotationElementArray\r
- */\r
- public void setAnnotationElement(org.vamsas.objects.core.AnnotationElement[] annotationElementArray)\r
- {\r
- //-- copy array\r
- _annotationElementList.removeAllElements();\r
- for (int i = 0; i < annotationElementArray.length; i++) {\r
- _annotationElementList.addElement(annotationElementArray[i]);\r
- }\r
- } //-- void setAnnotationElement(org.vamsas.objects.core.AnnotationElement) \r
-\r
- /**\r
- * Sets the value of field 'description'. The field\r
- * 'description' has the following description: Human readable\r
- * description of the annotation\r
- * \r
- * \r
- * @param description the value of field 'description'.\r
- */\r
- public void setDescription(java.lang.String description)\r
- {\r
- this._description = description;\r
- } //-- void setDescription(java.lang.String) \r
-\r
- /**\r
- * Sets the value of field 'group'. The field 'group' has the\r
- * following description: Annotation with the same non-empty\r
- * group name are grouped\r
- * together \r
- * \r
- * @param group the value of field 'group'.\r
- */\r
- public void setGroup(java.lang.String group)\r
- {\r
- this._group = group;\r
- } //-- void setGroup(java.lang.String) \r
-\r
- /**\r
- * Sets the value of field 'id'. The field 'id' has the\r
- * following description: Primary Key for vamsas object\r
- * referencing\r
- * \r
- * \r
- * @param id the value of field 'id'.\r
- */\r
- public void setId(java.lang.String id)\r
- {\r
- this._id = id;\r
- } //-- void setId(java.lang.String) \r
-\r
- /**\r
- * Sets the value of field 'label'. The field 'label' has the\r
- * following description: Short, meaningful name for the\r
- * annotation - if this\r
- * is absent, then the type string should be used in its\r
- * place.\r
- * \r
- * \r
- * @param label the value of field 'label'.\r
- */\r
- public void setLabel(java.lang.String label)\r
- {\r
- this._label = label;\r
- } //-- void setLabel(java.lang.String) \r
-\r
- /**\r
- * Method setLink\r
- * \r
- * \r
- * \r
- * @param index\r
- * @param vLink\r
- */\r
- public void setLink(int index, org.vamsas.objects.core.Link vLink)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _linkList.size())) {\r
- throw new IndexOutOfBoundsException("setLink: Index value '"+index+"' not in range [0.."+_linkList.size()+ "]");\r
- }\r
- _linkList.setElementAt(vLink, index);\r
- } //-- void setLink(int, org.vamsas.objects.core.Link) \r
-\r
- /**\r
- * Method setLink\r
- * \r
- * \r
- * \r
- * @param linkArray\r
- */\r
- public void setLink(org.vamsas.objects.core.Link[] linkArray)\r
- {\r
- //-- copy array\r
- _linkList.removeAllElements();\r
- for (int i = 0; i < linkArray.length; i++) {\r
- _linkList.addElement(linkArray[i]);\r
- }\r
- } //-- void setLink(org.vamsas.objects.core.Link) \r
-\r
- /**\r
- * Sets the value of field 'modifiable'.\r
- * \r
- * @param modifiable the value of field 'modifiable'.\r
- */\r
- public void setModifiable(java.lang.String modifiable)\r
- {\r
- this._modifiable = modifiable;\r
- } //-- void setModifiable(java.lang.String) \r
-\r
- /**\r
- * Method setProperty\r
- * \r
- * \r
- * \r
- * @param index\r
- * @param vProperty\r
- */\r
- public void setProperty(int index, org.vamsas.objects.core.Property vProperty)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _propertyList.size())) {\r
- throw new IndexOutOfBoundsException("setProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");\r
- }\r
- _propertyList.setElementAt(vProperty, index);\r
- } //-- void setProperty(int, org.vamsas.objects.core.Property) \r
-\r
- /**\r
- * Method setProperty\r
- * \r
- * \r
- * \r
- * @param propertyArray\r
- */\r
- public void setProperty(org.vamsas.objects.core.Property[] propertyArray)\r
- {\r
- //-- copy array\r
- _propertyList.removeAllElements();\r
- for (int i = 0; i < propertyArray.length; i++) {\r
- _propertyList.addElement(propertyArray[i]);\r
- }\r
- } //-- void setProperty(org.vamsas.objects.core.Property) \r
-\r
- /**\r
- * Method setScore\r
- * \r
- * \r
- * \r
- * @param index\r
- * @param vScore\r
- */\r
- public void setScore(int index, org.vamsas.objects.core.Score vScore)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _scoreList.size())) {\r
- throw new IndexOutOfBoundsException("setScore: Index value '"+index+"' not in range [0.."+_scoreList.size()+ "]");\r
- }\r
- _scoreList.setElementAt(vScore, index);\r
- } //-- void setScore(int, org.vamsas.objects.core.Score) \r
-\r
- /**\r
- * Method setScore\r
- * \r
- * \r
- * \r
- * @param scoreArray\r
- */\r
- public void setScore(org.vamsas.objects.core.Score[] scoreArray)\r
- {\r
- //-- copy array\r
- _scoreList.removeAllElements();\r
- for (int i = 0; i < scoreArray.length; i++) {\r
- _scoreList.addElement(scoreArray[i]);\r
- }\r
- } //-- void setScore(org.vamsas.objects.core.Score) \r
-\r
- /**\r
- * Sets the value of field 'status'. The field 'status' has the\r
- * following description: TODO: specify this - we have\r
- * considered taking the GO\r
- * evidence codes as a model for assessing a measure of\r
- * quality to an\r
- * annotation. \r
- * \r
- * @param status the value of field 'status'.\r
- */\r
- public void setStatus(java.lang.String status)\r
- {\r
- this._status = status;\r
- } //-- void setStatus(java.lang.String) \r
-\r
- /**\r
- * Sets the value of field 'type'. The field 'type' has the\r
- * following description: A Das Feature has both a type and a\r
- * Type ID. We go the\r
- * route of requiring the type string to be taken from a\r
- * controlled\r
- * vocabulary if an application expects others to make sense\r
- * of it. The\r
- * type may qualified - so uniprot:CHAIN is a valid type name,\r
- * and\r
- * considered distinct from someotherDB:CHAIN \r
- * \r
- * @param type the value of field 'type'.\r
- */\r
- public void setType(java.lang.String type)\r
- {\r
- this._type = type;\r
- } //-- void setType(java.lang.String) \r
-\r
- /**\r
- * Method unmarshal\r
- * \r
- * \r
- * \r
- * @param reader\r
- * @return RangeType\r
- */\r
- public static org.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- return (org.vamsas.objects.core.RangeAnnotation) Unmarshaller.unmarshal(org.vamsas.objects.core.RangeAnnotation.class, reader);\r
- } //-- org.vamsas.objects.core.RangeType unmarshal(java.io.Reader) \r
-\r
- /**\r
- * Method validate\r
- * \r
- */\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
- org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
- validator.validate(this);\r
- } //-- void validate() \r
-\r
-}\r