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

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.CAS044DataRecord
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class CAS044DataRecord
extends AbstractCASDataRecord

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

See Also:
CAS044DataHandler, Serialized Form

Field Summary
protected  int _AllHRPs
          CS0440001 = _AllHRPs
protected  int _HRP_HigherManagerialAndProfessionalOccupations
          CS0440012 = _HRP_HigherManagerialAndProfessionalOccupations
protected  int _HRP_IntermediateOccupations
          CS0440034 = _HRP_IntermediateOccupations
protected  int _HRP_LowerManagerialAndProfessionalOccupations
          CS0440023 = _HRP_LowerManagerialAndProfessionalOccupations
protected  int _HRP_LowerSupervisoryAndTechnicalOccupations
          CS0440056 = _HRP_LowerSupervisoryAndTechnicalOccupations
protected  int _HRP_NeverWorkedOrLongTermUnemployed
          CS0440089 = _HRP_NeverWorkedOrLongTermUnemployed
protected  int _HRP_NotClassified
          CS0440100 = _HRP_NotClassified
protected  int _HRP_RoutineOccupations
          CS0440078 = _HRP_RoutineOccupations
protected  int _HRP_SemiRoutineOccupations
          CS0440067 = _HRP_SemiRoutineOccupations
protected  int _HRP_SmallEmployersAndOwnAccountWorkers
          CS0440045 = _HRP_SmallEmployersAndOwnAccountWorkers
 
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
CAS044DataRecord()
          Creates a new CAS044Record
CAS044DataRecord(boolean initZero)
          Creates a new CAS044Record
CAS044DataRecord(CAS044DataRecord CAS044Record)
          Creates a new CAS044Record cloned from CAS044Record
CAS044DataRecord(long RecordID, java.lang.String line)
          Creates a new CAS044DataRecord
CAS044DataRecord(java.io.RandomAccessFile aRandomAccessFile)
          Creates a new CAS044DataRecord from aRandomAccessFile.
 
Method Summary
protected  void _Init()
          Initialises all fields.
 CAS044DataRecord aggregate(CAS044DataRecord aCAS044DataRecord)
           
 CAS044DataRecord aggregate(CAS044DataRecord aCAS044DataRecord, long newRecordID, char[] newZone_Code)
           
 int get_AllHRPs()
          Returns a copy of this._AllHRPs
 int get_HRP_HigherManagerialAndProfessionalOccupations()
          Returns a copy of this._HRP_HigherManagerialAndProfessionalOccupations
 int get_HRP_IntermediateOccupations()
          Returns a copy of this._HRP_IntermediateOccupations
 int get_HRP_LowerManagerialAndProfessionalOccupations()
          Returns a copy of this._HRP_LowerManagerialAndProfessionalOccupations
 int get_HRP_LowerSupervisoryAndTechnicalOccupations()
          Returns a copy of this._HRP_LowerSupervisoryAndTechnicalOccupations
 int get_HRP_NeverWorkedOrLongTermUnemployed()
          Returns a copy of this._HRP_NeverWorkedOrLongTermUnemployed
 int get_HRP_NotClassified()
          Returns a copy of this._HRP_NotClassified
 int get_HRP_RoutineOccupations()
          Returns a copy of this._HRP_RoutineOccupations
 int get_HRP_SemiRoutineOccupations()
          Returns a copy of this._HRP_SemiRoutineOccupations
 int get_HRP_SmallEmployersAndOwnAccountWorkers()
          Returns a copy of this._HRP_SmallEmployersAndOwnAccountWorkers
 long getSizeInBytes()
          Returns the size of this CAS044DataRecord in bytes as a long.
protected  void init(CAS044DataRecord aCAS044DataRecord)
          Initialises from aCAS044DataRecord.
protected  void initZero()
          Initialises all fields as zero.
 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

_AllHRPs

protected int _AllHRPs
CS0440001 = _AllHRPs


_HRP_HigherManagerialAndProfessionalOccupations

protected int _HRP_HigherManagerialAndProfessionalOccupations
CS0440012 = _HRP_HigherManagerialAndProfessionalOccupations


_HRP_LowerManagerialAndProfessionalOccupations

protected int _HRP_LowerManagerialAndProfessionalOccupations
CS0440023 = _HRP_LowerManagerialAndProfessionalOccupations


_HRP_IntermediateOccupations

protected int _HRP_IntermediateOccupations
CS0440034 = _HRP_IntermediateOccupations


_HRP_SmallEmployersAndOwnAccountWorkers

