uk.ac.vamsas.objects.core
Class VamsasDocument

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

public class VamsasDocument
extends Vobject
implements java.io.Serializable

Class VamsasDocument.

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
VamsasDocument()
           
 
Method Summary
 void addApplicationData(ApplicationData vApplicationData)
           
 void addApplicationData(int index, ApplicationData vApplicationData)
           
 void addAttachment(Attachment vAttachment)
           
 void addAttachment(int index, Attachment vAttachment)
           
 void addVAMSAS(int index, VAMSAS vVAMSAS)
           
 void addVAMSAS(VAMSAS vVAMSAS)
           
 java.util.Enumeration enumerateApplicationData()
          Method enumerateApplicationData.
 java.util.Enumeration enumerateAttachment()
          Method enumerateAttachment.
 java.util.Enumeration enumerateVAMSAS()
          Method enumerateVAMSAS.
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 ApplicationData[] getApplicationData()
          Method getApplicationData.Returns the contents of the collection in an Array.
 ApplicationData getApplicationData(int index)
          Method getApplicationData.
 java.util.Vector getApplicationDataAsReference()
          Method getApplicationDataAsReference.Returns a reference to '_applicationDataList'.
 int getApplicationDataCount()
          Method getApplicationDataCount.
 Attachment[] getAttachment()
          Method getAttachment.Returns the contents of the collection in an Array.
 Attachment getAttachment(int index)
          Method getAttachment.
 java.util.Vector getAttachmentAsReference()
          Method getAttachmentAsReference.Returns a reference to '_attachmentList'.
 int getAttachmentCount()
          Method getAttachmentCount.
 LockFile getLockFile()
          Returns the value of field 'lockFile'.
 Provenance getProvenance()
          Returns the value of field 'provenance'.
 VAMSAS[] getVAMSAS()
          Method getVAMSAS.Returns the contents of the collection in an Array.
 VAMSAS getVAMSAS(int index)
          Method getVAMSAS.
 java.util.Vector getVAMSASAsReference()
          Method getVAMSASAsReference.Returns a reference to '_VAMSASList'.
 int getVAMSASCount()
          Method getVAMSASCount.
 java.lang.String getVersion()
          Returns the value of field 'version'.
 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 removeAllApplicationData()
           
 void removeAllAttachment()
           
 void removeAllVAMSAS()
           
 boolean removeApplicationData(ApplicationData vApplicationData)
          Method removeApplicationData.
 ApplicationData removeApplicationDataAt(int index)
          Method removeApplicationDataAt.
 boolean removeAttachment(Attachment vAttachment)
          Method removeAttachment.
 Attachment removeAttachmentAt(int index)
          Method removeAttachmentAt.
 boolean removeVAMSAS(VAMSAS vVAMSAS)
          Method removeVAMSAS.
 VAMSAS removeVAMSASAt(int index)
          Method removeVAMSASAt.
 void setApplicationData(ApplicationData[] vApplicationDataArray)
           
 void setApplicationData(int index, ApplicationData vApplicationData)
           
 void setApplicationData(java.util.Vector vApplicationDataList)
          Sets the value of '_applicationDataList' by copying the given Vector.
 void setApplicationDataAsReference(java.util.Vector applicationDataVector)
          Deprecated.  
 void setAttachment(Attachment[] vAttachmentArray)
           
 void setAttachment(int index, Attachment vAttachment)
           
 void setAttachment(java.util.Vector vAttachmentList)
          Sets the value of '_attachmentList' by copying the given Vector.
 void setAttachmentAsReference(java.util.Vector attachmentVector)
          Deprecated.  
 void setLockFile(LockFile lockFile)
          Sets the value of field 'lockFile'.
 void setProvenance(Provenance provenance)
          Sets the value of field 'provenance'.
 void setVAMSAS(int index, VAMSAS vVAMSAS)
           
 void setVAMSAS(VAMSAS[] vVAMSASArray)
           
 void setVAMSAS(java.util.Vector vVAMSASList)
          Sets the value of '_VAMSASList' by copying the given Vector.
 void setVAMSASAsReference(java.util.Vector VAMSASVector)
          Deprecated.  
 void setVersion(java.lang.String version)
          Sets the value of field 'version'.
static VamsasDocument 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

VamsasDocument

public VamsasDocument()
Method Detail

addApplicationData

public void addApplicationData(ApplicationData vApplicationData)
                        throws java.lang.IndexOutOfBoundsException
Parameters:
vApplicationData -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addApplicationData

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

addAttachment

