uk.ac.vamsas.objects.core
Class ApplicationData

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

public class ApplicationData
extends AppData
implements java.io.Serializable

Class ApplicationData.

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
ApplicationData()
           
 
Method Summary
 void addInstance(Instance vInstance)
           
 void addInstance(int index, Instance vInstance)
           
 void addUser(int index, User vUser)
           
 void addUser(User vUser)
           
 java.util.Enumeration enumerateInstance()
          Method enumerateInstance.
 java.util.Enumeration enumerateUser()
          Method enumerateUser.
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 Common getCommon()
          Returns the value of field 'common'.
 Instance[] getInstance()
          Method getInstance.Returns the contents of the collection in an Array.
 Instance getInstance(int index)
          Method getInstance.
 java.util.Vector getInstanceAsReference()
          Method getInstanceAsReference.Returns a reference to '_instanceList'.
 int getInstanceCount()
          Method getInstanceCount.
 java.lang.String getName()
          Returns the value of field 'name'.
 User[] getUser()
          Method getUser.Returns the contents of the collection in an Array.
 User getUser(int index)
          Method getUser.
 java.util.Vector getUserAsReference()
          Method getUserAsReference.Returns a reference to '_userList'.
 int getUserCount()
          Method getUserCount.
 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 removeAllInstance()
           
 void removeAllUser()
           
 boolean removeInstance(Instance vInstance)
          Method removeInstance.
 Instance removeInstanceAt(int index)
          Method removeInstanceAt.
 boolean removeUser(User vUser)
          Method removeUser.
 User removeUserAt(int index)
          Method removeUserAt.
 void setCommon(Common common)
          Sets the value of field 'common'.
 void setInstance(Instance[] vInstanceArray)
           
 void setInstance(int index, Instance vInstance)
           
 void setInstance(java.util.Vector vInstanceList)
          Sets the value of '_instanceList' by copying the given Vector.
 void setInstanceAsReference(java.util.Vector instanceVector)
          Deprecated.  
 void setName(java.lang.String name)
          Sets the value of field 'name'.
 void setUser(int index, User vUser)
           
 void setUser(User[] vUserArray)
           
 void setUser(java.util.Vector vUserList)
          Sets the value of '_userList' by copying the given Vector.
 void setUserAsReference(java.util.Vector userVector)
          Deprecated.  
 void setVersion(java.lang.String version)
          Sets the value of field 'version'.
static AppData unmarshal(java.io.Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class uk.ac.vamsas.objects.core.AppData
getChoiceValue, getData, getDataReference, setData, setDataReference
 
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

ApplicationData

public ApplicationData()
Method Detail

addInstance

public void addInstance(Instance vInstance)
                 throws java.lang.IndexOutOfBoundsException
Parameters:
vInstance -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addInstance

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

addUser

public void addUser(User vUser)
             throws java.lang.IndexOutOfBoundsException
Parameters:
vUser -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addUser

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

enumerateInstance

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

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

enumerateUser

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

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

equals

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

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

getCommon

public Common getCommon()
Returns the value of field 'common'.

Returns:
the value of field 'Common'.

getInstance

public Instance getInstance(int index)
                     throws java.lang.IndexOutOfBoundsException
Method getInstance.

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

getInstance

public Instance[] getInstance()
Method getInstance.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

getInstanceAsReference

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

Returns:
a reference to the Vector backing this class

getInstanceCount

public int getInstanceCount()
Method getInstanceCount.

Returns:
the size of this collection

getName

public java.lang.String getName()
Returns the value of field 'name'. The field 'name' has the following description: Canonical name of application

Returns:
the value of field 'Name'.

getUser

public User getUser(int index)
             throws java.lang.IndexOutOfBoundsException
Method getUser.

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

getUser

public User[] getUser()
Method getUser.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

getUserAsReference

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

Returns:
a reference to the Vector backing this class

getUserCount

public int getUserCount()
Method getUserCount.

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: Version string describing the application specific data storage version used

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

isValid

public boolean isValid()
Method isValid.

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

removeAllInstance

public void removeAllInstance()

removeAllUser

public void removeAllUser()

removeInstance

public boolean removeInstance(Instance vInstance)
Method removeInstance.

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

removeInstanceAt

public Instance removeInstanceAt(int index)
Method removeInstanceAt.

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

removeUser

public boolean removeUser(User vUser)
Method removeUser.

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

removeUserAt

public User removeUserAt(int index)
Method removeUserAt.

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

setCommon

public void setCommon(Common common)
Sets the value of field 'common'.

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

setInstance

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

setInstance

public void setInstance(Instance[] vInstanceArray)
Parameters:
vInstanceArray -

setInstance

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

Parameters:
vInstanceList - the Vector to copy.

setInstanceAsReference

public void setInstanceAsReference(java.util.Vector instanceVector)
Deprecated.  

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

Parameters:
instanceVector - the Vector to set.

setName

public void setName(java.lang.String name)
Sets the value of field 'name'. The field 'name' has the following description: Canonical name of application

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

setUser

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

setUser

public void setUser(User[] vUserArray)
Parameters:
vUserArray -

setUser

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

Parameters:
vUserList - the Vector to copy.

setUserAsReference

public void setUserAsReference(java.util.Vector userVector)
Deprecated.  

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

Parameters:
userVector - 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: Version string describing the application specific data storage version used

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

unmarshal

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