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

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataRecord
      extended by uk.ac.leeds.ccg.andyt.projects.moses.io.HSARDataRecord
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class HSARDataRecord
extends AbstractDataRecord

For representing a Househol SAR DAta Record and providing safe access to the data.

See Also:
Serialized Form

Field Summary
protected  short _ACCTYPE
          Accomodation type
protected  short _AGEH
          Age of respondents grouped
protected  short _BATHWC
          Use of bath/shower/toilet
protected  short _CARSH
          Cars/vans owned or available for use
protected  short _CENHEAT0
          Central heating
protected  short _COBIRT0
          Country of birth
protected  short _DENSITY
          Household density: number of residents per room
protected  short _DISTMOV0
          Distance of move of migrant-banded
protected  short _DISTWRK0
          Distance to work
protected  short _ECONACH
          Economic activity
protected  short _EDISDONO
          Number of times information donated
protected  short _ETHEW
          Ethnic group for England and Wales
protected  short _EVERWORK
          Ever worked
protected  short _FAMNUMB
          Family number
protected  short _FAMTYP
          Family type
protected  short _FRP
          Family Reference Person
protected  short _GENIND
          Generation indicator
protected  short _HEALTH
          General health over last twelve months
protected  short _HEDIND
          Household education indicator (England, Wales and Northern Ireland)
protected  boolean _HEDISDON
          No.
protected  short _HEMPIND
          Household employment indicator (England, Wales and Northern Ireland)
protected  int _HHID
          A household identifier (int should be sufficient!)
protected  short _HHLTHIND
          Household health and disability indicator (England, Wales and Northern Ireland)
protected  short _HHSGIND
          Household housing indicator
protected  short _HMIGIND
          Household migration indicator
protected  short _HNRESIDN
          Number of persons in household?
protected  short _HOURSPW
          Hours worked weekly
protected  boolean _HRP
          Household reference person
protected  short _HRSOCGRD
          Social grade of household reference person
protected  long _ID
          A unique ID (Form of catenation of HHID and PNUM) (long should be fine!)
protected  short _INDSTRY0
          Industry
protected  int _ISCO3
          International standard classification of occupations (3 digit)
protected  short _LASTWORK
          Year last worked
protected  short _LLTI
          Limiting long term illness
protected  short _LOWFLOR0
          Lowest floor level of household living accomodation
protected  short _MARSTAH
          Marital status
protected  short _MIGIND
          Migration indicator
protected  short _NSSEC
          NS-SEC Socio-economic classifications
protected  short _ONCPERIM
          One number census status
protected  short _PNUM
          A person number within the household (up to 11)
protected  short _POPBASE
          Population base limiter
protected  short _PROFQUAL
          Profesional qualification (England and Wales)
protected  short _PROVCARE
          Number of hours care provided per week
protected  short _QUALVEWN
          Level of highest qualifications (aged 16-74) (England, Wales and Northern Ireland)
protected  short _RELGEW
          Religion (England and Wales)
protected  short _RELTOHR
          Relationship to HRP
protected  short _ROOMREQ
          Rooms required
protected  short _ROOMSNMH
          Number of rooms in occupied household space
protected  boolean _SELFCONT
          Accomodation self contained
protected  boolean _SEX
          Sex
protected  int _SOCMIN
          Standard occupational classification 2000-minor
protected  short _STAHUKH
          Households with students away during term time
protected  short _STAPUK
          Student accomodation
protected  boolean _STUDENT
          Schoolchild or student in full-time education
protected  short _SUPERVSR
          Supervisor/foreman
protected  short _TENUREH
          Tenure of accomodation
protected  short _TERMTIME
          Term time address of students or schoolchildren
protected  short _TRANWRK0
          Transport to work, UK (including to study Scotland)
protected  short _WORKFORC
          Size of workforce
protected  short _WRKPLCE0
          Workplace (England, Wales and Scotland)
 
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataRecord
_RecordID
 
Constructor Summary
HSARDataRecord()
          Creates a new HSARRecord
HSARDataRecord(long RecordID, java.util.StringTokenizer aStringTokenizer)
          Creates a new HSARDataRecord
HSARDataRecord(java.io.RandomAccessFile aRandomAccessFile)
          Creates a new HSARRecord
 
