uk.ac.vamsas.objects.core
Class AlignmentAnnotation

java.lang.Object
  extended byuk.ac.vamsas.client.Vobject
      extended byuk.ac.vamsas.objects.core.RangeType
          extended byuk.ac.vamsas.objects.core.RangeAnnotation
              extended byuk.ac.vamsas.objects.core.AlignmentAnnotation
All Implemented Interfaces:
java.io.Serializable

public class AlignmentAnnotation
extends RangeAnnotation
implements java.io.Serializable

This is annotation over the coordinate frame defined by all the columns in the alignment.

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
AlignmentAnnotation()
           
 
Method Summary
 void addSeqrefs(int index, java.lang.Object vSeqrefs)
           
 void addSeqrefs(java.lang.Object vSeqrefs)
           
 void deleteGraph()
           
 java.util.Enumeration enumerateSeqrefs()
          Method enumerateSeqrefs.
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 boolean getGraph()
          Returns the value of field 'graph'.
 Provenance getProvenance()
          Returns the value of field 'provenance'.
 java.lang.Object[] getSeqrefs()
          Method getSeqrefs.Returns the contents of the collection in an Array.
 java.lang.Object getSeqrefs(int index)
          Method getSeqrefs.
 java.util.Vector getSeqrefsAsReference()
          Method getSeqrefsAsReference.Returns a reference to '_seqrefs'.
 int getSeqrefsCount()
          Method getSeqrefsCount.
 boolean hasGraph()
          Method hasGraph.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isGraph()
          Returns the value of field 'graph'.
 boolean isValid()
          Method isValid.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllSeqrefs()
           
 boolean removeSeqrefs(java.lang.Object vSeqrefs)
          Method removeSeqrefs.
 java.lang.Object removeSeqrefsAt(int index)
          Method removeSeqrefsAt.
 void setGraph(boolean graph)
          Sets the value of field 'graph'.
 void setProvenance(Provenance provenance)
          Sets the value of field 'provenance'.
 void setSeqrefs(int index, java.lang.Object vSeqrefs)
           
 void setSeqrefs(java.lang.Object[] vSeqrefsArray)
           
 void setSeqrefs(java.util.Vector vSeqrefsList)
          Sets the value of '_seqrefs' by copying the given Vector.
 void setSeqrefsAsReference(java.util.Vector seqrefsVector)
          Deprecated.  
static RangeType unmarshal(java.io.Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class uk.ac.vamsas.objects.core.RangeAnnotation
addAnnotationElement, addAnnotationElement, addLink, addLink, addProperty, addProperty, addScore, addScore, enumerateAnnotationElement, enumerateLink, enumerateProperty, enumerateScore, getAnnotationElement, getAnnotationElement, getAnnotationElementAsReference, getAnnotationElementCount, getDescription, getGroup, getId, getLabel, getLink, getLink, getLinkAsReference, getLinkCount, getModifiable, getProperty, getProperty, getPropertyAsReference, getPropertyCount, getScore, getScore, getScoreAsReference, getScoreCount, getStatus, getType, removeAllAnnotationElement, removeAllLink, removeAllProperty, removeAllScore, removeAnnotationElement, removeAnnotationElementAt, removeLink, removeLinkAt, removeProperty, removePropertyAt, removeScore, removeScoreAt, setAnnotationElement, setAnnotationElement, setAnnotationElement, setAnnotationElementAsReference, setDescription, setGroup, setId, setLabel, setLink, setLink, setLink, setLinkAsReference, setModifiable, setProperty, setProperty, setProperty, setPropertyAsReference, setScore, setScore, setScore, setScoreAsReference, setStatus, setType
 
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

AlignmentAnnotation

public AlignmentAnnotation()
Method Detail

addSeqrefs

public void addSeqrefs(java.lang.Object vSeqrefs)
                throws java.lang.IndexOutOfBoundsException
Parameters:
vSeqrefs -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addSeqrefs

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

deleteGraph

public void deleteGraph()

enumerateSeqrefs

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

Returns:
an Enumeration over all java.lang.Object elements

equals

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

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

getGraph

public boolean getGraph()
Returns the value of field 'graph'. The field 'graph' has the following description: TODO: decide if this flag is redundant - when true it would suggest that the annotationElement values together form a graph

Returns:
the value of field 'Graph'.

getProvenance

public Provenance getProvenance()
Returns the value of field 'provenance'.

Returns:
the value of field 'Provenance'.

getSeqrefs

public java.lang.Object getSeqrefs(int index)
                            throws java.lang.IndexOutOfBoundsException
Method getSeqrefs.

Parameters:
index -
Returns:
the value of the java.lang.Object at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getSeqrefs

public java.lang.Object[] getSeqrefs()
Method getSeqrefs.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

getSeqrefsAsReference

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

Returns:
a reference to the Vector backing this class

getSeqrefsCount

public int getSeqrefsCount()
Method getSeqrefsCount.

Returns:
the size of this collection

hasGraph

public boolean hasGraph()
Method hasGraph.

Returns:
true if at least one Graph has been added

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 RangeAnnotation
Returns:
a hash code value for the object.

isGraph

public boolean isGraph()
Returns the value of field 'graph'. The field 'graph' has the following description: TODO: decide if this flag is redundant - when true it would suggest that the annotationElement values together form a graph

Returns:
the value of field 'Graph'.

isValid

public boolean isValid()
Method isValid.

Overrides:
isValid in class RangeAnnotation
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
Overrides:
marshal in class RangeAnnotation
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
Overrides:
marshal in class RangeAnnotation
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

removeAllSeqrefs

public void removeAllSeqrefs()

removeSeqrefs

public boolean removeSeqrefs(java.lang.Object vSeqrefs)
Method removeSeqrefs.

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

removeSeqrefsAt

public java.lang.Object removeSeqrefsAt(int index)
Method removeSeqrefsAt.

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

setGraph

public void setGraph(boolean graph)
Sets the value of field 'graph'. The field 'graph' has the following description: TODO: decide if this flag is redundant - when true it would suggest that the annotationElement values together form a graph

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

setProvenance

public void setProvenance(Provenance provenance)
Sets the value of field 'provenance'.

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

setSeqrefs

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

setSeqrefs

public void setSeqrefs(java.lang.Object[] vSeqrefsArray)
Parameters:
vSeqrefsArray -

setSeqrefs

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

Parameters:
vSeqrefsList - the Vector to copy.

setSeqrefsAsReference

public void setSeqrefsAsReference(java.util.Vector seqrefsVector)
Deprecated.  

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

Parameters:
seqrefsVector - the Vector to set.

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 RangeAnnotation
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema