uk.ac.vamsas.objects.core
Class Sequence

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

public class Sequence
extends SequenceType
implements java.io.Serializable

Class Sequence.

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
Sequence()
           
 
Method Summary
 void addDbRef(DbRef vDbRef)
           
 void addDbRef(int index, DbRef vDbRef)
           
 void addVxref(int index, Vxref vVxref)
           
 void addVxref(Vxref vVxref)
           
 java.util.Enumeration enumerateDbRef()
          Method enumerateDbRef.
 java.util.Enumeration enumerateVxref()
          Method enumerateVxref.
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 DbRef[] getDbRef()
          Method getDbRef.Returns the contents of the collection in an Array.
 DbRef getDbRef(int index)
          Method getDbRef.
 java.util.Vector getDbRefAsReference()
          Method getDbRefAsReference.Returns a reference to '_dbRefList'.
 int getDbRefCount()
          Method getDbRefCount.
 java.lang.String getDictionary()
          Returns the value of field 'dictionary'.
 java.lang.String getId()
          Returns the value of field 'id'.
 Vxref[] getVxref()
          Method getVxref.Returns the contents of the collection in an Array.
 Vxref getVxref(int index)
          Method getVxref.
 java.util.Vector getVxrefAsReference()
          Method getVxrefAsReference.Returns a reference to '_vxrefList'.
 int getVxrefCount()
          Method getVxrefCount.
 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 removeAllDbRef()
           
 void removeAllVxref()
           
 boolean removeDbRef(DbRef vDbRef)
          Method removeDbRef.
 DbRef removeDbRefAt(int index)
          Method removeDbRefAt.
 boolean removeVxref(Vxref vVxref)
          Method removeVxref.
 Vxref removeVxrefAt(int index)
          Method removeVxrefAt.
 void setDbRef(DbRef[] vDbRefArray)
           
 void setDbRef(int index, DbRef vDbRef)
           
 void setDbRef(java.util.Vector vDbRefList)
          Sets the value of '_dbRefList' by copying the given Vector.
 void setDbRefAsReference(java.util.Vector dbRefVector)
          Deprecated.  
 void setDictionary(java.lang.String dictionary)
          Sets the value of field 'dictionary'.
 void setId(java.lang.String id)
          Sets the value of field 'id'.
 void setVxref(int index, Vxref vVxref)
           
 void setVxref(java.util.Vector vVxrefList)
          Sets the value of '_vxrefList' by copying the given Vector.
 void setVxref(Vxref[] vVxrefArray)
           
 void setVxrefAsReference(java.util.Vector vxrefVector)
          Deprecated.  
static SequenceType unmarshal(java.io.Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class uk.ac.vamsas.objects.core.SequenceType
addProperty, addProperty, deleteEnd, deleteStart, enumerateProperty, getDescription, getEnd, getName, getProperty, getProperty, getPropertyAsReference, getPropertyCount, getSequence, getStart, hasEnd, hasStart, removeAllProperty, removeProperty, removePropertyAt, setDescription, setEnd, setName, setProperty, setProperty, setProperty, setPropertyAsReference, setSequence, setStart
 
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

Sequence

public Sequence()
Method Detail

addDbRef

public void addDbRef(DbRef vDbRef)
              throws java.lang.IndexOutOfBoundsException
Parameters:
vDbRef -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addDbRef

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

addVxref

public void addVxref(Vxref vVxref)
              throws java.lang.IndexOutOfBoundsException
Parameters:
vVxref -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addVxref

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

enumerateDbRef

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

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

enumerateVxref

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

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

equals

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

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

getDbRef

public DbRef getDbRef(int index)
               throws java.lang.IndexOutOfBoundsException
Method getDbRef.

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

getDbRef

public DbRef[] getDbRef()
Method getDbRef.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

getDbRefAsReference

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

Returns:
a reference to the Vector backing this class

getDbRefCount

public int getDbRefCount()
Method getDbRefCount.

Returns:
the size of this collection

getDictionary

public java.lang.String getDictionary()
Returns the value of field 'dictionary'. The field 'dictionary' has the following description: symbol class for sequence

Returns:
the value of field 'Dictionary'.

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

getVxref

public Vxref getVxref(int index)
               throws java.lang.IndexOutOfBoundsException
Method getVxref.

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

getVxref

public Vxref[] getVxref()
Method getVxref.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

getVxrefAsReference

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

Returns:
a reference to the Vector backing this class

getVxrefCount

public int getVxrefCount()
Method getVxrefCount.

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

isValid

public boolean isValid()
Method isValid.

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

removeAllDbRef

public void removeAllDbRef()

removeAllVxref

public void removeAllVxref()

removeDbRef

public boolean removeDbRef(DbRef vDbRef)
Method removeDbRef.

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

removeDbRefAt

public DbRef removeDbRefAt(int index)
Method removeDbRefAt.

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

removeVxref

public boolean removeVxref(Vxref vVxref)
Method removeVxref.

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

removeVxrefAt

public Vxref removeVxrefAt(int index)
Method removeVxrefAt.

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

setDbRef

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

setDbRef

public void setDbRef(DbRef[] vDbRefArray)
Parameters:
vDbRefArray -

setDbRef

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

Parameters:
vDbRefList - the Vector to copy.

setDbRefAsReference

public void setDbRefAsReference(java.util.Vector dbRefVector)
Deprecated.  

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

Parameters:
dbRefVector - the Vector to set.

setDictionary

public void setDictionary(java.lang.String dictionary)
Sets the value of field 'dictionary'. The field 'dictionary' has the following description: symbol class for sequence

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

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

setVxref

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

setVxref

public void setVxref(Vxref[] vVxrefArray)
Parameters:
vVxrefArray -

setVxref

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

Parameters:
vVxrefList - the Vector to copy.

setVxrefAsReference

public void setVxrefAsReference(java.util.Vector vxrefVector)
Deprecated.  

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

Parameters:
vxrefVector - the Vector to set.

unmarshal

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