uk.ac.vamsas.objects.core
Class RangeType

java.lang.Object
  extended byuk.ac.vamsas.client.Vobject
      extended byuk.ac.vamsas.objects.core.RangeType
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Input, MapRangeType, RangeAnnotation

public abstract class RangeType
extends Vobject
implements java.io.Serializable

Specify an ordered set of positions and/or regions on the principle dimension of some associated vamsas object Keeping to jaxb-1.0 specification for the moment - this choice should become a substitution group when we use jaxb-2.0 capable bindings

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
RangeType()
           
 
Method Summary
 void addPos(int index, Pos vPos)
           
 void addPos(Pos vPos)
           
 void addSeg(int index, Seg vSeg)
           
 void addSeg(Seg vSeg)
           
 java.util.Enumeration enumeratePos()
          Method enumeratePos.
 java.util.Enumeration enumerateSeg()
          Method enumerateSeg.
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 java.lang.Object getChoiceValue()
          Returns the value of field 'choiceValue'.
 Pos[] getPos()
          Method getPos.Returns the contents of the collection in an Array.
 Pos getPos(int index)
          Method getPos.
 java.util.Vector getPosAsReference()
          Method getPosAsReference.Returns a reference to '_posList'.
 int getPosCount()
          Method getPosCount.
 Seg[] getSeg()
          Method getSeg.Returns the contents of the collection in an Array.
 Seg getSeg(int index)
          Method getSeg.
 java.util.Vector getSegAsReference()
          Method getSegAsReference.Returns a reference to '_segList'.
 int getSegCount()
          Method getSegCount.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Method isValid.
 void removeAllPos()
           
 void removeAllSeg()
           
 boolean removePos(Pos vPos)
          Method removePos.
 Pos removePosAt(int index)
          Method removePosAt.
 boolean removeSeg(Seg vSeg)
          Method removeSeg.
 Seg removeSegAt(int index)
          Method removeSegAt.
 void setPos(int index, Pos vPos)
           
 void setPos(Pos[] vPosArray)
           
 void setPos(java.util.Vector vPosList)
          Sets the value of '_posList' by copying the given Vector.
 void setPosAsReference(java.util.Vector posVector)
          Deprecated.  
 void setSeg(int index, Seg vSeg)
           
 void setSeg(Seg[] vSegArray)
           
 void setSeg(java.util.Vector vSegList)
          Sets the value of '_segList' by copying the given Vector.
 void setSegAsReference(java.util.Vector segVector)
          Deprecated.  
 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

RangeType

public RangeType()
Method Detail

addPos

public void addPos(Pos vPos)
            throws java.lang.IndexOutOfBoundsException
Parameters:
vPos -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPos

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

addSeg

public void addSeg(Seg vSeg)
            throws java.lang.IndexOutOfBoundsException
Parameters:
vSeg -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addSeg

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

enumeratePos

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

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

enumerateSeg

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

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

getChoiceValue

public java.lang.Object getChoiceValue()
Returns the value of field 'choiceValue'. The field 'choiceValue' has the following description: Internal choice value storage

Returns:
the value of field 'ChoiceValue'.

getPos

public Pos getPos(int index)
           throws java.lang.IndexOutOfBoundsException
Method getPos.

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

getPos

public Pos[] getPos()
Method getPos.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

getPosAsReference

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

Returns:
a reference to the Vector backing this class

getPosCount

public int getPosCount()
Method getPosCount.

Returns:
the size of this collection

getSeg

public Seg getSeg(int index)
           throws java.lang.IndexOutOfBoundsException
Method getSeg.

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

getSeg

public Seg[] getSeg()
Method getSeg.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

getSegAsReference

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

Returns:
a reference to the Vector backing this class

getSegCount

public int getSegCount()
Method getSegCount.

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

removeAllPos

public void removeAllPos()

removeAllSeg

public void removeAllSeg()

removePos

public boolean removePos(Pos vPos)
Method removePos.

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

removePosAt

public Pos removePosAt(int index)
Method removePosAt.

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

removeSeg

public boolean removeSeg(Seg vSeg)
Method removeSeg.

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

removeSegAt

public Seg removeSegAt(int index)
Method removeSegAt.

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

setPos

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

setPos

public void setPos(Pos[] vPosArray)
Parameters:
vPosArray -

setPos

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

Parameters:
vPosList - the Vector to copy.

setPosAsReference

public void setPosAsReference(java.util.Vector posVector)
Deprecated.  

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

Parameters:
posVector - the Vector to set.

setSeg

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

setSeg

public void setSeg(Seg[] vSegArray)
Parameters:
vSegArray -

setSeg

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

Parameters:
vSegList - the Vector to copy.

setSegAsReference

public void setSegAsReference(java.util.Vector segVector)
Deprecated.  

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

Parameters:
segVector - the Vector to set.

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