Method Summary
protected  void _Init()
          Initialises.
 boolean equals(java.lang.Object object)
          Overrides equals in Object
 short get_ACCTYPE()
          Returns a copy of this._ACCTYPE
 short get_AGEH()
          Returns a copy of this.AGEH
 short get_BATHWC()
          Returns a copy of this.BATHWC
 short get_CARSH()
          Returns a copy of this._CARSH
 short get_CENHEAT0()
          Returns a copy of this._CENHEAT0
 short get_COBIRT0()
          Returns a copy of this._COBIRT0
 short get_DENSITY()
          Returns a copy of this._DENSITY
 short get_DISTMOV0()
          Returns a copy of this._DISTMOV0
 short get_DISTWRK0()
          Returns a copy of this._DISTWRK0
 short get_ECONACH()
          Returns a copy of this._ECONACH
 short get_EDISDONO()
          Returns a copy of this._EDISDONO
 short get_ETHEW()
          Returns a copy of this._ETHEW
 short get_EVERWORK()
          Returns a copy of this._EVERWORK
 short get_FAMNUMB()
          Returns a copy of this._FAMNUMB
 short get_FAMTYP()
          Returns a copy of this._FAMTYP
 short get_FRP()
          Returns a copy of this._FRP
 short get_GENIND()
          Returns a copy of this._GENIND
 short get_HEALTH()
          Returns a copy of this._HEALTH
 short get_HEDIND()
          Returns a copy of this._HEDIND
 boolean get_HEDISDON()
          Returns a copy of this._HEDISDON
 short get_HEMPIND()
          Returns a copy of this._HEMPIND
 int get_HHID()
          Returns a copy of this._HHID
 short get_HHLTHIND()
          Returns a copy of this._HHLTHIND
 short get_HHSGIND()
          Returns a copy of this._HHSGIND
 short get_HMIGIND()
          Returns a copy of this._HMIGIND
 short get_HNRESIDN()
          Returns a copy of this._HNRESIDN
 short get_HOURSPW()
          Returns a copy of this._HOURSPW
 boolean get_HRP()
          Returns a copy of this._HRP
 short get_HRSOCGRD()
          Returns a copy of this._HRSOCGRD
 long get_ID()
          Returns a copy of this._ID
 short get_INDSTRY0()
          Returns a copy of this._INDSTRY0
 int get_ISCO3()
          Returns a copy of this._ISCO3
 short get_LASTWORK()
          Returns a copy of this._LASTWORK
 short get_LLTI()
          Returns a copy of this._LLTI
 short get_LOWFLOR0()
          Returns a copy of this._LOWFLOR0
 short get_MARSTAH()
          Returns a copy of this._MARSTAH
 short get_MIGIND()
          Returns a copy of this._MIGIND
 short get_NSSEC()
          Returns a copy of this._NSSEC
 short get_ONCPERIM()
          Returns a copy of this._ONCPERIM
 short get_PNUM()
          Returns a copy of this._PNUM
 short get_POPBASE()
          Returns a copy of this._POPBASE
 short get_PROFQUAL()
          Returns a copy of this._PROFQUAL
 short get_PROVCARE()
          Returns a copy of this._PROVCARE
 short get_QUALVEWN()
          Returns a copy of this._QUALVEWN
 short get_RELGEW()
          Returns a copy of this._RELGEW
 short get_RELTOHR()
          Returns a copy of this._RELTOHR
 short get_ROOMREQ()
          Returns a copy of this._ROOMREQ
 short get_ROOMSNMH()
          Returns a copy of this._ROOMSNMH
 boolean get_SELFCONT()
          Returns a copy of this._SELFCONT
 boolean get_SEX()
          Returns a copy of this._SEX
 int get_SOCMIN()
          Returns a copy of this._SOCMIN
 short get_STAHUKH()
          Returns a copy of this._STAHUKH
 short get_STAPUK()
          Returns a copy of this._STAPUK
 boolean get_STUDENT()
          Returns a copy of this._STUDENT
 short get_SUPERVSR()
          Returns a copy of this._SUPERVSR
 short get_TENUREH()
          Returns a copy of this._TENUREH
 short get_TERMTIME()
          Returns a copy of this._TERMTIME
 short get_TRANWRK0()
          Returns a copy of this._TRANWRK0
 short get_WORKFORC()
          Returns a copy of this.WORKFORC
 short get_WRKPLCE0()
          Returns a copy of this._WRKPLCE0
 int getAgeInt()
          AGE0 is banded as follows: For ( 0 <= AGE0 <= 15 ) or ( 75 <= AGE0 <= 94 ) AGE0 represent household years of age.
 long getSizeInBytes()
          Returns the size of record in bytes as a long
 int hashCode()
           
 boolean parse(long _RecordID, java.lang.String line)
          Modifies HSARDataRecord by parsing line.
 java.lang.String toString()
          Returns a string description of this;
 void write(java.io.RandomAccessFile aRandomAccessFile)
          Writes this to aRandomAccessFile at the current position.
 
