uk.ac.vamsas.objects.core
Class VAMSAS

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

public class VAMSAS
extends Vobject
implements java.io.Serializable

contains unassociated trees and a number of analysis sets

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
VAMSAS()
           
 
Method Summary
 void addDataSet(DataSet vDataSet)
           
 void addDataSet(int index, DataSet vDataSet)
           
 void addTree(int index, Tree vTree)
           
 void addTree(Tree vTree)
           
 java.util.Enumeration enumerateDataSet()
          Method enumerateDataSet.
 java.util.Enumeration enumerateTree()
          Method enumerateTree.
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 DataSet[] getDataSet()
          Method getDataSet.Returns the contents of the collection in an Array.
 DataSet getDataSet(int index)
          Method getDataSet.
 java.util.Vector getDataSetAsReference()
          Method getDataSetAsReference.Returns a reference to '_dataSetList'.
 int getDataSetCount()
          Method getDataSetCount.
 java.lang.String getId()
          Returns the value of field 'id'.
 java.lang.String getModifiable()
          Returns the value of field 'modifiable'.
 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.
 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 removeAllDataSet()
           
 void removeAllTree()
           
 boolean removeDataSet(DataSet vDataSet)
          Method removeDataSet.
 DataSet removeDataSetAt(int index)
          Method removeDataSetAt.
 boolean removeTree(Tree vTree)
          Method removeTree.
 Tree removeTreeAt(int index)
          Method removeTreeAt.
 void setDataSet(DataSet[] vDataSetArray)
           
 void setDataSet(int index, DataSet vDataSet)
           
 void setDataSet(java.util.Vector vDataSetList)
          Sets the value of '_dataSetList' by copying the given Vector.
 void setDataSetAsReference(java.util.Vector dataSetVector)
          Deprecated.  
 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 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 VAMSAS 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

VAMSAS

public VAMSAS()
Method Detail

addDataSet

public void addDataSet(DataSet vDataSet)
                throws java.lang.IndexOutOfBoundsException
Parameters:
vDataSet -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addDataSet

public void addDataSet(int index,
                       DataSet vDataSet)
                throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vDataSet -
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

enumerateDataSet

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

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

getDataSet

public DataSet getDataSet(int index)
                   throws java.lang.IndexOutOfBoundsException
Method getDataSet.

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

getDataSet

public DataSet[] getDataSet()
Method getDataSet.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

getDataSetAsReference

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

Returns:
a reference to the Vector backing this class

getDataSetCount

public int getDataSetCount()
Method getDataSetCount.

Returns:
the size of this collection

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

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

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

removeAllDataSet

public void removeAllDataSet()

removeAllTree

public void removeAllTree()

removeDataSet

public boolean removeDataSet(DataSet vDataSet)
Method removeDataSet.

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

removeDataSetAt

public DataSet removeDataSetAt(int index)
Method removeDataSetAt.

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

setDataSet

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

setDataSet

public void setDataSet(DataSet[] vDataSetArray)
Parameters:
vDataSetArray -

setDataSet

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

Parameters:
vDataSetList - the Vector to copy.

setDataSetAsReference

public void setDataSetAsReference(java.util.Vector dataSetVector)
Deprecated.  

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

Parameters:
dataSetVector - the Vector to set.

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

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