uk.ac.vamsas.objects.core
Class MapRangeType

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

public class MapRangeType
extends RangeType
implements java.io.Serializable

Class MapRangeType.

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
MapRangeType()
           
 
Method Summary
 void deleteUnit()
           
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 long getUnit()
          Returns the value of field 'unit'.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean hasUnit()
          Method hasUnit.
 boolean isValid()
          Method isValid.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void setUnit(long unit)
          Sets the value of field 'unit'.
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

MapRangeType

public MapRangeType()
Method Detail

deleteUnit

public void deleteUnit()

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.

getUnit

public long getUnit()
Returns the value of field 'unit'. The field 'unit' has the following description: number of dictionary symbol widths involved in each mapped position on this sequence (for example, 3 for a dna sequence exon region that is being mapped to a protein sequence). This is optional, since the unit can be usually be inferred from the dictionary type of each sequence involved in the mapping.

Returns:
the value of field 'Unit'.

hasUnit

public boolean hasUnit()
Method hasUnit.

Returns:
true if at least one Unit 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 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

setUnit

public void setUnit(long unit)
Sets the value of field 'unit'. The field 'unit' has the following description: number of dictionary symbol widths involved in each mapped position on this sequence (for example, 3 for a dna sequence exon region that is being mapped to a protein sequence). This is optional, since the unit can be usually be inferred from the dictionary type of each sequence involved in the mapping.

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

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