uk.ac.vamsas.objects.core
Class RangeAnnotation

java.lang.Object
  extended byuk.ac.vamsas.client.Vobject
      extended byuk.ac.vamsas.objects.core.RangeType
          extended byuk.ac.vamsas.objects.core.RangeAnnotation
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AlignmentAnnotation, AlignmentSequenceAnnotation, DataSetAnnotations

public class RangeAnnotation
extends RangeType
implements java.io.Serializable

Annotation for a rangeSpec - values can be attached for the whole specification, and to each position within the spec. following the orientation specified by the ordered set of rangeSpec (pos, seg) elements.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.vamsas.client.Vobject
__added_since_last_read, __last_hash, __stored_in_document, __updated_since_last_read, __visited, __vorba, registerable, V_parent, vorbaId
 
Constructor Summary
RangeAnnotation()
           
 
Method Summary
 void addAnnotationElement(AnnotationElement vAnnotationElement)
           
 void addAnnotationElement(int index, AnnotationElement vAnnotationElement)
           
 void addLink(int index, Link vLink)
           
 void addLink(Link vLink)
           
 void addProperty(int index, Property vProperty)
           
 void addProperty(Property vProperty)
           
 void addScore(int index, Score vScore)
           
 void addScore(Score vScore)
           
 java.util.Enumeration enumerateAnnotationElement()
          Method enumerateAnnotationElement.
 java.util.Enumeration enumerateLink()
          Method enumerateLink.
 java.util.Enumeration enumerateProperty()
          Method enumerateProperty.
 java.util.Enumeration enumerateScore()
          Method enumerateScore.
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 AnnotationElement[] getAnnotationElement()
          Method getAnnotationElement.Returns the contents of the collection in an Array.
 AnnotationElement getAnnotationElement(int index)
          Method getAnnotationElement.
 java.util.Vector getAnnotationElementAsReference()
          Method getAnnotationElementAsReference.Returns a reference to '_annotationElementList'.
 int getAnnotationElementCount()
          Method getAnnotationElementCount.
 java.lang.String getDescription()
          Returns the value of field 'description'.
 java.lang.String getGroup()
          Returns the value of field 'group'.
 java.lang.String getId()
          Returns the value of field 'id'.
 java.lang.String getLabel()
          Returns the value of field 'label'.
 Link[] getLink()
          Method getLink.Returns the contents of the collection in an Array.
 Link getLink(int index)
          Method getLink.
 java.util.Vector getLinkAsReference()
          Method getLinkAsReference.Returns a reference to '_linkList'.
 int getLinkCount()
          Method getLinkCount.
 java.lang.String getModifiable()
          Returns the value of field 'modifiable'.
 Property[] getProperty()
          Method getProperty.Returns the contents of the collection in an Array.
 Property getProperty(int index)
          Method getProperty.
 java.util.Vector getPropertyAsReference()
          Method getPropertyAsReference.Returns a reference to '_propertyList'.
 int getPropertyCount()
          Method getPropertyCount.
 Score[] getScore()
          Method getScore.Returns the contents of the collection in an Array.
 Score getScore(int index)
          Method getScore.
 java.util.Vector getScoreAsReference()
          Method getScoreAsReference.Returns a reference to '_scoreList'.
 int getScoreCount()
          Method getScoreCount.
 java.lang.String getStatus()
          Returns the value of field 'status'.
 java.lang.String getType()
          Returns the value of field 'type'.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Method isValid.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllAnnotationElement()
           
 void removeAllLink()
           
 void removeAllProperty()
           
 void removeAllScore()
           
 boolean removeAnnotationElement(AnnotationElement vAnnotationElement)
          Method removeAnnotationElement.
 AnnotationElement removeAnnotationElementAt(int index)
          Method removeAnnotationElementAt.
 boolean removeLink(Link vLink)
          Method removeLink.
 Link removeLinkAt(int index)
          Method removeLinkAt.
 boolean removeProperty(Property vProperty)
          Method removeProperty.
 Property removePropertyAt(int index)
          Method removePropertyAt.
 boolean removeScore(Score vScore)
          Method removeScore.
 Score removeScoreAt(int index)
          Method removeScoreAt.
 void setAnnotationElement(AnnotationElement[] vAnnotationElementArray)
           
 void setAnnotationElement(int index, AnnotationElement vAnnotationElement)
           
 void setAnnotationElement(java.util.Vector vAnnotationElementList)
          Sets the value of '_annotationElementList' by copying the given Vector.
 void setAnnotationElementAsReference(java.util.Vector annotationElementVector)
          Deprecated.  
 void setDescription(java.lang.String description)
          Sets the value of field 'description'.
 void setGroup(java.lang.String group)
          Sets the value of field 'group'.
 void setId(java.lang.String id)
          Sets the value of field 'id'.
 void setLabel(java.lang.String label)
          Sets the value of field 'label'.
 void setLink(int index, Link vLink)
           
 void setLink(Link[] vLinkArray)
           
 void setLink(java.util.Vector vLinkList)
          Sets the value of '_linkList' by copying the given Vector.
 void setLinkAsReference(java.util.Vector linkVector)
          Deprecated.  
 void setModifiable(java.lang.String modifiable)
          Sets the value of field 'modifiable'.
 void setProperty(int index, Property vProperty)
           
 void setProperty(Property[] vPropertyArray)
           
 void setProperty(java.util.Vector vPropertyList)
          Sets the value of '_propertyList' by copying the given Vector.
 void setPropertyAsReference(java.util.Vector propertyVector)
          Deprecated.  
 void setScore(int index, Score vScore)
           
 void setScore(Score[] vScoreArray)
           
 void setScore(java.util.Vector vScoreList)
          Sets the value of '_scoreList' by copying the given Vector.
 void setScoreAsReference(java.util.Vector scoreVector)
          Deprecated.  
 void setStatus(java.lang.String status)
          Sets the value of field 'status'.
 void setType(java.lang.String type)
          Sets the value of field 'type'.
