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

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

public class CASKS14bDataRecord
extends AbstractCASDataRecord

For representing CAS KS14b Records and providing safe access to the data.

See Also:
Serialized Form

Field Summary
protected  int malesAged16to74
          KS014b0001 = malesAged16to74
protected  int malesAged16to74FullTimeStudents
          KS014b0012 = malesAged16to74FullTimeStudents
protected  int malesAged16to74HigherProfessionalOccupations
          KS014b0003 = malesAged16to74HigherProfessionalOccupations
protected  int malesAged16to74IntermediateOccupations
          KS014b0005 = malesAged16to74IntermediateOccupations
protected  int malesAged16to74LargeEmployersAndHigherManagerialOccupations
          KS014b0002 = malesAged16to74LargeEmployersAndHigherManagerialOccupations
protected  int malesAged16to74LongTermUnemployed
          KS014b0011 = malesAged16to74LongTermUnemployed
protected  int malesAged16to74LowerManagerialAndProfessionalOccupationsIntermediate
          KS014b0004 = malesAged16to74LowerManagerialAndProfessionalOccupationsIntermediate
protected  int malesAged16to74LowerSupervisoryAndTechnicalOccupations
          KS014b0007 = malesAged16to74LowerSupervisoryAndTechnicalOccupations
protected  int malesAged16to74NeverWorked
          KS014b0010 = malesAged16to74NeverWorked
protected  int malesAged16to74RoutineOccupations
          KS014b0009 = malesAged16to74RoutineOccupations
protected  int malesAged16to74SemiRoutineOccupations
          KS014b014b = malesAged16to74SemiRoutineOccupations
protected  int malesAged16to74SmallEmployersAndOwnAccountWorkers
          KS014b0006 = malesAged16to74SmallEmployersAndOwnAccountWorkers
 
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
CASKS14bDataRecord()
          Creates a new CASKS14bRecord
CASKS14bDataRecord(CASKS14bDataRecord cASKS14bRecord)
          Creates a new CASKS14bRecord cloned from cASKS14bRecord
CASKS14bDataRecord(long RecordID, java.lang.String line)
          Creates a new CASKS14bDataRecord
CASKS14bDataRecord(java.io.RandomAccessFile aRandomAccessFile)
          Creates a new CASKS14bRecord
 
Method Summary
protected  void _Init()
          Initialises all fields.
 CASKS14bDataRecord aggregate(CASKS14bDataRecord aCASKS14bDataRecord)
           
 CASKS14bDataRecord aggregate(CASKS14bDataRecord aCASKS14bDataRecord, long newRecordID, char[] newZone_Code)
           
 int getMalesAged16to74()
          Returns a copy of this.malesAged16to74
 int getMalesAged16to74FullTimeStudents()
          Returns a copy of this.malesAged16to74FullTimeStudents
 int getMalesAged16to74HigherProfessionalOccupations()
          Returns a copy of this.malesAged16to74HigherProfessionalOccupations
 int getMalesAged16to74IntermediateOccupations()
          Returns a copy of this.malesAged16to74IntermediateOccupations
 int getMalesAged16to74LargeEmployersAndHigherManagerialOccupations()
          Returns a copy of this.malesAged16to74LargeEmployersAndHigherManagerialOccupations
 int getMalesAged16to74LongTermUnemployed()
          Returns a copy of this.malesAged16to74LongTermUnemployed
 int getMalesAged16to74LowerManagerialAndProfessionalOccupationsIntermediate()
          Returns a copy of this.
 int getMalesAged16to74LowerSupervisoryAndTechnicalOccupations()
          Returns a copy of this.malesAged16to74LowerSupervisoryAndTechnicalOccupations
 int getMalesAged16to74NeverWorked()
          Returns a copy of this.malesAged16to74NeverWorked
 int getMalesAged16to74RoutineOccupations()
          Returns a copy of this.malesAged16to74RoutineOccupations
 int getMalesAged16to74SemiRoutineOccupations()
          Returns a copy of this.malesAged16to74SemiRoutineOccupations
 int getMalesAged16to74SmallEmployersAndOwnAccountWorkers()
          Returns a copy of this.malesAged16to74SmallEmployersAndOwnAccountWorkers
 long getSizeInBytes()
          Returns the size of this CASKS14bRecord in bytes as a long.
protected  void init(CASKS14bDataRecord cASKS14bRecord)
          Initialises all fields from those in cASKS14bRecord.
 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

malesAged16to74

protected int malesAged16to74
KS014b0001 = malesAged16to74


malesAged16to74LargeEmployersAndHigherManagerialOccupations

protected int malesAged16to74LargeEmployersAndHigherManagerialOccupations
KS014b0002 = malesAged16to74LargeEmployersAndHigherManagerialOccupations


malesAged16to74HigherProfessionalOccupations