public void addAttachment(Attachment vAttachment)
                   throws java.lang.IndexOutOfBoundsException
Parameters:
vAttachment -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addAttachment

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

addVAMSAS

public void addVAMSAS(VAMSAS vVAMSAS)
               throws java.lang.IndexOutOfBoundsException
Parameters:
vVAMSAS -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addVAMSAS

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

enumerateApplicationData

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

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

enumerateAttachment

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

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

enumerateVAMSAS

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

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

getApplicationData

public ApplicationData getApplicationData(int index)
                                   throws java.lang.IndexOutOfBoundsException
Method getApplicationData.

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

getApplicationData

public ApplicationData[] getApplicationData()
Method getApplicationData.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

getApplicationDataAsReference

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

Returns:
a reference to the Vector backing this class

getApplicationDataCount

public int getApplicationDataCount()
Method getApplicationDataCount.

Returns:
the size of this collection

getAttachment

public Attachment getAttachment(int index)
                         throws java.lang.IndexOutOfBoundsException
Method getAttachment.

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

getAttachment

public Attachment[] getAttachment()
Method getAttachment.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

getAttachmentAsReference

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

Returns:
a reference to the Vector backing this class

getAttachmentCount

public int getAttachmentCount()
Method getAttachmentCount.

Returns:
the size of this collection

getLockFile

public LockFile getLockFile()
Returns the value of field 'lockFile'.

Returns:
the value of field 'LockFile'.

getProvenance

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

Returns:
the value of field 'Provenance'.

getVAMSAS

public VAMSAS getVAMSAS(int index)
                 throws java.lang.IndexOutOfBoundsException
Method getVAMSAS.

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

getVAMSAS

public VAMSAS[] getVAMSAS()
Method getVAMSAS.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

getVAMSASAsReference

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

Returns:
a reference to the Vector backing this class

getVAMSASCount

public int getVAMSASCount()
Method getVAMSASCount.

Returns:
the size of this collection

getVersion

public java.lang.String getVersion()
Returns the value of field 'version'. The field 'version' has the following description: Vamsas Document Version Number

Returns:
the value of field 'Version'.

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

removeAllApplicationData

public void removeAllApplicationData()

removeAllAttachment

public void removeAllAttachment()

removeAllVAMSAS

public void removeAllVAMSAS()

removeApplicationData

public boolean removeApplicationData(ApplicationData vApplicationData)
Method removeApplicationData.

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

removeApplicationDataAt

public ApplicationData removeApplicationDataAt(int index)
Method removeApplicationDataAt.

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

removeAttachment

public boolean removeAttachment(Attachment vAttachment)
Method removeAttachment.

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

removeAttachmentAt

public Attachment removeAttachmentAt(int index)
Method removeAttachmentAt.

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

removeVAMSAS

public boolean removeVAMSAS(VAMSAS vVAMSAS)
Method removeVAMSAS.

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

removeVAMSASAt

public VAMSAS removeVAMSASAt(int index)
Method removeVAMSASAt.

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

setApplicationData

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

setApplicationData

public void setApplicationData(ApplicationData[] vApplicationDataArray)
Parameters:
vApplicationDataArray -

setApplicationData

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

Parameters:
vApplicationDataList - the Vector to copy.

setApplicationDataAsReference

public void setApplicationDataAsReference(java.util.Vector applicationDataVector)
Deprecated.  

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

Parameters:
applicationDataVector - the Vector to set.

setAttachment

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

setAttachment

public void setAttachment(Attachment[] vAttachmentArray)
Parameters:
vAttachmentArray -

setAttachment

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

Parameters:
vAttachmentList - the Vector to copy.

setAttachmentAsReference

public void setAttachmentAsReference(java.util.Vector attachmentVector)
Deprecated.  

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

Parameters:
attachmentVector - the Vector to set.

setLockFile

public void setLockFile(LockFile lockFile)
Sets the value of field 'lockFile'.

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

setProvenance

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

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

setVAMSAS

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

setVAMSAS

public void setVAMSAS(VAMSAS[] vVAMSASArray)
Parameters:
vVAMSASArray -

setVAMSAS

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

Parameters:
vVAMSASList - the Vector to copy.

setVAMSASAsReference

public void setVAMSASAsReference(java.util.Vector VAMSASVector)
Deprecated.  

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

Parameters:
VAMSASVector - the Vector to set.

setVersion

public void setVersion(java.lang.String version)
Sets the value of field 'version'. The field 'version' has the following description: Vamsas Document Version Number

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

unmarshal

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