uk.ac.vamsas.objects.core
Class Tree

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

public class Tree
extends Vobject
implements java.io.Serializable

Class Tree.

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
Tree()
           
 
Method Summary
 void addNewick(int index, Newick vNewick)
           
 void addNewick(Newick vNewick)
           
 void addProperty(int index, Property vProperty)
           
 void addProperty(Property vProperty)
           
 void addTreenode(int index, Treenode vTreenode)
           
 void addTreenode(Treenode vTreenode)
           
 java.util.Enumeration enumerateNewick()
          Method enumerateNewick.
 java.util.Enumeration enumerateProperty()
          Method enumerateProperty.
 java.util.Enumeration enumerateTreenode()
          Method enumerateTreenode.
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 java.lang.String getId()
          Returns the value of field 'id'.
 java.lang.String getModifiable()
          Returns the value of field 'modifiable'.
 Newick[] getNewick()
          Method getNewick.Returns the contents of the collection in an Array.
 Newick getNewick(int index)
          Method getNewick.
 java.util.Vector getNewickAsReference()
          Method getNewickAsReference.Returns a reference to '_newickList'.
 int getNewickCount()
          Method getNewickCount.
 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'.
 java.lang.String getTitle()
          Returns the value of field 'title'.
 Treenode[] getTreenode()
          Method getTreenode.Returns the contents of the collection in an Array.
 Treenode getTreenode(int index)
          Method getTreenode.
 java.util.Vector getTreenodeAsReference()
          Method getTreenodeAsReference.Returns a reference to '_treenodeList'.
 int getTreenodeCount()
          Method getTreenodeCount.
 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 removeAllNewick()
           
 void removeAllProperty()
           
 void removeAllTreenode()
           
 boolean removeNewick(Newick vNewick)
          Method removeNewick.
 Newick removeNewickAt(int index)
          Method removeNewickAt.
 boolean removeProperty(Property vProperty)
          Method removeProperty.
 Property removePropertyAt(int index)
          Method removePropertyAt.
 boolean removeTreenode(Treenode vTreenode)
          Method removeTreenode.
 Treenode removeTreenodeAt(int index)
          Method removeTreenodeAt.
 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 setNewick(int index, Newick vNewick)
           
 void setNewick(Newick[] vNewickArray)
           
 void setNewick(java.util.Vector vNewickList)
          Sets the value of '_newickList' by copying the given Vector.
 void setNewickAsReference(java.util.Vector newickVector)
          Deprecated.  
 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 setTitle(java.lang.String title)
          Sets the value of field 'title'.
 void setTreenode(int index, Treenode vTreenode)
           
 void setTreenode(Treenode[] vTreenodeArray)
           
 void setTreenode(java.util.Vector vTreenodeList)
          Sets the value of '_treenodeList' by copying the given Vector.
 void setTreenodeAsReference(java.util.Vector treenodeVector)
          Deprecated.  
static Tree 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

Tree

public Tree()
Method Detail

addNewick

public void addNewick(Newick vNewick)
               throws java.lang.IndexOutOfBoundsException
Parameters:
vNewick -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addNewick

public void addNewick(int index,
                      Newick vNewick)
               throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vNewick -
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

addTreenode

public void addTreenode(Treenode vTreenode)
                 throws java.lang.IndexOutOfBoundsException
Parameters:
vTreenode -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addTreenode

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

enumerateNewick

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

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

enumerateProperty

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

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

enumerateTreenode

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

Returns:
an Enumeration over all uk.ac.vamsas.objects.core.Treenode 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.

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

getNewick

public Newick getNewick(int index)
                 throws java.lang.IndexOutOfBoundsException
Method getNewick.

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

getNewick

public Newick[] getNewick()
Method getNewick.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

getNewickAsReference

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

Returns:
a reference to the Vector backing this class

getNewickCount

public int getNewickCount()
Method getNewickCount.

Returns:
the size of this collection

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

getTitle

public java.lang.String getTitle()
Returns the value of field 'title'.

Returns:
the value of field 'Title'.

getTreenode

public Treenode getTreenode(int index)
                     throws java.lang.IndexOutOfBoundsException
Method getTreenode.

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

getTreenode

public Treenode[] getTreenode()
Method getTreenode.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

getTreenodeAsReference

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

Returns:
a reference to the Vector backing this class

getTreenodeCount

public int getTreenodeCount()
Method getTreenodeCount.

Returns:
the size of this collection

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.

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

removeAllNewick

public void removeAllNewick()

removeAllProperty

public void removeAllProperty()

removeAllTreenode

public void removeAllTreenode()

removeNewick

public boolean removeNewick(Newick vNewick)
Method removeNewick.

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

removeNewickAt

public Newick removeNewickAt(int index)
Method removeNewickAt.

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

removeTreenode

public boolean removeTreenode(Treenode vTreenode)
Method removeTreenode.

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

removeTreenodeAt

public Treenode removeTreenodeAt(int index)
Method removeTreenodeAt.

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

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

setNewick

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

setNewick

public void setNewick(Newick[] vNewickArray)
Parameters:
vNewickArray -

setNewick

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

Parameters:
vNewickList - the Vector to copy.

setNewickAsReference

public void setNewickAsReference(java.util.Vector newickVector)
Deprecated.  

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

Parameters:
newickVector - the Vector to set.

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

setTitle

public void setTitle(java.lang.String title)
Sets the value of field 'title'.

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

setTreenode

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

setTreenode

public void setTreenode(Treenode[] vTreenodeArray)
Parameters:
vTreenodeArray -

setTreenode

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

Parameters:
vTreenodeList - the Vector to copy.

setTreenodeAsReference

public void setTreenodeAsReference(java.util.Vector treenodeVector)
Deprecated.  

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

Parameters:
treenodeVector - the Vector to set.

unmarshal

public static Tree 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.Tree
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