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

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

public class MarkOutputDataHandler_1
extends AbstractCASDataHandler

A class for handling output data wanted by Mark Birkin.

See Also:
Serialized Form

Field Summary
protected  java.io.FileOutputStream fileOutputStream
          A FileOutputStream for File.
protected  java.io.File outputFile
          A File for writing output to.
protected  ToyModelDataHandler toyModelDataHandler
          A Toy Model data handler.
 
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
MarkOutputDataHandler_1()
          Creates a new instance of MarkOutputDataHandler_1
 
Method Summary
 void aggregateAndWriteMSOA()
          Aggregates estimates to MSOA MSOAs do not appear in any particular order, so this is non-trivial.
 void aggregateAndWriteOA()
          Aggregates estimates to OA MSOAs do not appear in any particular order, so this is non-trivial.
 void aggregateAndWriteWards()
          Aggregates estimates to wards
 AbstractCASDataRecord getDataRecord(long RecordID)
           
 void initMSOA()
          Initialises.
 void initOA()
          Initialises.
 void initWard()
          Initialises.
static void main(java.lang.String[] args)
           
 void runMSOA()
          TODO docs
 void runOA()
          TODO docs
 void runWard()
          TODO docs
 void write(MarkOutputDataRecord_1 markOutput1DataRecord)
          Writes out MarkOutputDataRecord_1.
 void write(MarkOutputDataRecord_1 markOutput1DataRecord, java.lang.String zoneCode)
          Writes out MarkOutputDataRecord_1 but with zoneCode as Zone_Code
 void write1(java.util.HashMap aggregateHashMap)
          TODO docs
 void write2(java.util.HashMap aggregateHashMap)
          TODO docs
 void writeHeader()
          Writes out header.
 
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
 

Field Detail

outputFile

protected java.io.File outputFile
A File for writing output to.


fileOutputStream

protected java.io.FileOutputStream fileOutputStream
A FileOutputStream for File.


toyModelDataHandler

protected ToyModelDataHandler toyModelDataHandler
A Toy Model data handler.

Constructor Detail

MarkOutputDataHandler_1

public MarkOutputDataHandler_1()
Creates a new instance of MarkOutputDataHandler_1

Method Detail

main

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

runWard

public void runWard()
             throws java.io.IOException
TODO docs

Throws:
java.io.IOException

runMSOA

public void runMSOA()
             throws java.io.IOException
TODO docs

Throws:
java.io.IOException

runOA

public void runOA()
           throws java.io.IOException
TODO docs

Throws:
java.io.IOException

initOA

public void initOA()
            throws java.io.IOException
Initialises.

Throws:
java.io.IOException

initMSOA

public void initMSOA()
              throws java.io.IOException
Initialises.

Throws:
java.io.IOException

initWard

public void initWard()
              throws java.io.IOException
Initialises.

Throws:
java.io.IOException

writeHeader

public void writeHeader()
Writes out header.


write

public void write(MarkOutputDataRecord_1 markOutput1DataRecord)
Writes out MarkOutputDataRecord_1.


write

public void write(MarkOutputDataRecord_1 markOutput1DataRecord,
                  java.lang.String zoneCode)
Writes out MarkOutputDataRecord_1 but with zoneCode as Zone_Code


aggregateAndWriteWards

public void aggregateAndWriteWards()
                            throws java.io.IOException
Aggregates estimates to wards

Throws:
java.io.IOException

aggregateAndWriteMSOA

public void aggregateAndWriteMSOA()
                           throws java.io.IOException
Aggregates estimates to MSOA MSOAs do not appear in any particular order, so this is non-trivial.

Throws:
java.io.IOException

aggregateAndWriteOA

public void aggregateAndWriteOA()
                         throws java.io.IOException
Aggregates estimates to OA MSOAs do not appear in any particular order, so this is non-trivial.

Throws:
java.io.IOException

write1

public void write1(java.util.HashMap aggregateHashMap)
TODO docs


write2

public void write2(java.util.HashMap aggregateHashMap)
TODO docs


getDataRecord

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