uk.ac.vamsas.objects.core
Class Seg

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

public class Seg
extends Vobject
implements java.io.Serializable

a region from start to end, with flag for inclusivity of terminii

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
Seg()
           
 
Method Summary
 void deleteEnd()
           
 void deleteInclusive()
           
 void deleteStart()
           
 boolean equals(java.lang.Object obj)
          Overrides the java.lang.Object.equals method.
 int getEnd()
          Returns the value of field 'end'.
 boolean getInclusive()
          Returns the value of field 'inclusive'.
 int getStart()
          Returns the value of field 'start'.
 boolean hasEnd()
          Method hasEnd.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean hasInclusive()
          Method hasInclusive.
 boolean hasStart()
          Method hasStart.
 boolean isInclusive()
          Returns the value of field 'inclusive'.
 boolean isValid()
          Method isValid.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void setEnd(int end)
          Sets the value of field 'end'.
 void setInclusive(boolean inclusive)
          Sets the value of field 'inclusive'.
 void setStart(int start)
          Sets the value of field 'start'.
static Seg unmarshal(java.io.Reader reader)
          Method unmarshal.
 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

Seg

public Seg()
Method Detail

deleteEnd

public void deleteEnd()

deleteInclusive

public void deleteInclusive()

deleteStart

public void deleteStart()

equals

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

Parameters:
obj -
Returns:
true if the objects are equal.

getEnd

public int getEnd()
Returns the value of field 'end'.

Returns:
the value of field 'End'.

getInclusive

public boolean getInclusive()
Returns the value of field 'inclusive'. The field 'inclusive' has the following description: when false, a consecutive range like 'start=1, end=2' means the region lying after position 1 and before position 2

Returns:
the value of field 'Inclusive'.

getStart

public int getStart()
Returns the value of field 'start'.

Returns:
the value of field 'Start'.

hasEnd

public boolean hasEnd()
Method hasEnd.

Returns:
true if at least one End has been added

hasInclusive

public boolean hasInclusive()
Method hasInclusive.

Returns:
true if at least one Inclusive has been added

hasStart

public boolean hasStart()
Method hasStart.

Returns:
true if at least one Start 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 Vobject
Returns:
a hash code value for the object.

isInclusive

public boolean isInclusive()
Returns the value of field 'inclusive'. The field 'inclusive' has the following description: when false, a consecutive range like 'start=1, end=2' means the region lying after position 1 and before position 2

Returns:
the value of field 'Inclusive'.

isValid

public boolean isValid()
Method isValid.

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

setEnd

public void setEnd(int end)
Sets the value of field 'end'.

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

setInclusive

public void setInclusive(boolean inclusive)
Sets the value of field 'inclusive'. The field 'inclusive' has the following description: when false, a consecutive range like 'start=1, end=2' means the region lying after position 1 and before position 2

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

setStart

public void setStart(int start)
Sets the value of field 'start'.

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

unmarshal

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