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

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
          extended by uk.ac.leeds.ccg.andyt.projects.moses.io.CASKS002DataRecord
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class CASKS002DataRecord
extends AbstractCASDataRecord

A class for representing a CASKS002 Data Record and providing safe access to the data.

See Also:
CAS003DataHandler, Serialized Form

Field Summary
protected  int age15
          KS0020006 = age15
protected  int ages0to4
          KS0020002 = ages0to4
protected  int ages10to14
          KS0020005 = ages10to14
protected  int ages16to17
          KS0020007 = ages16to17
protected  int ages18to19
          KS0020008 = ages18to19
protected  int ages20to24
          KS0020009 = ages20to24
protected  int ages25to29
          KS0020010 = ages25to29
protected  int ages30to44
          KS0020011 = ages30to44
protected  int ages45to59
          KS0020012 = ages45to59
protected  int ages5to7
          KS0020003 = ages5to7
protected  int ages60to64
          KS0020013 = ages60to64
protected  int ages65to74
          KS0020014 = ages65to74
protected  int ages75to84
          KS0020015 = ages75to84
protected  int ages85to89
          KS0020016 = ages85to89
protected  int ages8to9
          KS0020004 = ages8to9
protected  int ages90AndOver
          KS0020017 = ages90AndOver
protected  int agesAll
          KS0020001 = agesAll
 
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractCASDataRecord
Zone_Code
 
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataRecord
_RecordID
 
Constructor Summary
CASKS002DataRecord()
          Creates a new CASKS002DataRecord
CASKS002DataRecord(boolean initZero)
          Creates a new CASKS002DataRecord
CASKS002DataRecord(CASKS002DataRecord aCASKS002DataRecord)
          Creates a new CASKS002DataRecord cloned from aCASKS002DataRecord
CASKS002DataRecord(long RecordID, java.lang.String line)
          Creates a new CASKS002DataRecord
CASKS002DataRecord(java.io.RandomAccessFile aRandomAccessFile)
          Creates a new CASKS002DataRecord
 
Method Summary
protected  void _Init()
          Initialises all fields.
 CASKS002DataRecord aggregate(CASKS002DataRecord aCASKS002DataRecord)
           
 CASKS002DataRecord aggregate(CASKS002DataRecord aCASKS002DataRecord, long newRecordID, char[] newZone_Code)
           
 int getAge15()
          Returns a copy of this.age15
 int getAges0to4()
          Returns a copy of this.ages0to4
 int getAges10to14()
          Returns a copy of this.ages10to14
 int getAges16to17()
          Returns a copy of this.ages16to17
 int getAges18to19()
          Returns a copy of this.ages18to19
 int getAges20to24()
          Returns a copy of this.ages20to24
 int getAges25to29()
          Returns a copy of this.ages25to29
 int getAges30to44()
          Returns a copy of this.ages30to44
 int getAges45to59()
          Returns a copy of this.ages45to59
 int getAges5to7()
          Returns a copy of this.ages5to7
 int getAges60to64()
          Returns a copy of this.ages60to64
 int getAges65to74()
          Returns a copy of this.ages65to74
 int getAges75to84()
          Returns a copy of this.ages75to84
 int getAges85to89()
          Returns a copy of this.ages85to89
 int getAges8to9()
          Returns a copy of this.ages8to9
 int getAges90AndOver()
          Returns a copy of this.ages90AndOver
 int getAgesAll()
          Returns a copy of this.agesAll
 long getSizeInBytes()
          Returns the size of this CASKS002Record in bytes as a long.
protected  void init(CASKS002DataRecord aCASKS002DataRecord)
          Initialises all fields from those in aCASKS002DataRecord.
protected  void initZero()
          Initialises all fields.
 java.lang.String toCSVString()
           
 java.lang.String toCSVStringFields()
           
 java.lang.String toString()
          Returns a string description of this;
 void write(java.io.RandomAccessFile aRandomAccessFile)
          Writes this to aRandomAccessFile at the current position.
 void write(java.io.RandomAccessFile aRandomAccessFile, boolean avoidCallToSuper)
          Writes this to aRandomAccessFile at the current position.
 
Methods inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractCASDataRecord
equals, getZone_Code, hashCode, init, write
 
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

agesAll

protected int agesAll
KS0020001 = agesAll


ages0to4

protected int ages0to4
KS0020002 = ages0to4


ages5to7

protected int ages5to7
KS0020003 = ages5to7


ages8to9

protected int ages8to9
KS0020004 = ages8to9


ages10to14

protected int ages10to14
KS0020005 = ages10to14


age15

protected int age15
KS0020006 = age15


ages16to17

protected int ages16to17
KS0020007 = ages16to17


ages18to19

protected int ages18to19
KS0020008 = ages18to19


ages20to24

protected int ages20to24
KS0020009 = ages20to24


ages25to29

protected int ages25to29
KS0020010 = ages25to29


ages30to44

protected int ages30to44
KS0020011 = ages30to44


ages45to59

protected int ages45to59
KS0020012 = ages45to59


ages60to64

protected int ages60to64
KS0020013 = ages60to64


ages65to74

protected int ages65to74
KS0020014 = ages65to74


ages75to84

protected int ages75to84
KS0020015 = ages75to84


ages85to89

