uk.ac.vamsas.objects.core
Class Alignment

java.lang.Object
  extended byuk.ac.vamsas.client.Vobject
      extended byuk.ac.vamsas.objects.core.Alignment
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SeqAln

public class Alignment
extends Vobject
implements java.io.Serializable

Class Alignment.

Version:
$Revision: 496 $ $Date: 2007-06-28 14:51:44 +0100 (Thu, 28 Jun 2007) $
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
Alignment()
           
 
Method Summary
 void addAlignmentAnnotation(AlignmentAnnotation vAlignmentAnnotation)
           
 void addAlignmentAnnotation(int index, AlignmentAnnotation vAlignmentAnnotation)
           
 void addAlignmentSequence(AlignmentSequence vAlignmentSequence)
           
 void addAlignmentSequence(int index, AlignmentSequence vAlignmentSequence)
           
 void addProperty(int index, Property vProperty)
           
 void addProperty(Property vProperty)
           
 void addTree(int index, Tree vTree)
           
 void addTree(Tree vTree)
           
 void deleteAligned()
           
 java.util.Enumeration enumerateAlignmentAnnotation()
          Method enumerateAlignmentAnnotation.
 java.util.Enumeration enumerateAlignmentSequence()
          Method enumerateAlignmentSequence.
 java.util.Enumeration enumerateProperty()
          Method enumerateProperty.
 java.util.Enumeration enumerateTree()
          Method enumerateTree.
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 boolean getAligned()
          Returns the value of field 'aligned'.
 AlignmentAnnotation[] getAlignmentAnnotation()
          Method getAlignmentAnnotation.Returns the contents of the collection in an Array.
 AlignmentAnnotation getAlignmentAnnotation(int index)
          Method getAlignmentAnnotation.
 java.util.Vector getAlignmentAnnotationAsReference()
          Method getAlignmentAnnotationAsReference.Returns a reference to '_alignmentAnnotationList'.
 int getAlignmentAnnotationCount()
          Method getAlignmentAnnotationCount.
 AlignmentSequence[] getAlignmentSequence()
          Method getAlignmentSequence.Returns the contents of the collection in an Array.
 AlignmentSequence getAlignmentSequence(int index)
          Method getAlignmentSequence.
 java.util.Vector getAlignmentSequenceAsReference()
          Method getAlignmentSequenceAsReference.Returns a reference to '_alignmentSequenceList'.
 int getAlignmentSequenceCount()
          Method getAlignmentSequenceCount.
 java.lang.String getGapChar()
          Returns the value of field 'gapChar'.
 java.lang.String getId()
          Returns the value of field 'id'.
 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.
 Provenance getProvenance()
          Returns the value of field 'provenance'.
 Tree[] getTree()
          Method getTree.Returns the contents of the collection in an Array.
 Tree getTree(int index)
          Method getTree.
 java.util.Vector getTreeAsReference()
          Method getTreeAsReference.Returns a reference to '_treeList'.
 int getTreeCount()
          Method getTreeCount.
 boolean hasAligned()
          Method hasAligned.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isAligned()
          Returns the value of field 'aligned'.
 boolean isValid()
          Method isValid.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 boolean removeAlignmentAnnotation(AlignmentAnnotation vAlignmentAnnotation)
          Method removeAlignmentAnnotation.
 AlignmentAnnotation removeAlignmentAnnotationAt(int index)
          Method removeAlignmentAnnotationAt.
 boolean removeAlignmentSequence(AlignmentSequence vAlignmentSequence)
          Method removeAlignmentSequence.
 AlignmentSequence removeAlignmentSequenceAt(int index)
          Method removeAlignmentSequenceAt.
 void removeAllAlignmentAnnotation()
           
 void removeAllAlignmentSequence()
           
 void removeAllProperty()
           
 void removeAllTree()
           
 boolean removeProperty(Property vProperty)
          Method removeProperty.
 Property removePropertyAt(int index)
          Method removePropertyAt.
 boolean removeTree(Tree vTree)
          Method removeTree.
 Tree removeTreeAt(int index)
          Method removeTreeAt.
 void setAligned(boolean aligned)
          Sets the value of field 'aligned'.
 void setAlignmentAnnotation(AlignmentAnnotation[] vAlignmentAnnotationArray)
           
 void setAlignmentAnnotation(int index, AlignmentAnnotation vAlignmentAnnotation)
           
 void setAlignmentAnnotation(java.util.Vector vAlignmentAnnotationList)
          Sets the value of '_alignmentAnnotationList' by copying the given Vector.
 void setAlignmentAnnotationAsReference(java.util.Vector alignmentAnnotationVector)
          Deprecated.  
 void setAlignmentSequence(AlignmentSequence[] vAlignmentSequenceArray)
           
 void setAlignmentSequence(int index, AlignmentSequence vAlignmentSequence)
           
 void setAlignmentSequence(java.util.Vector vAlignmentSequenceList)
          Sets the value of '_alignmentSequenceList' by copying the given Vector.
 void setAlignmentSequenceAsReference(java.util.Vector alignmentSequenceVector)
          Deprecated.  
 void setGapChar(java.lang.String gapChar)
          Sets the value of field 'gapChar'.
 void setId(java.lang.String id)
          Sets the value of field 'id'.
 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 setProvenance(Provenance provenance)
          Sets the value of field 'provenance'.
 void setTree(int index, Tree vTree)
           
 void setTree(Tree[] vTreeArray)
           
 void setTree(java.util.Vector vTreeList)
          Sets the value of '_treeList' by copying the given Vector.
 void setTreeAsReference(java.util.Vector treeVector)
          Deprecated.  
