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

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

public class ToyModelHSARDataHandler
extends AbstractCASDataHandler

A specialist handler for accessing CASKS002Records and information about the collection.

See Also:
Serialized Form

Field Summary
 java.util.HashMap _ZoneCodeToRecordIDStartEndLookup
          A reference to a FileOutputStream for writing data
 
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
ToyModelHSARDataHandler()
          Creates a new instance of ToyModelDataHandler
ToyModelHSARDataHandler(java.io.File _File)
          Creates a new ToyModelDataHandler for Records loaded from _File.
 
Method Summary
 void format(java.io.File a_ToyModelHSARDataRecordASCIIFile)
          Formats input.
 void format(java.lang.String directory)
          Highest level controller for processing runs
 AbstractCASDataRecord getDataRecord(long RecordID)
           
protected  ToyModelHSARDataRecord getToyModelHSARDataRecord(long RecordID)
           
 ToyModelHSARDataRecord[] getToyModelHSARDataRecords(java.lang.String zoneCode)
          This is a convenience method for accessing all the records for a given zoneCode
static void main(java.lang.String[] args)
           
protected  int parseInt(java.lang.String string)
           
 
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

_ZoneCodeToRecordIDStartEndLookup

public java.util.HashMap _ZoneCodeToRecordIDStartEndLookup
A reference to a FileOutputStream for writing data

Constructor Detail

ToyModelHSARDataHandler

public ToyModelHSARDataHandler()
Creates a new instance of ToyModelDataHandler


ToyModelHSARDataHandler

public ToyModelHSARDataHandler(java.io.File _File)
                        throws java.io.IOException
Creates a new ToyModelDataHandler for Records loaded from _File.

Parameters:
_File - Formatted File of ToyModelDataRecords
Throws:
java.io.IOException
Method Detail

main

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

format

public void format(java.lang.String directory)
            throws java.io.IOException
Highest level controller for processing runs

Throws:
java.io.IOException

format

public void format(java.io.File a_ToyModelHSARDataRecordASCIIFile)
            throws java.io.IOException
Formats input.

Parameters:
a_ToyModelHSARDataRecordASCIIFile - File to format.
Throws:
java.io.IOException

getDataRecord

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

parseInt

protected int parseInt(java.lang.String string)

getToyModelHSARDataRecord

protected ToyModelHSARDataRecord getToyModelHSARDataRecord(long RecordID)
Parameters:
RecordID - The RecordID of the ToyModelDataRecord to be returned.

getToyModelHSARDataRecords

public ToyModelHSARDataRecord[] getToyModelHSARDataRecords(java.lang.String zoneCode)
                                                    throws java.io.IOException
This is a convenience method for accessing all the records for a given zoneCode

Throws:
java.io.IOException