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

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

public class CASKS12bDataRecord
extends AbstractCASDataRecord

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

See Also:
Serialized Form

Field Summary
protected  int malesAged16to74InEmployment
          KS012b0001 = malesAged16to74InEmployment
protected  int malesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations
          KS012b0005 = malesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations
protected  int malesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations
          KS012b0004 = malesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations
protected  int malesAged16to74InEmploymentWorkingAsElementaryOccupations
          KS012b0010 = malesAged16to74InEmploymentWorkingAsElementaryOccupations
protected  int malesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials
          KS012b0002 = malesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials
protected  int malesAged16to74InEmploymentWorkingAsPersonalServiceOccupations
          KS012b0007 = malesAged16to74InEmploymentWorkingAsPersonalServiceOccupations
protected  int malesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives
          KS012b0009 = malesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives
protected  int malesAged16to74InEmploymentWorkingAsProfessionalOccupations
          KS012b0003 = malesAged16to74InEmploymentWorkingAsProfessionalOccupations
protected  int malesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations
          KS012b012b = malesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations
protected  int malesAged16to74InEmploymentWorkingAsSkilledTradesOccupations
          KS012b0006 = malesAged16to74InEmploymentWorkingAsSkilledTradesOccupations
 
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
CASKS12bDataRecord()
          Creates a new CASKS12bRecord
CASKS12bDataRecord(CASKS12bDataRecord cASKS12bRecord)
          Creates a new CASKS12bRecord cloned from cASKS12bRecord
CASKS12bDataRecord(long RecordID, java.lang.String line)
          Creates a new CASKS12bDataRecord
CASKS12bDataRecord(java.io.RandomAccessFile aRandomAccessFile)
          Creates a new CASKS12bRecord
 
Method Summary
protected  void _Init()
          Initialises all fields.
 CASKS12bDataRecord aggregate(CASKS12bDataRecord aCASKS12bDataRecord)
           
 CASKS12bDataRecord aggregate(CASKS12bDataRecord aCASKS12bDataRecord, long newRecordID, char[] newZone_Code)
           
 int getMalesAged16to74InEmployment()
          Returns a copy of this.malesAged16to74InEmployment
 int getMalesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations()
          Returns a copy of this.
 int getMalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations()
          Returns a copy of this.
 int getMalesAged16to74InEmploymentWorkingAsElementaryOccupations()
          Returns a copy of this.malesAged16to74InEmploymentWorkingAsElementaryOccupations
 int getMalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials()
          Returns a copy of this.malesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials
 int getMalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations()
          Returns a copy of this.malesAged16to74InEmploymentWorkingAsPersonalServiceOccupations
 int getMalesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives()
          Returns a copy of this.
 int getMalesAged16to74InEmploymentWorkingAsProfessionalOccupations()
          Returns a copy of this.malesAged16to74InEmploymentWorkingAsProfessionalOccupations
 int getMalesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations()
          Returns a copy of this.
 int getMalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations()
          Returns a copy of this.malesAged16to74InEmploymentWorkingAsSkilledTradesOccupations
 long getSizeInBytes()
          Returns the size of this CASKS12bRecord in bytes as a long.
protected  void init(CASKS12bDataRecord cASKS12bRecord)
          Initialises all fields from those in cASKS12bRecord.
 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

malesAged16to74InEmployment

protected int malesAged16to74InEmployment
KS012b0001 = malesAged16to74InEmployment


malesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials

protected int malesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials
KS012b0002 = malesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials


malesAged16to74InEmploymentWorkingAsProfessionalOccupations

protected int malesAged16to74InEmploymentWorkingAsProfessionalOccupations
KS012b0003 = malesAged16to74InEmploymentWorkingAsProfessionalOccupations


malesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations

protected int malesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations
KS012b0004 = malesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations


malesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations

protected int malesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations
KS012b0005 = malesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations


malesAged16to74InEmploymentWorkingAsSkilledTradesOccupations

protected int malesAged16to74InEmploymentWorkingAsSkilledTradesOccupations
KS012b0006 = malesAged16to74InEmploymentWorkingAsSkilledTradesOccupations


malesAged16to74InEmploymentWorkingAsPersonalServiceOccupations

protected int malesAged16to74InEmploymentWorkingAsPersonalServiceOccupations
KS012b0007 = malesAged16to74InEmploymentWorkingAsPersonalServiceOccupations


malesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations

protected int malesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations
KS012b012b = malesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations


malesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives

protected int malesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives
KS012b0009 = malesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives


malesAged16to74InEmploymentWorkingAsElementaryOccupations

protected int malesAged16to74InEmploymentWorkingAsElementaryOccupations
KS012b0010 = malesAged16to74InEmploymentWorkingAsElementaryOccupations

Constructor Detail

CASKS12bDataRecord

public CASKS12bDataRecord()
Creates a new CASKS12bRecord


CASKS12bDataRecord

public CASKS12bDataRecord(CASKS12bDataRecord cASKS12bRecord)
Creates a new CASKS12bRecord cloned from cASKS12bRecord

Parameters:
cASKS12bRecord - The CASKS12bRecord from which this is cloned.

CASKS12bDataRecord

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

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

CASKS12bDataRecord

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

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

_Init

protected void _Init()
Initialises all fields.

Overrides:
_Init in class AbstractCASDataRecord

init

protected void init(CASKS12bDataRecord cASKS12bRecord)
Initialises all fields from those in cASKS12bRecord.

Parameters:
cASKS12bRecord - The CASKS12bRecord 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

getMalesAged16to74InEmployment

public int getMalesAged16to74InEmployment()
Returns a copy of this.malesAged16to74InEmployment


getMalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials

public int getMalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials()
Returns a copy of this.malesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials


getMalesAged16to74InEmploymentWorkingAsProfessionalOccupations

public int getMalesAged16to74InEmploymentWorkingAsProfessionalOccupations()
Returns a copy of this.malesAged16to74InEmploymentWorkingAsProfessionalOccupations


getMalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations

public int getMalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations()
Returns a copy of this. malesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations


getMalesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations

public int getMalesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations()
Returns a copy of this. malesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations


getMalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations

public int getMalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations()
Returns a copy of this.malesAged16to74InEmploymentWorkingAsSkilledTradesOccupations


getMalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations

public int getMalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations()
Returns a copy of this.malesAged16to74InEmploymentWorkingAsPersonalServiceOccupations


getMalesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations

public int getMalesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations()
Returns a copy of this. malesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations


getMalesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives

public int getMalesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives()
Returns a copy of this. malesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives


getMalesAged16to74InEmploymentWorkingAsElementaryOccupations

public int getMalesAged16to74InEmploymentWorkingAsElementaryOccupations()
Returns a copy of this.malesAged16to74InEmploymentWorkingAsElementaryOccupations


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