static Alignment unmarshal(java.io.Reader reader)
          Method unmarshal.
 void validate()
           
 
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

Alignment

public Alignment()
Method Detail

addAlignmentAnnotation

public void addAlignmentAnnotation(AlignmentAnnotation vAlignmentAnnotation)
                            throws java.lang.IndexOutOfBoundsException
Parameters:
vAlignmentAnnotation -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addAlignmentAnnotation

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

addAlignmentSequence

public void addAlignmentSequence(AlignmentSequence vAlignmentSequence)
                          throws java.lang.IndexOutOfBoundsException
Parameters:
vAlignmentSequence -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addAlignmentSequence

public void addAlignmentSequence(int index,
                                 AlignmentSequence vAlignmentSequence)
                          throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vAlignmentSequence -
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

addTree

public void addTree(Tree vTree)
             throws java.lang.IndexOutOfBoundsException
Parameters:
vTree -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addTree

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

deleteAligned

public void deleteAligned()

enumerateAlignmentAnnotation

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

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

enumerateAlignmentSequence

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

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

enumerateProperty

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

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

enumerateTree

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

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

equals

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

Parameters:
obj -
Returns:
true if the objects are equal.

getAligned

public boolean getAligned()
Returns the value of field 'aligned'.

Returns:
the value of field 'Aligned'.

getAlignmentAnnotation

public AlignmentAnnotation getAlignmentAnnotation(int index)
                                           throws java.lang.IndexOutOfBoundsException
Method getAlignmentAnnotation.

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

getAlignmentAnnotation

public AlignmentAnnotation[] getAlignmentAnnotation()
Method getAlignmentAnnotation.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

getAlignmentAnnotationAsReference

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

Returns:
a reference to the Vector backing this class

getAlignmentAnnotationCount

public int getAlignmentAnnotationCount()
Method getAlignmentAnnotationCount.

Returns:
the size of this collection

getAlignmentSequence

public AlignmentSequence getAlignmentSequence(int index)
                                       throws java.lang.IndexOutOfBoundsException
Method getAlignmentSequence.

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

getAlignmentSequence

public AlignmentSequence[] getAlignmentSequence()
Method getAlignmentSequence.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