Methods inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataRecord
_Init, compareTo, get_RecordID, getNumberOfBitsInByte, toCSVString, toCSVStringFields
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_HHID

protected int _HHID
A household identifier (int should be sufficient!)


_PNUM

protected short _PNUM
A person number within the household (up to 11)


_ID

protected long _ID
A unique ID (Form of catenation of HHID and PNUM) (long should be fine!)


_ACCTYPE

protected short _ACCTYPE
Accomodation type


_AGEH

protected short _AGEH
Age of respondents grouped


_BATHWC

protected short _BATHWC
Use of bath/shower/toilet


_CARSH

protected short _CARSH
Cars/vans owned or available for use


_CENHEAT0

protected short _CENHEAT0
Central heating


_COBIRT0

protected short _COBIRT0
Country of birth


_DENSITY

protected short _DENSITY
Household density: number of residents per room


_DISTMOV0

protected short _DISTMOV0
Distance of move of migrant-banded


_DISTWRK0

protected short _DISTWRK0
Distance to work


_ECONACH

protected short _ECONACH
Economic activity


_EDISDONO

protected short _EDISDONO
Number of times information donated


_ETHEW

protected short _ETHEW
Ethnic group for England and Wales


_EVERWORK

protected short _EVERWORK
Ever worked


_FAMNUMB

protected short _FAMNUMB
Family number


_FAMTYP

protected short _FAMTYP
Family type


_FRP

protected short _FRP
Family Reference Person


_GENIND

protected short _GENIND
Generation indicator


_HEALTH

protected short _HEALTH
General health over last twelve months


_HEDIND

protected short _HEDIND
Household education indicator (England, Wales and Northern Ireland)


_HEDISDON

protected boolean _HEDISDON
No. of hhd donations to edit imputation system


_HEMPIND

protected short _HEMPIND
Household employment indicator (England, Wales and Northern Ireland)


_HHLTHIND

protected short _HHLTHIND
Household health and disability indicator (England, Wales and Northern Ireland)


_HHSGIND

protected short _HHSGIND
Household housing indicator


_HMIGIND

protected short _HMIGIND
Household migration indicator


_HNRESIDN

protected short _HNRESIDN
Number of persons in household?


_HOURSPW

protected short _HOURSPW
Hours worked weekly


_HRP

protected boolean _HRP
Household reference person


_HRSOCGRD

protected short _HRSOCGRD
Social grade of household reference person


_INDSTRY0

protected short _INDSTRY0
Industry


_ISCO3

protected int _ISCO3
International standard classification of occupations (3 digit)


_LASTWORK

protected short _LASTWORK
Year last worked


_LLTI

protected short _LLTI
Limiting long term illness


_LOWFLOR0

protected short _LOWFLOR0
Lowest floor level of household living accomodation


_MARSTAH

protected short _MARSTAH
Marital status


_MIGIND

protected short _MIGIND
Migration indicator


_NSSEC

protected short _NSSEC
NS-SEC Socio-economic classifications


_ONCPERIM

protected short _ONCPERIM
One number census status


_POPBASE

protected short _POPBASE
Population base limiter


_PROFQUAL

protected short _PROFQUAL
Profesional qualification (England and Wales)


_PROVCARE

protected short _PROVCARE
Number of hours care provided per week


_QUALVEWN

protected short _QUALVEWN
Level of highest qualifications (aged 16-74) (England, Wales and Northern Ireland)


_RELGEW

protected short _RELGEW
Religion (England and Wales)


_RELTOHR

protected short _RELTOHR
Relationship to HRP


_ROOMREQ

protected short _ROOMREQ
Rooms required


_ROOMSNMH

protected short _ROOMSNMH
Number of rooms in occupied household space


_SELFCONT

protected boolean _SELFCONT
Accomodation self contained


_SEX

protected boolean _SEX
Sex


_SOCMIN

protected int _SOCMIN
Standard occupational classification 2000-minor


_STAHUKH