protected int _HRP_SmallEmployersAndOwnAccountWorkers
CS0440045 = _HRP_SmallEmployersAndOwnAccountWorkers


_HRP_LowerSupervisoryAndTechnicalOccupations

protected int _HRP_LowerSupervisoryAndTechnicalOccupations
CS0440056 = _HRP_LowerSupervisoryAndTechnicalOccupations


_HRP_SemiRoutineOccupations

protected int _HRP_SemiRoutineOccupations
CS0440067 = _HRP_SemiRoutineOccupations


_HRP_RoutineOccupations

protected int _HRP_RoutineOccupations
CS0440078 = _HRP_RoutineOccupations


_HRP_NeverWorkedOrLongTermUnemployed

protected int _HRP_NeverWorkedOrLongTermUnemployed
CS0440089 = _HRP_NeverWorkedOrLongTermUnemployed


_HRP_NotClassified

protected int _HRP_NotClassified
CS0440100 = _HRP_NotClassified

Constructor Detail

CAS044DataRecord

public CAS044DataRecord()
Creates a new CAS044Record


CAS044DataRecord

public CAS044DataRecord(CAS044DataRecord CAS044Record)
Creates a new CAS044Record cloned from CAS044Record

Parameters:
CAS044Record - The CAS044Record from which this is cloned.

CAS044DataRecord

public CAS044DataRecord(boolean initZero)
Creates a new CAS044Record

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

CAS044DataRecord

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

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

CAS044DataRecord

public CAS044DataRecord(java.io.RandomAccessFile aRandomAccessFile)
                 throws java.io.IOException
Creates a new CAS044DataRecord from aRandomAccessFile. The aRandomAccessFile.getFilePointer() changes only as the CAS044DataRecord is read.

Parameters:
aRandomAccessFile - The RandomAccessFile from which this is created.
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 as zero.


init

protected void init(CAS044DataRecord aCAS044DataRecord)
Initialises from aCAS044DataRecord.

Parameters:
aCAS044DataRecord - The CAS044DataRecord 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

get_AllHRPs

public int get_AllHRPs()
Returns a copy of this._AllHRPs


get_HRP_HigherManagerialAndProfessionalOccupations

public int get_HRP_HigherManagerialAndProfessionalOccupations()
Returns a copy of this._HRP_HigherManagerialAndProfessionalOccupations


get_HRP_LowerManagerialAndProfessionalOccupations

public int get_HRP_LowerManagerialAndProfessionalOccupations()
Returns a copy of this._HRP_LowerManagerialAndProfessionalOccupations


get_HRP_IntermediateOccupations

public int get_HRP_IntermediateOccupations()
Returns a copy of this._HRP_IntermediateOccupations


get_HRP_SmallEmployersAndOwnAccountWorkers

public int get_HRP_SmallEmployersAndOwnAccountWorkers()
Returns a copy of this._HRP_SmallEmployersAndOwnAccountWorkers


get_HRP_LowerSupervisoryAndTechnicalOccupations

public int get_HRP_LowerSupervisoryAndTechnicalOccupations()
Returns a copy of this._HRP_LowerSupervisoryAndTechnicalOccupations


get_HRP_SemiRoutineOccupations

public int get_HRP_SemiRoutineOccupations()
Returns a copy of this._HRP_SemiRoutineOccupations


get_HRP_RoutineOccupations

public int get_HRP_RoutineOccupations()
Returns a copy of this._HRP_RoutineOccupations


get_HRP_NeverWorkedOrLongTermUnemployed

public int get_HRP_NeverWorkedOrLongTermUnemployed()
Returns a copy of this._HRP_NeverWorkedOrLongTermUnemployed


get_HRP_NotClassified

public int get_HRP_NotClassified()
Returns a copy of this._HRP_NotClassified


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 CAS044DataRecord aggregate(CAS044DataRecord aCAS044DataRecord)
Parameters:
aCAS044DataRecord - The CAS044DataRecord to be aggregated with this.
Returns:
An aggregated CAS044DataRecord where: RecordID = this.RecordID Zone_Code = this.Zone_Code For aggregating CAS044DataRecords. 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 CAS044DataRecord aggregate(CAS044DataRecord aCAS044DataRecord,
                                  long newRecordID,
                                  char[] newZone_Code)
Parameters:
aCAS044DataRecord - The CAS044DataRecord to be aggregated with this.
newRecordID - The RecordID assigned to result.
newZone_Code - The Zone_Code assigned to result.
Returns:
An aggregated CAS044DataRecord where: RecordID = newRecordID Zone_Code = newZone_Code For aggregating CAS044DataRecords. 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 CAS044DataRecord 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.