uk.ac.leeds.ccg.andyt.projects.moses.io
Class CAS003DataHandler
java.lang.Object
uk.ac.leeds.ccg.andyt.projects.moses.utilities.AbstractLog
uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataHandler
uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractCASDataHandler
uk.ac.leeds.ccg.andyt.projects.moses.io.CAS003DataHandler
- All Implemented Interfaces:
- java.io.Serializable
public class CAS003DataHandler
- extends AbstractCASDataHandler
Class for handling an individual CAS003DataRecords.
- See Also:
- Serialized Form
Constructor Summary |
CAS003DataHandler()
Creates a new instance of CAS003DataHandler loading a default file. |
CAS003DataHandler(java.io.File aFile)
Creates a new instance of CAS003DataHandler with Records loaded from
aFile. |
Method Summary |
void |
aggregateOAToMSOA(java.io.RandomAccessFile aRandomAccessFile,
long startRecordID,
long endRecordID)
Aggregates CAS003DataRecords from OA To MSOA for the OA
records in the range [startRecordID,endRecordID] and writes the results
to aRandomAccessFile |
void |
aggregateOAToWard(java.io.RandomAccessFile aRandomAccessFile,
long startRecordID,
long endRecordID)
Aggregates CAS003DataRecords from OA To Ward for the OA
records in the range [startRecordID,endRecordID] and writes the results
to aRandomAccessFile |
protected long |
format(java.io.File sourceFile,
long RecordID)
|
protected long |
format(java.io.File sourceFile,
long RecordID,
boolean Northern_Ireland)
|
protected void |
formatSourceData(java.io.File directory,
int n)
|
java.util.HashMap |
getCAS003AgeSex1_AgeSexType_Count_HashMap(CAS003DataRecord tCAS003DataRecord,
ISARDataHandler tISARDataHandler)
|
CAS003DataRecord |
getCAS003DataRecord(long RecordID)
|
java.util.HashMap |
getCAS003HPHRPAgeFemaleCount_HashMap(CAS003DataRecord tCAS003DataRecord)
|
java.util.HashMap |
getCAS003HPHRPAgeMaleCount_HashMap(CAS003DataRecord tCAS003DataRecord)
|
AbstractCASDataRecord |
getDataRecord(long RecordID)
|
Methods inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractCASDataHandler |
get_LookUpMSOAfromOAHashMap, getCAS001DataHandler, getCAS003DataHandler, getDataRecord, getDataRecord, getLADCodes_TreeSet, getMSOACodes_HashSet, getMSOACodes_HashSet, getOACodes_HashSet, getOACodes_HashSet, getOACodes_TreeSet, getRecordIDZoneCode_HashMap, getRecordIDZoneCodeHashMap, getZoneCodeRecordID_HashMap, parseLine, printOAMSOACodes, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CAS003DataHandler
public CAS003DataHandler()
- Creates a new instance of CAS003DataHandler loading a default file.
CAS003DataHandler
public CAS003DataHandler(java.io.File aFile)
- Creates a new instance of CAS003DataHandler with Records loaded from
aFile.
- Parameters:
aFile
- Formatted file of CAS003DataRecords.
formatSourceData
protected void formatSourceData(java.io.File directory,
int n)
throws java.io.IOException
- Throws:
java.io.IOException
format
protected long format(java.io.File sourceFile,
long RecordID)
throws java.io.IOException
- Throws:
java.io.IOException
format
protected long format(java.io.File sourceFile,
long RecordID,
boolean Northern_Ireland)
getDataRecord
public AbstractCASDataRecord getDataRecord(long RecordID)
- Specified by:
getDataRecord
in class AbstractCASDataHandler
- Parameters:
RecordID
- The RecordID of the CAS003DataRecord to be returned.
- Returns:
- a
CAS003DataRecord
with
AbstractCASDataRecord.RecordID = RecordID
getCAS003DataRecord
public CAS003DataRecord getCAS003DataRecord(long RecordID)
- Parameters:
RecordID
- The RecordID of the CAS003DataRecord to be returned.
- Returns:
- a
CAS003DataRecord
with
CAS003DataRecord.RecordID = RecordID
aggregateOAToWard
public void aggregateOAToWard(java.io.RandomAccessFile aRandomAccessFile,
long startRecordID,
long endRecordID)
- Aggregates
CAS003DataRecords
from OA To Ward for the OA
records in the range [startRecordID,endRecordID] and writes the results
to aRandomAccessFile
- Parameters:
aRandomAccessFile
- RandomAccessFile
to which results are writtenstartRecordID
- The first OA RecordID in the sequence to be aggregated.endRecordID
- The last OA RecordID in the sequence to be aggregated.
aggregateOAToMSOA
public void aggregateOAToMSOA(java.io.RandomAccessFile aRandomAccessFile,
long startRecordID,
long endRecordID)
throws java.io.IOException
- Aggregates
CAS003DataRecords
from OA To MSOA for the OA
records in the range [startRecordID,endRecordID] and writes the results
to aRandomAccessFile
- Parameters:
aRandomAccessFile
- RandomAccessFile
to which results are writtenstartRecordID
- The first OA RecordID in the sequence to be aggregated.endRecordID
- The last OA RecordID in the sequence to be aggregated.
- Throws:
java.io.IOException
getCAS003AgeSex1_AgeSexType_Count_HashMap
public java.util.HashMap getCAS003AgeSex1_AgeSexType_Count_HashMap(CAS003DataRecord tCAS003DataRecord,
ISARDataHandler tISARDataHandler)
- Returns:
- HashMap with keys as AgeSexType and values as Integer.
These are counts for male and female household reference persons of
the following ages:
0,20,30,60
getCAS003HPHRPAgeFemaleCount_HashMap
public java.util.HashMap getCAS003HPHRPAgeFemaleCount_HashMap(CAS003DataRecord tCAS003DataRecord)
- Returns:
- HashMap with keys as Integer for age and values as Integer for
counts of these ages of female household reference persons for the
following ages:
0,20,30,60
getCAS003HPHRPAgeMaleCount_HashMap
public java.util.HashMap getCAS003HPHRPAgeMaleCount_HashMap(CAS003DataRecord tCAS003DataRecord)
- Returns:
- HashMap with keys as Integer for age and values as Integer for
counts of these ages of male household reference persons for the
following ages:
0,20,30,60