uk.ac.leeds.ccg.andyt.projects.moses.io
Class AbstractCASDataRecord

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataRecord
      extended by uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractCASDataRecord
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
CAS001DataRecord, CAS002DataRecord, CAS003DataRecord, CAS044DataRecord, CASAreaEastingNorthingDataRecord, CASDataRecord, CASDataRecord_1, CASKS002DataRecord, CASKS006DataRecord, CASKS008DataRecord, CASKS010DataRecord, CASKS013DataRecord, CASKS015DataRecord, CASKS016DataRecord, CASKS017DataRecord, CASKS020DataRecord, CASKS023DataRecord, CASKS09bDataRecord, CASKS09cDataRecord, CASKS12bDataRecord, CASKS12cDataRecord, CASKS14bDataRecord, CASKS14cDataRecord, CASUV003DataRecord, MarkOutputDataRecord_1, SWSDataRecord, ToyModelDataRecord, ToyModelDataRecord_1, ToyModelHSARDataRecord

public abstract class AbstractCASDataRecord
extends AbstractDataRecord
implements java.io.Serializable, java.lang.Comparable

An abstract class for a Census Area Statistic (CAS) Data Record.

See Also:
AbstractDataHandler, Serialized Form

Field Summary
protected  char[] Zone_Code
          For storing Census Area Zone Code as a char[]
 
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataRecord
_RecordID
 
Constructor Summary
AbstractCASDataRecord()
           
 
Method Summary
protected  void _Init()
          Initialises.
 boolean equals(java.lang.Object object)
           
 long getSizeInBytes()
           
 char[] getZone_Code()
          Returns a copy of this.Zone_Code
 int hashCode()
           
protected  void init(AbstractCASDataRecord aCASDataRecord)
          Initialise from aCASDataRecord
 java.lang.String toCSVString()
           
 java.lang.String toCSVStringFields()
           
 java.lang.String toString()
           
 void write(java.io.RandomAccessFile aRandomAccessFile)
          Calls super.write(RandomAccessFile) then writes out: this.Zone_Code as a sequence of chars to aRandomAccessFile.
 void write(java.io.RandomAccessFile aRandomAccessFile, long RecordID, int hashCode, java.lang.String zoneCode)
          Writes this to aRandomAccessFile at the current position using RecordID as the RecordID, hashCode as hashCode and zoneCode as zoneCode.
 
Methods inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataRecord
_Init, compareTo, get_RecordID, getNumberOfBitsInByte
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

Zone_Code

protected char[] Zone_Code
For storing Census Area Zone Code as a char[]

Constructor Detail

AbstractCASDataRecord

public AbstractCASDataRecord()
Method Detail

init

protected void init(AbstractCASDataRecord aCASDataRecord)
Initialise from aCASDataRecord

Parameters:
aCASDataRecord - The AbstractCASDataRecord used to initialise.

_Init

protected void _Init()
Initialises.

Overrides:
_Init in class AbstractDataRecord

toString

public java.lang.String toString()
Overrides:
toString in class AbstractDataRecord
Returns:
A String description of this.

toCSVString

public java.lang.String toCSVString()
Overrides:
toCSVString in class AbstractDataRecord
Returns:
A Comma Seperated Version (CSV) String of the values of the Fields of this.

toCSVStringFields

public java.lang.String toCSVStringFields()
Overrides:
toCSVStringFields in class AbstractDataRecord
Returns:
A Comma Seperated Version (CSV) String of the names of the Fields of this

write

public void write(java.io.RandomAccessFile aRandomAccessFile)
Calls super.write(RandomAccessFile) then writes out: to aRandomAccessFile.

Overrides:
write in class AbstractDataRecord
Parameters:
aRandomAccessFile - The RandomAccessFile written to.
See Also:
AbstractDataRecord.write(RandomAccessFile)

write

public void write(java.io.RandomAccessFile aRandomAccessFile,
                  long RecordID,
                  int hashCode,
                  java.lang.String zoneCode)
Writes this to aRandomAccessFile at the current position using RecordID as the RecordID, hashCode as hashCode and zoneCode as zoneCode.

Parameters:
aRandomAccessFile - The RandomAccessFile this is written to.
RecordID - The RecordID to be written.
hashCode - The hashCode to be written.
zoneCode - The zoneCode to be written.

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class AbstractDataRecord
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractDataRecord

getSizeInBytes

public long getSizeInBytes()
Overrides:
getSizeInBytes in class AbstractDataRecord
Returns:
The size (in bytes) of this as a long. This does not account for the private Fields serialVersionUID.

getZone_Code

public char[] getZone_Code()
Returns a copy of this.Zone_Code