uk.ac.vamsas.objects.core
Class Attachment

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

public class Attachment
extends AppData
implements java.io.Serializable

Class Attachment.

Version:
$Revision$ $Date$
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
Attachment()
           
 
Method Summary
 void deleteCompressed()
           
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 boolean getCompressed()
          Returns the value of field 'compressed'.
 java.lang.String getId()
          Returns the value of field 'id'.
 java.lang.Object getObjectref()
          Returns the value of field 'objectref'.
 java.lang.String getType()
          Returns the value of field 'type'.
 boolean hasCompressed()
          Method hasCompressed.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isCompressed()
          Returns the value of field 'compressed'.
 boolean isValid()
          Method isValid.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void setCompressed(boolean compressed)
          Sets the value of field 'compressed'.
 void setId(java.lang.String id)
          Sets the value of field 'id'.
 void setObjectref(java.lang.Object objectref)
          Sets the value of field 'objectref'.
 void setType(java.lang.String type)
          Sets the value of field 'type'.
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

Attachment

public Attachment()
Method Detail

deleteCompressed

public void deleteCompressed()

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.

getCompressed

public boolean getCompressed()
Returns the value of field 'compressed'. The field 'compressed' has the following description: true implies data will be decompresses with Zip before presenting to application

Returns:
the value of field 'Compressed'.

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

getObjectref

public java.lang.Object getObjectref()
Returns the value of field 'objectref'. The field 'objectref' has the following description: Object the arbitrary data is associated with

Returns:
the value of field 'Objectref'.

getType

public java.lang.String getType()
Returns the value of field 'type'. The field 'type' has the following description: Type of arbitrary data - TODO: decide format - use (extended) MIME types ?

Returns:
the value of field 'Type'.

hasCompressed

public boolean hasCompressed()
Method hasCompressed.

Returns:
true if at least one Compressed has been added

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.

isCompressed

public boolean isCompressed()
Returns the value of field 'compressed'. The field 'compressed' has the following description: true implies data will be decompresses with Zip before presenting to application

Returns:
the value of field 'Compressed'.

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

setCompressed

public void setCompressed(boolean compressed)
Sets the value of field 'compressed'. The field 'compressed' has the following description: true implies data will be decompresses with Zip before presenting to application

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

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

setObjectref

public void setObjectref(java.lang.Object objectref)
Sets the value of field 'objectref'. The field 'objectref' has the following description: Object the arbitrary data is associated with

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

setType

public void setType(java.lang.String type)
Sets the value of field 'type'. The field 'type' has the following description: Type of arbitrary data - TODO: decide format - use (extended) MIME types ?

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

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