protected short _STAHUKH
Households with students away during term time


_STAPUK

protected short _STAPUK
Student accomodation


_STUDENT

protected boolean _STUDENT
Schoolchild or student in full-time education


_SUPERVSR

protected short _SUPERVSR
Supervisor/foreman


_TENUREH

protected short _TENUREH
Tenure of accomodation


_TERMTIME

protected short _TERMTIME
Term time address of students or schoolchildren


_TRANWRK0

protected short _TRANWRK0
Transport to work, UK (including to study Scotland)


_WORKFORC

protected short _WORKFORC
Size of workforce


_WRKPLCE0

protected short _WRKPLCE0
Workplace (England, Wales and Scotland)

Constructor Detail

HSARDataRecord

public HSARDataRecord()
Creates a new HSARRecord


HSARDataRecord

public HSARDataRecord(long RecordID,
                      java.util.StringTokenizer aStringTokenizer)
               throws java.io.IOException
Creates a new HSARDataRecord

Parameters:
RecordID -
aStringTokenizer -
Throws:
java.io.IOException

HSARDataRecord

public HSARDataRecord(java.io.RandomAccessFile aRandomAccessFile)
Creates a new HSARRecord

Method Detail

parse

public boolean parse(long _RecordID,
                     java.lang.String line)
              throws java.io.IOException
Modifies HSARDataRecord by parsing line. Returns true if this line parses into a valid HSARDataRecord. This is only the case if the following can be determined: _AGEH; _SEX; _HRP.

Parameters:
_RecordID - The _RecordID that will be assigned.
line - The Comma Seperated Value String.
Throws:
java.io.IOException

_Init

protected void _Init()
Initialises.

Overrides:
_Init in class AbstractDataRecord

toString

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

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

get_ID

public long get_ID()
Returns a copy of this._ID


get_HHID

public int get_HHID()
Returns a copy of this._HHID


get_ISCO3

public int get_ISCO3()
Returns a copy of this._ISCO3


get_SOCMIN

public int get_SOCMIN()
Returns a copy of this._SOCMIN


get_HEDISDON

public boolean get_HEDISDON()
Returns a copy of this._HEDISDON


get_HEMPIND

public short get_HEMPIND()
Returns a copy of this._HEMPIND


get_HRP

public boolean get_HRP()
Returns a copy of this._HRP


get_SELFCONT

public boolean get_SELFCONT()
Returns a copy of this._SELFCONT


get_SEX

public boolean get_SEX()
Returns a copy of this._SEX


get_STUDENT

public boolean get_STUDENT()
Returns a copy of this._STUDENT


get_ACCTYPE

public short get_ACCTYPE()
Returns a copy of this._ACCTYPE


get_AGEH

public short get_AGEH()
Returns a copy of this.AGEH


get_BATHWC

public short get_BATHWC()
Returns a copy of this.BATHWC


get_CARSH

public short get_CARSH()
Returns a copy of this._CARSH


get_CENHEAT0

public short get_CENHEAT0()
Returns a copy of this._CENHEAT0


get_COBIRT0

public short get_COBIRT0()
Returns a copy of this._COBIRT0


get_DENSITY

public short get_DENSITY()
Returns a copy of this._DENSITY


get_DISTMOV0

public short get_DISTMOV0()
Returns a copy of this._DISTMOV0


get_DISTWRK0

public short get_DISTWRK0()
Returns a copy of this._DISTWRK0


get_ECONACH

public short get_ECONACH()
Returns a copy of this._ECONACH


get_EDISDONO

public short get_EDISDONO()
Returns a copy of this._EDISDONO


get_ETHEW

public short get_ETHEW()
Returns a copy of this._ETHEW


get_EVERWORK

public short get_EVERWORK()
Returns a copy of this._EVERWORK


get_FAMNUMB

public short get_FAMNUMB()
Returns a copy of this._FAMNUMB


get_FAMTYP

public short get_FAMTYP()
Returns a copy of this._FAMTYP


get_FRP

public short get_FRP()
Returns a copy of this._FRP


get_GENIND

public short get_GENIND()
Returns a copy of this._GENIND


get_HEALTH

public short get_HEALTH()
Returns a copy of this._HEALTH


get_HEDIND

public short get_HEDIND()
Returns a copy of this._HEDIND


get_HHLTHIND

public short get_HHLTHIND()
Returns a copy of this._HHLTHIND


get_HHSGIND