protected int ages85to89
KS0020016 = ages85to89


ages90AndOver

protected int ages90AndOver
KS0020017 = ages90AndOver

Constructor Detail

CASKS002DataRecord

public CASKS002DataRecord()
Creates a new CASKS002DataRecord


CASKS002DataRecord

public CASKS002DataRecord(CASKS002DataRecord aCASKS002DataRecord)
Creates a new CASKS002DataRecord cloned from aCASKS002DataRecord

Parameters:
aCASKS002DataRecord - The CASKS002DataRecord from which this is cloned.

CASKS002DataRecord

public CASKS002DataRecord(boolean initZero)
Creates a new CASKS002DataRecord

Parameters:
initZero - To ensure initZero() is used instead of _Init()

CASKS002DataRecord

public CASKS002DataRecord(long RecordID,
                          java.lang.String line)
                   throws java.io.IOException
Creates a new CASKS002DataRecord

Parameters:
RecordID - The RecordID to be assigned to this
line - The Comma Seperated Value String
Throws:
java.io.IOException

CASKS002DataRecord

public CASKS002DataRecord(java.io.RandomAccessFile aRandomAccessFile)
                   throws java.io.IOException
Creates a new CASKS002DataRecord

Parameters:
aRandomAccessFile -
Throws:
java.io.IOException
Method Detail

_Init

protected void _Init()
Initialises all fields.

Overrides:
_Init in class AbstractCASDataRecord

initZero

protected void initZero()
Initialises all fields.


init

protected void init(CASKS002DataRecord aCASKS002DataRecord)
Initialises all fields from those in aCASKS002DataRecord.

Parameters:
aCASKS002DataRecord - The CASKS002DataRecord thats fields are used to initialise this.

toString

public java.lang.String toString()
Returns a string description of this;

Overrides:
toString in class AbstractCASDataRecord
Returns:
A String description of this.

toCSVString

public java.lang.String toCSVString()
Overrides:
toCSVString in class AbstractCASDataRecord
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 AbstractCASDataRecord
Returns:
A Comma Seperated Version (CSV) String of the names of the Fields of this

getAgesAll

public int getAgesAll()
Returns a copy of this.agesAll


getAges0to4

public int getAges0to4()
Returns a copy of this.ages0to4


getAges5to7

public int getAges5to7()
Returns a copy of this.ages5to7


getAges8to9

public int getAges8to9()
Returns a copy of this.ages8to9


getAges10to14

public int getAges10to14()
Returns a copy of this.ages10to14


getAge15

public int getAge15()
Returns a copy of this.age15


getAges16to17

public int getAges16to17()
Returns a copy of this.ages16to17


getAges18to19

public int getAges18to19()
Returns a copy of this.ages18to19


getAges20to24

public int getAges20to24()
Returns a copy of this.ages20to24


getAges25to29

public int getAges25to29()
Returns a copy of this.ages25to29


getAges30to44

public int getAges30to44()
Returns a copy of this.ages30to44


getAges45to59

public int getAges45to59()
Returns a copy of this.ages45to59


getAges60to64

public int getAges60to64()
Returns a copy of this.ages60to64


getAges65to74

public int getAges65to74()
Returns a copy of this.ages65to74


getAges75to84

public int getAges75to84()
Returns a copy of this.ages75to84


getAges85to89

public int getAges85to89()
Returns a copy of this.ages85to89


getAges90AndOver

public int getAges90AndOver()
Returns a copy of this.ages90AndOver


write

public void write(java.io.RandomAccessFile aRandomAccessFile)
Writes this to aRandomAccessFile at the current position.

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

write

public void write(java.io.RandomAccessFile aRandomAccessFile,
                  boolean avoidCallToSuper)
Writes this to aRandomAccessFile at the current position.

Parameters:
aRandomAccessFile - The RandomAccessFile this is written to.
avoidCallToSuper - If true super.write() is not called

aggregate

public CASKS002DataRecord aggregate(CASKS002DataRecord aCASKS002DataRecord)
Parameters:
aCASKS002DataRecord - The CASKS002DataRecord to be aggregated with this.
Returns:
An aggregated CASKS002DataRecord where: RecordID = this.RecordID Zone_Code = this.Zone_Code For aggregating CASKS002DataRecords. User needs to take care in aggregating to ensure aggregation does not compromise (introduce error) based on the numbers used (i.e. numbers may not be precise or have sufficient magnitude).

aggregate

public CASKS002DataRecord aggregate(CASKS002DataRecord aCASKS002DataRecord,
                                    long newRecordID,
                                    char[] newZone_Code)
Parameters:
aCASKS002DataRecord - The CASKS002DataRecord to be aggregated with this.
newRecordID - The RecordID assigned to result.
newZone_Code - The Zone_Code assigned to result.
Returns:
An aggregated CASKS002DataRecord where: RecordID = newRecordID Zone_Code = newZone_Code For aggregating CASKS002DataRecords. User needs to take care in aggregating to ensure aggregation does not compromise (introduce error) based on the numbers used (i.e. numbers may not be precise or have sufficient magnitude).

getSizeInBytes

public long getSizeInBytes()
Returns the size of this CASKS002Record in bytes as a long. This does not account for serialVersionUID. A boolean is assumed to be the same size as an int in bytes.

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