uk.ac.vamsas.objects.core
Class Input

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

public class Input
extends RangeType
implements java.io.Serializable

Class Input.

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
Input()
           
 
Method Summary
 void addObjRef(int index, java.lang.Object vObjRef)
           
 void addObjRef(java.lang.Object vObjRef)
           
 java.util.Enumeration enumerateObjRef()
          Method enumerateObjRef.
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 java.lang.String getName()
          Returns the value of field 'name'.
 java.lang.Object[] getObjRef()
          Method getObjRef.Returns the contents of the collection in an Array.
 java.lang.Object getObjRef(int index)
          Method getObjRef.
 java.util.Vector getObjRefAsReference()
          Method getObjRefAsReference.Returns a reference to '_objRef'.
 int getObjRefCount()
          Method getObjRefCount.
 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 removeAllObjRef()
           
 boolean removeObjRef(java.lang.Object vObjRef)
          Method removeObjRef.
 java.lang.Object removeObjRefAt(int index)
          Method removeObjRefAt.
 void setName(java.lang.String name)
          Sets the value of field 'name'.
 void setObjRef(int index, java.lang.Object vObjRef)
           
 void setObjRef(java.lang.Object[] vObjRefArray)
           
 void setObjRef(java.util.Vector vObjRefList)
          Sets the value of '_objRef' by copying the given Vector.
 void setObjRefAsReference(java.util.Vector objRefVector)
          Deprecated.  
static RangeType unmarshal(java.io.Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class uk.ac.vamsas.objects.core.RangeType
addPos, addPos, addSeg, addSeg, enumeratePos, enumerateSeg, getChoiceValue, getPos, getPos, getPosAsReference, getPosCount, getSeg, getSeg, getSegAsReference, getSegCount, removeAllPos, removeAllSeg, removePos, removePosAt, removeSeg, removeSegAt, setPos, setPos, setPos, setPosAsReference, setSeg, setSeg, setSeg, setSegAsReference
 
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

Input

public Input()
Method Detail

addObjRef

public void addObjRef(java.lang.Object vObjRef)
               throws java.lang.IndexOutOfBoundsException
Parameters:
vObjRef -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addObjRef

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

enumerateObjRef

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

Returns:
an Enumeration over all java.lang.Object elements

equals

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

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

getName

public java.lang.String getName()
Returns the value of field 'name'.

Returns:
the value of field 'Name'.

getObjRef

public java.lang.Object getObjRef(int index)
                           throws java.lang.IndexOutOfBoundsException
Method getObjRef.

Parameters:
index -
Returns:
the value of the java.lang.Object at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getObjRef

public java.lang.Object[] getObjRef()
Method getObjRef.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

getObjRefAsReference

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

Returns:
a reference to the Vector backing this class

getObjRefCount

public int getObjRefCount()
Method getObjRefCount.

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

isValid

public boolean isValid()
Method isValid.

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

removeAllObjRef

public void removeAllObjRef()

removeObjRef

public boolean removeObjRef(java.lang.Object vObjRef)
Method removeObjRef.

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

removeObjRefAt

public java.lang.Object removeObjRefAt(int index)
Method removeObjRefAt.

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

setName

public void setName(java.lang.String name)
Sets the value of field 'name'.

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

setObjRef

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

setObjRef

public void setObjRef(java.lang.Object[] vObjRefArray)
Parameters:
vObjRefArray -

setObjRef

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

Parameters:
vObjRefList - the Vector to copy.

setObjRefAsReference

public void setObjRefAsReference(java.util.Vector objRefVector)
Deprecated.  

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

Parameters:
objRefVector - the Vector to set.

unmarshal

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