|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.CAS002DataHandler
public class CAS002DataHandler
Class for handling an individual CAS001DataRecords.
Field Summary |
---|
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractCASDataHandler |
---|
_CAS001DataHandler, _CAS003DataHandler, _LookUpMSOAfromOAHashMap, _RecordIDZoneCodeHashMap |
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataHandler |
---|
_Directory, _File, _RandomAccessFile, _RecordLength |
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.moses.utilities.AbstractLog |
---|
_Logger, _Logger_FileHandler |
Constructor Summary | |
---|---|
CAS002DataHandler()
Creates a new instance of CAS002DataHandler loading a default file. |
|
CAS002DataHandler(java.io.File aFile)
Creates a new instance of CAS002DataHandler with Records loaded from aFile. |
Method Summary | |
---|---|
void |
aggregateOAToMSOA(java.io.RandomAccessFile aRandomAccessFile,
long startRecordID,
long endRecordID)
Aggregates CAS002DataRecords 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 CAS002DataRecords from OA To Ward for the OA
records in the range [startRecordID,endRecordID] and writes the results
to aRandomAccessFile |
void |
aggregateOAToWardForLeeds()
Aggregate From OA To Ward For Leeds |
protected long |
format(java.io.File sourceFile,
long RecordID)
Uses a BufferedReader |
protected void |
formatSourceData(java.io.File directory,
int n)
Loads CAS002DataRecords and prints out n randomly |
CAS002DataRecord |
getCAS002DataRecord(long RecordID)
|
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 uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataHandler |
---|
get_Directory, get_RecordLength, getNDataRecords, init, init, load, print |
Methods inherited from class uk.ac.leeds.ccg.andyt.projects.moses.utilities.AbstractLog |
---|
init_Logger, init_Logger, init_Logger, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CAS002DataHandler()
public CAS002DataHandler(java.io.File aFile)
aFile
- Formatted file of CAS002DataRecords.Method Detail |
---|
protected void formatSourceData(java.io.File directory, int n) throws java.io.IOException
CAS002DataRecords
and prints out n randomly
directory
- to load source data fromn
- the number of loaded data records to print out.
java.io.IOException
public void aggregateOAToWardForLeeds() throws java.io.IOException
java.io.IOException
protected long format(java.io.File sourceFile, long RecordID) throws java.io.IOException
BufferedReader and a StreamTokenizer
to
read lines from the sourceFile File
. The lines are converted
to CAS002DataRecords
and written to
this.tRandomAccessFile
.
- Parameters:
sourceFile
- The source CAS002DataRecords file to be formatted and written
to this.tRandomAccessFile
.RecordID
- The RecordID
to assign to the first
CAS002DataRecord
.
- Returns:
- The
RecordID
assigned to the last
CAS002DataRecords
.
- Throws:
java.io.IOException
public AbstractCASDataRecord getDataRecord(long RecordID)
getDataRecord
in class AbstractCASDataHandler
RecordID
- The RecordID of the CAS002DataRecord to be returned.
CAS002DataRecord
with
AbstractCASDataRecord.RecordID = RecordID
public CAS002DataRecord getCAS002DataRecord(long RecordID)
RecordID
- The RecordID of the CAS002DataRecord to be returned.
CAS002DataRecord
with
CAS002DataRecord.RecordID = RecordID
public void aggregateOAToWard(java.io.RandomAccessFile aRandomAccessFile, long startRecordID, long endRecordID) throws java.io.IOException
CAS002DataRecords
from OA To Ward for the OA
records in the range [startRecordID,endRecordID] and writes the results
to aRandomAccessFile
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.
java.io.IOException
public void aggregateOAToMSOA(java.io.RandomAccessFile aRandomAccessFile, long startRecordID, long endRecordID) throws java.io.IOException
CAS002DataRecords
from OA To MSOA for the OA
records in the range [startRecordID,endRecordID] and writes the results
to aRandomAccessFile
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.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |