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

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.projects.moses.utilities.AbstractLog
      extended by uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataHandler
          extended by uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractCASDataHandler
              extended by uk.ac.leeds.ccg.andyt.projects.moses.io.CASDataHandler
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CASDataHandler_2

public class CASDataHandler
extends AbstractCASDataHandler

A class for holding the following collection of AbstractCASDataHandlers so as to access respective AbstractCASDataRecords:

See Also:
CASDataRecord, Serialized Form

Field Summary
protected  CAS002DataHandler _CAS002DataHandler
          CAS002DataHandler
protected  CASKS002DataHandler _CASKS002DataHandler
          CASKS002DataHandler
protected  CASKS008DataHandler _CASKS008DataHandler
          CASKS008DataHandler
protected  CASKS010DataHandler _CASKS010DataHandler
          CASKS010DataHandler
protected  CASKS015DataHandler _CASKS015DataHandler
          CASKS015DataHandler
protected  CASKS017DataHandler _CASKS017DataHandler
          CASKS017DataHandler
protected  CASKS020DataHandler _CASKS020DataHandler
          CASKS020DataHandler
protected  CASKS023DataHandler _CASKS023DataHandler
          CASKS023DataHandler
protected  CASKS09bDataHandler _CASKS09bDataHandler
          CASKS09bDataHandler
protected  CASKS09cDataHandler _CASKS09cDataHandler
          CASKS09cDataHandler
protected  CASKS12bDataHandler _CASKS12bDataHandler
          CASKS12bDataHandler
protected  CASKS12cDataHandler _CASKS12cDataHandler
          CASKS12c
protected  CASKS14bDataHandler _CASKS14bDataHandler
          CASKS14b
protected  CASKS14cDataHandler _CASKS14cDataHandler
          CASKS14c
protected  CASUV003DataHandler _CASUV003DataHandler
          CASUV003
 
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
CASDataHandler()
          Creates a new CASDataHandler
CASDataHandler(java.io.File _Directory)
          Creates a new CASDataHandler
CASDataHandler(java.io.File _Directory, java.lang.String aggregation)
          Creates a new CASDataHandler using Files in _Directory
 
Method Summary
 void aggregateOAToMSOAForLeeds()
          Aggregate From OA To MSOA For Leeds
 void aggregateOAToWardForLeeds()
          Aggregate From OA To Ward For Leeds
 void formatSourceData()
          Load Source Data
 CAS002DataHandler getCAS002DataHandler()
          Returns this._CAS002DataHandler
 CASKS002DataHandler getCASKS002DataHandler()
          Returns this._CASKS002DataHandler
 CASKS008DataHandler getCASKS008DataHandler()
          Returns this._CASKS008DataHandler
 CASKS010DataHandler getCASKS010DataHandler()
          Returns this._CASKS010DataHandler
 CASKS015DataHandler getCASKS015DataHandler()
          Returns this._CASKS015DataHandler
 CASKS017DataHandler getCASKS017DataHandler()
          Returns this._CASKS017DataHandler
 CASKS020DataHandler getCASKS020DataHandler()
          Returns this._CASKS020DataHandler
 CASKS023DataHandler getCASKS023DataHandler()
          Returns this._CASKS023DataHandler
 CASKS09bDataHandler getCASKS09bDataHandler()
          Returns this._CASKS09bDataHandler
 CASKS09cDataHandler getCASKS09cDataHandler()
          Returns this._CASKS09cDataHandler
 CASKS12bDataHandler getCASKS12bDataHandler()
          Returns this._CASKS12bDataHandler
 CASKS12cDataHandler getCASKS12cDataHandler()
          Returns this._CASKS12cDataHandler
 CASKS14bDataHandler getCASKS14bDataHandler()
          Returns this._CASKS14bDataHandler
 CASKS14cDataHandler getCASKS14cDataHandler()
          Returns this._CASKS14cDataHandler
 CASUV003DataHandler getCASUV003DataHandler()
          Returns this._CASUV003DataHandler
 AbstractCASDataRecord getDataRecord(long aRecordID)
           
 long getNDataRecords()
           
protected  void init()
          Initialises all fields.
static void main(java.lang.String[] args)
           
 void run()
          Top level run method
 
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, 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
 

Field Detail

_CAS002DataHandler

protected CAS002DataHandler _CAS002DataHandler
CAS002DataHandler


_CASKS002DataHandler

protected CASKS002DataHandler _CASKS002DataHandler
CASKS002DataHandler


_CASKS008DataHandler

protected CASKS008DataHandler _CASKS008DataHandler
CASKS008DataHandler


_CASKS010DataHandler

protected CASKS010DataHandler _CASKS010DataHandler
CASKS010DataHandler


_CASKS015DataHandler

protected CASKS015DataHandler _CASKS015DataHandler
CASKS015DataHandler


_CASKS017DataHandler

protected CASKS017DataHandler _CASKS017DataHandler
CASKS017DataHandler


_CASKS020DataHandler

protected CASKS020DataHandler _CASKS020DataHandler
CASKS020DataHandler


_CASKS023DataHandler

protected CASKS023DataHandler _CASKS023DataHandler
CASKS023DataHandler


_CASKS09bDataHandler

protected CASKS09bDataHandler _CASKS09bDataHandler
CASKS09bDataHandler


_CASKS09cDataHandler

protected CASKS09cDataHandler _CASKS09cDataHandler
CASKS09cDataHandler


_CASKS12bDataHandler

protected CASKS12bDataHandler _CASKS12bDataHandler
CASKS12bDataHandler


_CASKS12cDataHandler

protected CASKS12cDataHandler _CASKS12cDataHandler
CASKS12c


_CASKS14bDataHandler

protected CASKS14bDataHandler _CASKS14bDataHandler
CASKS14b


_CASKS14cDataHandler

protected CASKS14cDataHandler _CASKS14cDataHandler
CASKS14c


_CASUV003DataHandler

protected CASUV003DataHandler _CASUV003DataHandler
CASUV003

Constructor Detail

CASDataHandler

public CASDataHandler()
               throws java.io.IOException
Creates a new CASDataHandler

Throws:
java.io.IOException

CASDataHandler

public CASDataHandler(java.io.File _Directory)
               throws java.io.IOException
Creates a new CASDataHandler

Throws:
java.io.IOException

CASDataHandler

public CASDataHandler(java.io.File _Directory,
                      java.lang.String aggregation)
Creates a new CASDataHandler using Files in _Directory

Parameters:
_Directory - The _Directory containing Files
aggregation - A String part of the filename indicating the aggregation (e.g. OA, MSOA, WARD, etc... )
Method Detail

init

protected void init()
             throws java.io.IOException
Initialises all fields.

Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Parameters:
args - the command line arguments
Throws:
java.io.IOException

run

public void run()
         throws java.io.IOException
Top level run method

Throws:
java.io.IOException

getCAS002DataHandler

public CAS002DataHandler getCAS002DataHandler()
Returns this._CAS002DataHandler


getCASKS002DataHandler

public CASKS002DataHandler getCASKS002DataHandler()
Returns this._CASKS002DataHandler


getCASKS008DataHandler

public CASKS008DataHandler getCASKS008DataHandler()
Returns this._CASKS008DataHandler


getCASKS010DataHandler

public CASKS010DataHandler getCASKS010DataHandler()
Returns this._CASKS010DataHandler


getCASKS015DataHandler

public CASKS015DataHandler getCASKS015DataHandler()
Returns this._CASKS015DataHandler


getCASKS017DataHandler

public CASKS017DataHandler getCASKS017DataHandler()
Returns this._CASKS017DataHandler


getCASKS020DataHandler

public CASKS020DataHandler getCASKS020DataHandler()
Returns this._CASKS020DataHandler


getCASKS023DataHandler

public CASKS023DataHandler getCASKS023DataHandler()
Returns this._CASKS023DataHandler


getCASKS09bDataHandler

public CASKS09bDataHandler getCASKS09bDataHandler()
Returns this._CASKS09bDataHandler


getCASKS09cDataHandler

public CASKS09cDataHandler getCASKS09cDataHandler()
Returns this._CASKS09cDataHandler


getCASKS12bDataHandler

public CASKS12bDataHandler getCASKS12bDataHandler()
Returns this._CASKS12bDataHandler


getCASKS12cDataHandler

public CASKS12cDataHandler getCASKS12cDataHandler()
Returns this._CASKS12cDataHandler


getCASKS14bDataHandler

public CASKS14bDataHandler getCASKS14bDataHandler()
Returns this._CASKS14bDataHandler


getCASKS14cDataHandler

public CASKS14cDataHandler getCASKS14cDataHandler()
Returns this._CASKS14cDataHandler


getCASUV003DataHandler

public CASUV003DataHandler getCASUV003DataHandler()
Returns this._CASUV003DataHandler


getDataRecord

public AbstractCASDataRecord getDataRecord(long aRecordID)
Specified by:
getDataRecord in class AbstractCASDataHandler
Parameters:
aRecordID - The RecordID of the AbstractCASDataRecord to be returned.
Returns:
An AbstractCASDataRecord for the given RecordID

formatSourceData

public void formatSourceData()
                      throws java.io.IOException
Load Source Data

Throws:
java.io.IOException

aggregateOAToWardForLeeds

public void aggregateOAToWardForLeeds()
                               throws java.io.IOException
Aggregate From OA To Ward For Leeds

Throws:
java.io.IOException

aggregateOAToMSOAForLeeds

public void aggregateOAToMSOAForLeeds()
                               throws java.io.IOException
Aggregate From OA To MSOA For Leeds

Throws:
java.io.IOException

getNDataRecords

public long getNDataRecords()
Overrides:
getNDataRecords in class AbstractDataHandler
Returns:
The number of AbstractDataRecords in this.tRandomAccessFile For full UK file this should be 18435255