uk.ac.leeds.ccg.andyt.projects.moses.io
Class CASAreaEastingNorthingDataHandler
java.lang.Object
uk.ac.leeds.ccg.andyt.projects.moses.utilities.AbstractLog
uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataHandler
uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractCASDataHandler
uk.ac.leeds.ccg.andyt.projects.moses.io.CASAreaEastingNorthingDataHandler
- All Implemented Interfaces:
- java.io.Serializable
public class CASAreaEastingNorthingDataHandler
- extends AbstractCASDataHandler
A class
for handling an individual
CASAreaEastingNorthingDataRecord
and collections of
CASAreaEastingNorthingDataRecords
.
- See Also:
- Serialized Form
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CASAreaEastingNorthingDataHandler
public CASAreaEastingNorthingDataHandler()
CASAreaEastingNorthingDataHandler
public CASAreaEastingNorthingDataHandler(java.io.File a_File)
- Creates a new instance of CASAreaEastingNorthingDataHandler with Records loaded from
formattedFile.
- Parameters:
formattedFile
- Formatted file of CASAreaEastingNorthingDataRecords
formatSourceData
public void formatSourceData(java.io.File directory,
int n)
- Loads
CAS001DataRecords
and prints out n randomly
- Parameters:
directory
- to load source data fromn
- the number of loaded data records to print out.
format
protected long format(java.io.File sourceFile,
long RecordID)
- Uses a
BufferedReader and a StreamTokenizer
to
read lines from the sourceFile File
. The lines are converted
to CASAreaEastingNorthingDataRecords
and written to
this.tRandomAccessFile
.
- Parameters:
sourceFile
- The source CASAreaEastingNorthingDataRecords file to be formatted and
written to this.tRandomAccessFile
.RecordID
- The RecordID
to assign to the first
CASAreaEastingNorthingDataRecord
.
- Returns:
- The
RecordID
assigned to the last
CASAreaEastingNorthingDataRecords
.
getDataRecord
public AbstractCASDataRecord getDataRecord(long RecordID)
- Specified by:
getDataRecord
in class AbstractCASDataHandler
- Parameters:
RecordID
- The RecordID of the CASAreaEastingNorthingDataRecord to be returned.
- Returns:
- a
CASAreaEastingNorthingDataRecord
with
AbstractCASDataRecord.RecordID = RecordID
getCASAreaEastingNorthingDataRecord
public CASAreaEastingNorthingDataRecord getCASAreaEastingNorthingDataRecord(long RecordID)
- Parameters:
RecordID
- The RecordID of the CASAreaEastingNorthingDataRecord to be returned.
- Returns:
- a
CASAreaEastingNorthingDataRecord
with
CASAreaEastingNorthingDataRecord.RecordID = RecordID
get_CASZoneCode_CASAreaEastingNorthingDataRecord_HashMap
public java.util.HashMap get_CASZoneCode_CASAreaEastingNorthingDataRecord_HashMap(java.lang.String code)