public short get_HHSGIND()
Returns a copy of this._HHSGIND


get_HMIGIND

public short get_HMIGIND()
Returns a copy of this._HMIGIND


get_HNRESIDN

public short get_HNRESIDN()
Returns a copy of this._HNRESIDN


get_HOURSPW

public short get_HOURSPW()
Returns a copy of this._HOURSPW


get_HRSOCGRD

public short get_HRSOCGRD()
Returns a copy of this._HRSOCGRD


get_INDSTRY0

public short get_INDSTRY0()
Returns a copy of this._INDSTRY0


get_LASTWORK

public short get_LASTWORK()
Returns a copy of this._LASTWORK


get_LLTI

public short get_LLTI()
Returns a copy of this._LLTI


get_LOWFLOR0

public short get_LOWFLOR0()
Returns a copy of this._LOWFLOR0


get_MARSTAH

public short get_MARSTAH()
Returns a copy of this._MARSTAH


get_MIGIND

public short get_MIGIND()
Returns a copy of this._MIGIND


get_NSSEC

public short get_NSSEC()
Returns a copy of this._NSSEC


get_ONCPERIM

public short get_ONCPERIM()
Returns a copy of this._ONCPERIM


get_PNUM

public short get_PNUM()
Returns a copy of this._PNUM


get_POPBASE

public short get_POPBASE()
Returns a copy of this._POPBASE


get_PROFQUAL

public short get_PROFQUAL()
Returns a copy of this._PROFQUAL


get_PROVCARE

public short get_PROVCARE()
Returns a copy of this._PROVCARE


get_QUALVEWN

public short get_QUALVEWN()
Returns a copy of this._QUALVEWN


get_RELGEW

public short get_RELGEW()
Returns a copy of this._RELGEW


get_RELTOHR

public short get_RELTOHR()
Returns a copy of this._RELTOHR


get_ROOMREQ

public short get_ROOMREQ()
Returns a copy of this._ROOMREQ


get_ROOMSNMH

public short get_ROOMSNMH()
Returns a copy of this._ROOMSNMH


get_STAPUK

public short get_STAPUK()
Returns a copy of this._STAPUK


get_STAHUKH

public short get_STAHUKH()
Returns a copy of this._STAHUKH


get_SUPERVSR

public short get_SUPERVSR()
Returns a copy of this._SUPERVSR


get_TENUREH

public short get_TENUREH()
Returns a copy of this._TENUREH


get_TERMTIME

public short get_TERMTIME()
Returns a copy of this._TERMTIME


get_TRANWRK0

public short get_TRANWRK0()
Returns a copy of this._TRANWRK0


get_WORKFORC

public short get_WORKFORC()
Returns a copy of this.WORKFORC


get_WRKPLCE0

public short get_WRKPLCE0()
Returns a copy of this._WRKPLCE0


getAgeInt

public int getAgeInt()
AGE0 is banded as follows: For ( 0 <= AGE0 <= 15 ) or ( 75 <= AGE0 <= 94 ) AGE0 represent household years of age. For AGE0 = 16, ( 16 <= age <= 20 ). Age range = 4. For AGE0 = 20, ( 20 <= age <= 24 ). Age range = 4. For AGE0 = 25, ( 25 <= age <= 29 ). Age range = 4. For AGE0 = 30, ( 30 <= age <= 44 ). Age range = 14. For AGE0 = 45, ( 45 <= age <= 59 ). Age range = 14. For AGE0 = 60, ( 60 <= age <= 64 ). Age range = 4. For AGE0 = 65, ( 65 <= age <= 69 ). Age range = 4. For AGE0 = 70, ( 70 <= age <= 74 ). Age range = 4. For AGE0 = 95, ( 95 <= age ). For any banded age a random number between 0 and Age range is obtained and added to AGE0. It is assumed that the for the open ended age the Age range is 4, i.e. people are less than 100 years old!


write

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

Overrides:
write in class AbstractDataRecord
Parameters:
aRandomAccessFile - The RandomAccessFile this is written to.

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractDataRecord

equals

public boolean equals(java.lang.Object object)
Overrides equals in Object

Overrides:
equals in class AbstractDataRecord
See Also:
Object.equals(Object)

getSizeInBytes

public long getSizeInBytes()
Returns the size of record in bytes as a long

Overrides:
getSizeInBytes in class AbstractDataRecord
Returns:
The size (in bytes) of this as a long.