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

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

public class CASKS12cDataRecord
extends AbstractCASDataRecord

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

See Also:
Serialized Form

Field Summary
protected  int femalesAged16to74InEmployment
          KS012c0001 = femalesAged16to74InEmployment
protected  int femalesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations
          KS012c0005 = femalesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations
protected  int femalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations
          KS012c0004 =femalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations
protected  int femalesAged16to74InEmploymentWorkingAsElementaryOccupations
          KS012c0010 = femalesAged16to74InEmploymentWorkingAsElementaryOccupations
protected  int femalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials
          KS012c0002 = femalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials
protected  int femalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations
          KS012c0007 = femalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations
protected  int femalesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives
          KS012c0009 = femalesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives
protected  int femalesAged16to74InEmploymentWorkingAsProfessionalOccupations
          KS012c0003 = femalesAged16to74InEmploymentWorkingAsProfessionalOccupations
protected  int femalesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations
          KS012c012c = femalesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations
protected  int femalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations
          KS012c0006 = femalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations
 
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
CASKS12cDataRecord()
          Creates a new CASKS12cRecord
CASKS12cDataRecord(CASKS12cDataRecord cASKS12cRecord)
          Creates a new CASKS12cRecord cloned from cASKS12cRecord
CASKS12cDataRecord(long RecordID, java.lang.String line)
          Creates a new CASKS12cDataRecord
CASKS12cDataRecord(java.io.RandomAccessFile aRandomAccessFile)
          Creates a new CASKS12cRecord
 
Method Summary
protected  void _Init()
          Initialises all fields.
 CASKS12cDataRecord aggregate(CASKS12cDataRecord aCASKS12cDataRecord)
           
 CASKS12cDataRecord aggregate(CASKS12cDataRecord aCASKS12cDataRecord, long newRecordID, char[] newZone_Code)
           
 int getFemalesAged16to74InEmployment()
          Returns a copy of this.femalesAged16to74InEmployment
 int getFemalesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations()
          Returns a copy of this.
 int getFemalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations()
          Returns a copy of this.femalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations
 int getFemalesAged16to74InEmploymentWorkingAsElementaryOccupations()
          Returns a copy of this.femalesAged16to74InEmploymentWorkingAsElementaryOccupations
 int getFemalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials()
          Returns a copy of this.femalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials
 int getFemalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations()
          Returns a copy of this.femalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations
 int getFemalesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives()
          Returns a copy of this.
 int getFemalesAged16to74InEmploymentWorkingAsProfessionalOccupations()
          Returns a copy of this.femalesAged16to74InEmploymentWorkingAsProfessionalOccupations
 int getFemalesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations()
          Returns a copy of this.
 int getFemalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations()
          Returns a copy of this.femalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations
 long getSizeInBytes()
          Returns the size of this CASKS12cRecord in bytes as a long.
protected  void init(CASKS12cDataRecord cASKS12cRecord)
          Initialises all fields from those in cASKS12cRecord.
 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

femalesAged16to74InEmployment

protected int femalesAged16to74InEmployment
KS012c0001 = femalesAged16to74InEmployment


femalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials

protected int femalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials
KS012c0002 = femalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials


femalesAged16to74InEmploymentWorkingAsProfessionalOccupations

protected int femalesAged16to74InEmploymentWorkingAsProfessionalOccupations
KS012c0003 = femalesAged16to74InEmploymentWorkingAsProfessionalOccupations


femalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations

protected int femalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations
KS012c0004 =femalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations


femalesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations

protected int femalesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations
KS012c0005 = femalesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations


femalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations

protected int femalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations
KS012c0006 = femalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations


femalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations

protected int femalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations
KS012c0007 = femalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations


femalesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations

protected int femalesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations
KS012c012c = femalesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations


femalesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives

protected int femalesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives
KS012c0009 = femalesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives


femalesAged16to74InEmploymentWorkingAsElementaryOccupations

protected int femalesAged16to74InEmploymentWorkingAsElementaryOccupations
KS012c0010 = femalesAged16to74InEmploymentWorkingAsElementaryOccupations

Constructor Detail

CASKS12cDataRecord

public CASKS12cDataRecord()
Creates a new CASKS12cRecord


CASKS12cDataRecord

public CASKS12cDataRecord(CASKS12cDataRecord cASKS12cRecord)
Creates a new CASKS12cRecord cloned from cASKS12cRecord

Parameters:
cASKS12cRecord - The CASKS12cRecord from which this is cloned.

CASKS12cDataRecord

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

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

CASKS12cDataRecord

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

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

_Init

protected void _Init()
Initialises all fields.

Overrides:
_Init in class AbstractCASDataRecord

init

protected void init(CASKS12cDataRecord cASKS12cRecord)
Initialises all fields from those in cASKS12cRecord.

Parameters:
cASKS12cRecord - The CASKS12cRecord 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

getFemalesAged16to74InEmployment

public int getFemalesAged16to74InEmployment()
Returns a copy of this.femalesAged16to74InEmployment


getFemalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials

public int getFemalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials()
Returns a copy of this.femalesAged16to74InEmploymentWorkingAsManagersAndSeniorOfficials


getFemalesAged16to74InEmploymentWorkingAsProfessionalOccupations

public int getFemalesAged16to74InEmploymentWorkingAsProfessionalOccupations()
Returns a copy of this.femalesAged16to74InEmploymentWorkingAsProfessionalOccupations


getFemalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations

public int getFemalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations()
Returns a copy of this.femalesAged16to74InEmploymentWorkingAsAssociateProfessionalAndTechnicalOccupations


getFemalesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations

public int getFemalesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations()
Returns a copy of this. femalesAged16to74InEmploymentWorkingAsAdministrativeAndSecretarialOccupations


getFemalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations

public int getFemalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations()
Returns a copy of this.femalesAged16to74InEmploymentWorkingAsSkilledTradesOccupations


getFemalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations

public int getFemalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations()
Returns a copy of this.femalesAged16to74InEmploymentWorkingAsPersonalServiceOccupations


getFemalesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations

public int getFemalesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations()
Returns a copy of this. femalesAged16to74InEmploymentWorkingAsSalesAndCustomerServiceOccupations


getFemalesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives

public int getFemalesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives()
Returns a copy of this. femalesAged16to74InEmploymentWorkingAsProcessPlantAndMachineOperatives


getFemalesAged16to74InEmploymentWorkingAsElementaryOccupations

public int getFemalesAged16to74InEmploymentWorkingAsElementaryOccupations()
Returns a copy of this.femalesAged16to74InEmploymentWorkingAsElementaryOccupations


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