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

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
                  extended by uk.ac.leeds.ccg.andyt.projects.moses.io.CASDataHandler_2
All Implemented Interfaces:
java.io.Serializable

public class CASDataHandler_2
extends CASDataHandler

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

See Also:
CASDataRecord, Serialized Form

Field Summary
protected  CASKS006DataHandler _CASKS006DataHandler
          CASKS006DataHandler
 
Fields inherited from class uk.ac.leeds.ccg.andyt.projects.moses.io.CASDataHandler
_CAS002DataHandler, _CASKS002DataHandler, _CASKS008DataHandler, _CASKS010DataHandler, _CASKS015DataHandler, _CASKS017DataHandler, _CASKS020DataHandler, _CASKS023DataHandler, _CASKS09bDataHandler, _CASKS09cDataHandler, _CASKS12bDataHandler, _CASKS12cDataHandler, _CASKS14bDataHandler, _CASKS14cDataHandler, _CASUV003DataHandler
 
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_2()
          Creates a new CASDataHandler
CASDataHandler_2(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
 CASKS006DataHandler getCASKS006DataHandler()
          Returns this._CASKS006DataHandler
 AbstractCASDataRecord getDataRecord(long aRecordID)
           
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.CASDataHandler
getCAS002DataHandler, getCASKS002DataHandler, getCASKS008DataHandler, getCASKS010DataHandler, getCASKS015DataHandler, getCASKS017DataHandler, getCASKS020DataHandler, getCASKS023DataHandler, getCASKS09bDataHandler, getCASKS09cDataHandler, getCASKS12bDataHandler, getCASKS12cDataHandler, getCASKS14bDataHandler, getCASKS14cDataHandler, getCASUV003DataHandler, getNDataRecords
 
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

_CASKS006DataHandler

protected CASKS006DataHandler _CASKS006DataHandler
CASKS006DataHandler

Constructor Detail

CASDataHandler_2

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

Throws:
java.io.IOException

CASDataHandler_2

public CASDataHandler_2(java.io.File directory,
                        java.lang.String aggregation)
                 throws java.io.IOException
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... )
Throws:
java.io.IOException
Method Detail

init

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

Overrides:
init in class CASDataHandler
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

Overrides:
run in class CASDataHandler
Throws:
java.io.IOException

getCASKS006DataHandler

public CASKS006DataHandler getCASKS006DataHandler()
Returns this._CASKS006DataHandler


getDataRecord

public AbstractCASDataRecord getDataRecord(long aRecordID)
Overrides:
getDataRecord in class CASDataHandler
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

Overrides:
formatSourceData in class CASDataHandler
Throws:
java.io.IOException

aggregateOAToWardForLeeds

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

Overrides:
aggregateOAToWardForLeeds in class CASDataHandler
Throws:
java.io.IOException

aggregateOAToMSOAForLeeds

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

Overrides:
aggregateOAToMSOAForLeeds in class CASDataHandler
Throws:
java.io.IOException