static RangeType unmarshal(java.io.Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class uk.ac.vamsas.objects.core.RangeType
addPos, addPos, addSeg, addSeg, enumeratePos, enumerateSeg, getChoiceValue, getPos, getPos, getPosAsReference, getPosCount, getSeg, getSeg, getSegAsReference, getSegCount, removeAllPos, removeAllSeg, removePos, removePosAt, removeSeg, removeSegAt, setPos, setPos, setPos, setPosAsReference, setSeg, setSeg, setSeg, setSegAsReference
 
Methods inherited from class uk.ac.vamsas.client.Vobject
__callHash, __ensure_instance_ids, __ensure_instance_ids, __getInstanceIdField, __getLHash, __setFinalHash, __setInitHash, doHash, finalize, get__last_hash, getV_parent, getVorbaId, is__stored_in_document, isNewInDocument, isRegisterable, isRegistered, isUpdated, merge, set__added_since_last_read, set__stored_in_document, set__updated_since_last_read, setInstanceIdField, setRegisterable, setV_parent, setVorbaId
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeAnnotation

public RangeAnnotation()
Method Detail

addAnnotationElement

public void addAnnotationElement(AnnotationElement vAnnotationElement)
                          throws java.lang.IndexOutOfBoundsException
Parameters:
vAnnotationElement -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addAnnotationElement

public void addAnnotationElement(int index,
                                 AnnotationElement vAnnotationElement)
                          throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vAnnotationElement -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addLink

public void addLink(Link vLink)
             throws java.lang.IndexOutOfBoundsException
Parameters:
vLink -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addLink

public void addLink(int index,
                    Link vLink)
             throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vLink -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addProperty

public void addProperty(Property vProperty)
                 throws java.lang.IndexOutOfBoundsException
Parameters:
vProperty -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addProperty

public void addProperty(int index,
                        Property vProperty)
                 throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vProperty -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addScore

public void addScore(Score vScore)
              throws java.lang.IndexOutOfBoundsException
Parameters:
vScore -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addScore

public void addScore(int index,
                     Score vScore)
              throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vScore -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateAnnotationElement

public java.util.Enumeration enumerateAnnotationElement()
Method enumerateAnnotationElement.

Returns:
an Enumeration over all uk.ac.vamsas.objects.core.AnnotationElement elements

enumerateLink

public java.util.Enumeration enumerateLink()
Method enumerateLink.

Returns:
an Enumeration over all uk.ac.vamsas.objects.core.Link elements

enumerateProperty

public java.util.Enumeration enumerateProperty()
Method enumerateProperty.

Returns:
an Enumeration over all uk.ac.vamsas.objects.core.Property elements

enumerateScore

public java.util.Enumeration enumerateScore()
Method enumerateScore.

Returns:
an Enumeration over all uk.ac.vamsas.objects.core.Score elements

equals

public boolean equals(java.lang.Object obj)
Overrides the java.lang.Object.equals method.

Overrides:
equals in class RangeType
Parameters:
obj -
Returns:
true if the objects are equal.

getAnnotationElement

public AnnotationElement getAnnotationElement(int index)
                                       throws java.lang.IndexOutOfBoundsException
Method getAnnotationElement.

Parameters:
index -
Returns:
the value of the uk.ac.vamsas.objects.core.AnnotationElement at the given inde
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getAnnotationElement

public AnnotationElement[] getAnnotationElement()
Method getAnnotationElement.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getAnnotationElementAsReference

public java.util.Vector getAnnotationElementAsReference()
Method getAnnotationElementAsReference.Returns a reference to '_annotationElementList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getAnnotationElementCount

public int getAnnotationElementCount()
Method getAnnotationElementCount.

Returns:
the size of this collection

getDescription

public java.lang.String getDescription()
Returns the value of field 'description'. The field 'description' has the following description: Human readable description of the annotation

Returns:
the value of field 'Description'.

getGroup

public java.lang.String getGroup()
Returns the value of field 'group'. The field 'group' has the following description: Annotation with the same non-empty group name are grouped together

Returns:
the value of field 'Group'.

getId

public java.lang.String getId()
Returns the value of field 'id'. The field 'id' has the following description: Primary Key for vamsas object referencing

Returns:
the value of field 'Id'.

getLabel

public java.lang.String getLabel()
Returns the value of field 'label'. The field 'label' has the following description: Short, meaningful name for the annotation - if this is absent, then the type string should be used in its place.

Returns:
the value of field 'Label'.

getLink

public Link getLink(int index)
             throws java.lang.IndexOutOfBoundsException
Method getLink.

Parameters:
index -
Returns:
the value of the uk.ac.vamsas.objects.core.Link at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getLink

public Link[] getLink()
Method getLink.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getLinkAsReference

public java.util.Vector getLinkAsReference()
Method getLinkAsReference.Returns a reference to '_linkList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getLinkCount

public int getLinkCount()
Method getLinkCount.

Returns:
the size of this collection

getModifiable

public java.lang.String getModifiable()
Returns the value of field 'modifiable'.

Returns:
the value of field 'Modifiable'.

getProperty

public Property getProperty(int index)
                     throws java.lang.IndexOutOfBoundsException
Method getProperty.

Parameters:
index -
Returns:
the value of the uk.ac.vamsas.objects.core.Property at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getProperty

public Property[] getProperty()
Method getProperty.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getPropertyAsReference

public java.util.Vector getPropertyAsReference()
Method getPropertyAsReference.Returns a reference to '_propertyList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getPropertyCount

public int getPropertyCount()
Method getPropertyCount.

Returns:
the size of this collection

getScore

public Score getScore(int index)
               throws java.lang.IndexOutOfBoundsException
Method getScore.

Parameters:
index -
Returns:
the value of the uk.ac.vamsas.objects.core.Score at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getScore

public Score[] getScore()
Method getScore.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getScoreAsReference

public java.util.Vector getScoreAsReference()
Method getScoreAsReference.Returns a reference to '_scoreList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getScoreCount

public int getScoreCount()
Method getScoreCount.

Returns:
the size of this collection

getStatus

public java.lang.String getStatus()
Returns the value of field 'status'. The field 'status' has the following description: TODO: specify this - we have considered taking the GO evidence codes as a model for assessing a measure of quality to an annotation.

Returns:
the value of field 'Status'.

getType

public java.lang.String getType()
Returns the value of field 'type'. The field 'type' has the following description: A Das Feature has both a type and a Type ID. We go the route of requiring the type string to be taken from a controlled vocabulary if an application expects others to make sense of it. The type may qualified - so uniprot:CHAIN is a valid type name, and considered distinct from someotherDB:CHAIN

Returns:
the value of field 'Type'.

hashCode

public int hashCode()
Overrides the java.lang.Object.hashCode method.

The following steps came from Effective Java Programming Language Guide by Joshua Bloch, Chapter 3

Overrides:
hashCode in class RangeType
Returns:
a hash code value for the object.

isValid

public boolean isValid()
Method isValid.

Overrides:
isValid in class RangeType
Returns:
true if this object is valid according to the schema

marshal

public void marshal(java.io.Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(org.xml.sax.ContentHandler handler)
             throws java.io.IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
java.io.IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllAnnotationElement

public void removeAllAnnotationElement()

removeAllLink

public void removeAllLink()

removeAllProperty

public void removeAllProperty()

removeAllScore

public void removeAllScore()

removeAnnotationElement

public boolean removeAnnotationElement(AnnotationElement vAnnotationElement)
Method removeAnnotationElement.

Parameters:
vAnnotationElement -
Returns:
true if the object was removed from the collection.

removeAnnotationElementAt

public AnnotationElement removeAnnotationElementAt(int index)
Method removeAnnotationElementAt.

Parameters:
index -
Returns:
the element removed from the collection

removeLink

public boolean removeLink(Link vLink)
Method removeLink.

Parameters:
vLink -
Returns:
true if the object was removed from the collection.

removeLinkAt

public Link removeLinkAt(int index)
Method removeLinkAt.

Parameters:
index -
Returns:
the element removed from the collection

removeProperty

public boolean removeProperty(Property vProperty)
Method removeProperty.

Parameters:
vProperty -
Returns:
true if the object was removed from the collection.

removePropertyAt

public Property removePropertyAt(int index)
Method removePropertyAt.

Parameters:
index -
Returns:
the element removed from the collection

removeScore

public boolean removeScore(Score vScore)
Method removeScore.

Parameters:
vScore -
Returns:
true if the object was removed from the collection.

removeScoreAt

public Score removeScoreAt(int index)
Method removeScoreAt.

Parameters:
index -
Returns:
the element removed from the collection

setAnnotationElement

public void setAnnotationElement(int index,
                                 AnnotationElement vAnnotationElement)
                          throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vAnnotationElement -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setAnnotationElement

public void setAnnotationElement(AnnotationElement[] vAnnotationElementArray)
Parameters:
vAnnotationElementArray -

setAnnotationElement

public void setAnnotationElement(java.util.Vector vAnnotationElementList)
Sets the value of '_annotationElementList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vAnnotationElementList - the Vector to copy.

setAnnotationElementAsReference

public void setAnnotationElementAsReference(java.util.Vector annotationElementVector)
Deprecated.  

Sets the value of '_annotationElementList' by setting it to the given Vector. No type checking is performed.

Parameters:
annotationElementVector - the Vector to set.

setDescription

public void setDescription(java.lang.String description)
Sets the value of field 'description'. The field 'description' has the following description: Human readable description of the annotation

Parameters:
description - the value of field 'description'.

setGroup

public void setGroup(java.lang.String group)
Sets the value of field 'group'. The field 'group' has the following description: Annotation with the same non-empty group name are grouped together

Parameters:
group - the value of field 'group'.

setId

public void setId(java.lang.String id)
Sets the value of field 'id'. The field 'id' has the following description: Primary Key for vamsas object referencing

Parameters:
id - the value of field 'id'.

setLabel

public void setLabel(java.lang.String label)
Sets the value of field 'label'. The field 'label' has the following description: Short, meaningful name for the annotation - if this is absent, then the type string should be used in its place.

Parameters:
label - the value of field 'label'.

setLink

public void setLink(int index,
                    Link vLink)
             throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vLink -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setLink

public void setLink(Link[] vLinkArray)
Parameters:
vLinkArray -

setLink

public void setLink(java.util.Vector vLinkList)
Sets the value of '_linkList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vLinkList - the Vector to copy.

setLinkAsReference

public void setLinkAsReference(java.util.Vector linkVector)
Deprecated.  

Sets the value of '_linkList' by setting it to the given Vector. No type checking is performed.

Parameters:
linkVector - the Vector to set.

setModifiable

public void setModifiable(java.lang.String modifiable)
Sets the value of field 'modifiable'.

Parameters:
modifiable - the value of field 'modifiable'.

setProperty

public void setProperty(int index,
                        Property vProperty)
                 throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vProperty -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setProperty

public void setProperty(Property[] vPropertyArray)
Parameters:
vPropertyArray -

setProperty

public void setProperty(java.util.Vector vPropertyList)
Sets the value of '_propertyList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vPropertyList - the Vector to copy.

setPropertyAsReference

public void setPropertyAsReference(java.util.Vector propertyVector)
Deprecated.  

Sets the value of '_propertyList' by setting it to the given Vector. No type checking is performed.

Parameters:
propertyVector - the Vector to set.

setScore

public void setScore(int index,
                     Score vScore)
              throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vScore -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setScore

public void setScore(Score[] vScoreArray)
Parameters:
vScoreArray -

setScore

public void setScore(java.util.Vector vScoreList)
Sets the value of '_scoreList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vScoreList - the Vector to copy.

setScoreAsReference

public void setScoreAsReference(java.util.Vector scoreVector)
Deprecated.  

Sets the value of '_scoreList' by setting it to the given Vector. No type checking is performed.

Parameters:
scoreVector - the Vector to set.

setStatus

public void setStatus(java.lang.String status)
Sets the value of field 'status'. The field 'status' has the following description: TODO: specify this - we have considered taking the GO evidence codes as a model for assessing a measure of quality to an annotation.

Parameters:
status - the value of field 'status'.

setType

public void setType(java.lang.String type)
Sets the value of field 'type'. The field 'type' has the following description: A Das Feature has both a type and a Type ID. We go the route of requiring the type string to be taken from a controlled vocabulary if an application expects others to make sense of it. The type may qualified - so uniprot:CHAIN is a valid type name, and considered distinct from someotherDB:CHAIN

Parameters:
type - the value of field 'type'.

unmarshal

public static RangeType unmarshal(java.io.Reader reader)
                           throws org.exolab.castor.xml.MarshalException,
                                  org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled uk.ac.vamsas.objects.core.RangeType
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Overrides:
validate in class RangeType
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema