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

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_GA_IPS
All Implemented Interfaces:
java.io.Serializable

public class CASDataHandler_GA_IPS
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  CAS044DataHandler _CAS044DataHandler
          CAS044DataHandler
protected  CASKS006DataHandler _CASKS006DataHandler
          CASKS006DataHandler
protected  CASKS008DataHandler _CASKS008DataHandler
          CASKS008DataHandler
 
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_GA_IPS()
          Creates a new CASDataHandler_GA_IPS
CASDataHandler_GA_IPS(java.io.File directory, java.lang.String aggregation)
          Creates a new CASDataHandler_GA_IPS using Files in directory
 
Method Summary
 void aggregateOAToMSOAForLeeds()
          Aggregate From OA To MSOA For Leeds
 void aggregateOAToWardForLeeds()
          Aggregate From OA To Ward For Leeds
 CAS044DataHandler getCAS044DataHandler()
          Returns this._CAS044DataHandler
 CASKS006DataHandler getCASKS006DataHandler()
          Returns this._CASKS006DataHandler
 CASKS008DataHandler getCASKS008DataHandler()
          Returns this._CASKS008DataHandler
 AbstractCASDataRecord getDataRecord(long aRecordID)
           
 long getNDataRecords()
           
protected  void init()
          Initialises all fields.
 void loadSourceData()
          Load Source Data
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

_CAS044DataHandler

protected CAS044DataHandler _CAS044DataHandler
CAS044DataHandler


_CASKS006DataHandler

protected CASKS006DataHandler _CASKS006DataHandler
CASKS006DataHandler


_CASKS008DataHandler

protected CASKS008DataHandler _CASKS008DataHandler
CASKS008DataHandler

Constructor Detail

CASDataHandler_GA_IPS

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

Throws:
java.io.IOException

CASDataHandler_GA_IPS

public CASDataHandler_GA_IPS(java.io.File directory,
                             java.lang.String aggregation)
                      throws java.io.IOException
Creates a new CASDataHandler_GA_IPS 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... )
Throws:
java.io.IOException
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

getCAS044DataHandler

public CAS044DataHandler getCAS044DataHandler()
Returns this._CAS044DataHandler


getCASKS006DataHandler

public CASKS006DataHandler getCASKS006DataHandler()
Returns this._CASKS006DataHandler


getCASKS008DataHandler

public CASKS008DataHandler getCASKS008DataHandler()
Returns this._CASKS008DataHandler


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

loadSourceData

public void loadSourceData()
                    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