protected int malesAged16to74HigherProfessionalOccupations
KS014b0003 = malesAged16to74HigherProfessionalOccupations


malesAged16to74LowerManagerialAndProfessionalOccupationsIntermediate

protected int malesAged16to74LowerManagerialAndProfessionalOccupationsIntermediate
KS014b0004 = malesAged16to74LowerManagerialAndProfessionalOccupationsIntermediate


malesAged16to74IntermediateOccupations

protected int malesAged16to74IntermediateOccupations
KS014b0005 = malesAged16to74IntermediateOccupations


malesAged16to74SmallEmployersAndOwnAccountWorkers

protected int malesAged16to74SmallEmployersAndOwnAccountWorkers
KS014b0006 = malesAged16to74SmallEmployersAndOwnAccountWorkers


malesAged16to74LowerSupervisoryAndTechnicalOccupations

protected int malesAged16to74LowerSupervisoryAndTechnicalOccupations
KS014b0007 = malesAged16to74LowerSupervisoryAndTechnicalOccupations


malesAged16to74SemiRoutineOccupations

protected int malesAged16to74SemiRoutineOccupations
KS014b014b = malesAged16to74SemiRoutineOccupations


malesAged16to74RoutineOccupations

protected int malesAged16to74RoutineOccupations
KS014b0009 = malesAged16to74RoutineOccupations


malesAged16to74NeverWorked

protected int malesAged16to74NeverWorked
KS014b0010 = malesAged16to74NeverWorked


malesAged16to74LongTermUnemployed

protected int malesAged16to74LongTermUnemployed
KS014b0011 = malesAged16to74LongTermUnemployed


malesAged16to74FullTimeStudents

protected int malesAged16to74FullTimeStudents
KS014b0012 = malesAged16to74FullTimeStudents

Constructor Detail

CASKS14bDataRecord

public CASKS14bDataRecord()
Creates a new CASKS14bRecord


CASKS14bDataRecord

public CASKS14bDataRecord(CASKS14bDataRecord cASKS14bRecord)
Creates a new CASKS14bRecord cloned from cASKS14bRecord

Parameters:
cASKS14bRecord - The CASKS14bRecord from which this is cloned.

CASKS14bDataRecord

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

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

CASKS14bDataRecord

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

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

_Init

protected void _Init()
Initialises all fields.

Overrides:
_Init in class AbstractCASDataRecord

init

protected void init(CASKS14bDataRecord cASKS14bRecord)
Initialises all fields from those in cASKS14bRecord.

Parameters:
cASKS14bRecord - The CASKS14bRecord 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

getMalesAged16to74

public int getMalesAged16to74()
Returns a copy of this.malesAged16to74


getMalesAged16to74LargeEmployersAndHigherManagerialOccupations

public int getMalesAged16to74LargeEmployersAndHigherManagerialOccupations()
Returns a copy of this.malesAged16to74LargeEmployersAndHigherManagerialOccupations


getMalesAged16to74HigherProfessionalOccupations

public int getMalesAged16to74HigherProfessionalOccupations()
Returns a copy of this.malesAged16to74HigherProfessionalOccupations


getMalesAged16to74LowerManagerialAndProfessionalOccupationsIntermediate

public int getMalesAged16to74LowerManagerialAndProfessionalOccupationsIntermediate()
Returns a copy of this. malesAged16to74LowerManagerialAndProfessionalOccupationsIntermediate


getMalesAged16to74IntermediateOccupations

public int getMalesAged16to74IntermediateOccupations()
Returns a copy of this.malesAged16to74IntermediateOccupations


getMalesAged16to74SmallEmployersAndOwnAccountWorkers

public int getMalesAged16to74SmallEmployersAndOwnAccountWorkers()
Returns a copy of this.malesAged16to74SmallEmployersAndOwnAccountWorkers


getMalesAged16to74LowerSupervisoryAndTechnicalOccupations

public int getMalesAged16to74LowerSupervisoryAndTechnicalOccupations()
Returns a copy of this.malesAged16to74LowerSupervisoryAndTechnicalOccupations


getMalesAged16to74SemiRoutineOccupations

public int getMalesAged16to74SemiRoutineOccupations()
Returns a copy of this.malesAged16to74SemiRoutineOccupations


getMalesAged16to74RoutineOccupations

public int getMalesAged16to74RoutineOccupations()
Returns a copy of this.malesAged16to74RoutineOccupations


getMalesAged16to74NeverWorked

public int getMalesAged16to74NeverWorked()
Returns a copy of this.malesAged16to74NeverWorked


getMalesAged16to74LongTermUnemployed

public int getMalesAged16to74LongTermUnemployed()
Returns a copy of this.malesAged16to74LongTermUnemployed


getMalesAged16to74FullTimeStudents

public int getMalesAged16to74FullTimeStudents()
Returns a copy of this.malesAged16to74FullTimeStudents


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