getAlignmentSequenceAsReference

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

Returns:
a reference to the Vector backing this class

getAlignmentSequenceCount

public int getAlignmentSequenceCount()
Method getAlignmentSequenceCount.

Returns:
the size of this collection

getGapChar

public java.lang.String getGapChar()
Returns the value of field 'gapChar'.

Returns:
the value of field 'GapChar'.

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'.

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

getProvenance

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

Returns:
the value of field 'Provenance'.

getTree

public Tree getTree(int index)
             throws java.lang.IndexOutOfBoundsException
Method getTree.

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

getTree

public Tree[] getTree()
Method getTree.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

getTreeAsReference

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

Returns:
a reference to the Vector backing this class

getTreeCount

public int getTreeCount()
Method getTreeCount.

Returns:
the size of this collection

hasAligned

public boolean hasAligned()
Method hasAligned.

Returns:
true if at least one Aligned 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 Vobject
Returns:
a hash code value for the object.

isAligned

public boolean isAligned()
Returns the value of field 'aligned'.

Returns:
the value of field 'Aligned'.

isValid

public boolean isValid()
Method isValid.

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

removeAlignmentAnnotation

public boolean removeAlignmentAnnotation(AlignmentAnnotation vAlignmentAnnotation)
Method removeAlignmentAnnotation.

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

removeAlignmentAnnotationAt

public AlignmentAnnotation removeAlignmentAnnotationAt(int index)
Method removeAlignmentAnnotationAt.

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

removeAlignmentSequence

public boolean removeAlignmentSequence(AlignmentSequence vAlignmentSequence)
Method removeAlignmentSequence.

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

removeAlignmentSequenceAt

public AlignmentSequence removeAlignmentSequenceAt(int index)
Method removeAlignmentSequenceAt.

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

removeAllAlignmentAnnotation

public void removeAllAlignmentAnnotation()

removeAllAlignmentSequence

public void removeAllAlignmentSequence()

removeAllProperty

public void removeAllProperty()

removeAllTree

public void removeAllTree()

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

removeTree

public boolean removeTree(Tree vTree)
Method removeTree.

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

removeTreeAt

public Tree removeTreeAt(int index)
Method removeTreeAt.

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

setAligned

public void setAligned(boolean aligned)
Sets the value of field 'aligned'.

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

setAlignmentAnnotation

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

setAlignmentAnnotation

public void setAlignmentAnnotation(AlignmentAnnotation[] vAlignmentAnnotationArray)
Parameters:
vAlignmentAnnotationArray -

setAlignmentAnnotation

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

Parameters:
vAlignmentAnnotationList - the Vector to copy.

setAlignmentAnnotationAsReference

public void setAlignmentAnnotationAsReference(java.util.Vector alignmentAnnotationVector)
Deprecated.  

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

Parameters:
alignmentAnnotationVector - the Vector to set.

setAlignmentSequence

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

setAlignmentSequence

public void setAlignmentSequence(AlignmentSequence[] vAlignmentSequenceArray)
Parameters:
vAlignmentSequenceArray -

setAlignmentSequence

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

Parameters:
vAlignmentSequenceList - the Vector to copy.

setAlignmentSequenceAsReference

public void setAlignmentSequenceAsReference(java.util.Vector alignmentSequenceVector)
Deprecated.  

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

Parameters:
alignmentSequenceVector - the Vector to set.

setGapChar

public void setGapChar(java.lang.String gapChar)
Sets the value of field 'gapChar'.

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

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'.

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.

setProvenance

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

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

setTree

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

setTree

public void setTree(Tree[] vTreeArray)
Parameters:
vTreeArray -

setTree

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

Parameters:
vTreeList - the Vector to copy.

setTreeAsReference

public void setTreeAsReference(java.util.Vector treeVector)
Deprecated.  

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

Parameters:
treeVector - the Vector to set.

unmarshal

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