org.opensha.commons.eq.cat.io
Class Reader_SCEDC
java.lang.Object
org.opensha.commons.eq.cat.io.AbstractReader
org.opensha.commons.eq.cat.io.Reader_SCEDC
- All Implemented Interfaces:
- CatalogReader
public class Reader_SCEDC
- extends AbstractReader
Reader class for lines from a Southern California Earthquake Center
Data Center (SCEDC 'Readable Format') catalog. This reader
records the following data for local events:
- CAT_DATA_EVENT_ID
- CAT_DATA_TIME
- CAT_DATA_LONGITUDE
- CAT_DATA_LATITUDE
- CAT_DATA_DEPTH
- CAT_DATA_QUALITY
- CAT_DATA_MAGNITUDE
- CAT_DATA_MAGNITUDE_TYPE
Notes: This reader is currently set to filter out non-local events,
lines shorter than 60 chars, and comment ('#') lines; the magnitude type is
still recorded, even though all events are local.
- Version:
- $Id: Reader_SCEDC.java 7478 2011-02-15 04:56:25Z pmpowers $
- Author:
- Peter Powers
| Fields inherited from class org.opensha.commons.eq.cat.io.AbstractReader |
cal, catalog, dat_dates, dat_depths, dat_eventIDs, dat_eventQuality, dat_eventTypes, dat_fpDips, dat_fpRakes, dat_fpStrikes, dat_latitudes, dat_longitudes, dat_magnitudes, dat_magnitudeTypes, dat_xyErrors, dat_zErrors, size |
|
Constructor Summary |
Reader_SCEDC(int size)
Constructs a new catalog file reader that will use the supplied size
to initialize internal data arrays. |
|
Method Summary |
void |
initReader()
Initialize reader by instantiating necessary arrays. |
void |
loadData()
Populate the internal catalog with data; called once all lines have bneen
parsed/processed. |
void |
parseLine(String line)
Parse a line of text into values for data arrays. |
Reader_SCEDC
public Reader_SCEDC(int size)
- Constructs a new catalog file reader that will use the supplied size
to initialize internal data arrays.
- Parameters:
size - to use when initializing internal data arrays
- Throws:
IllegalArgumentException - if size is less than 1
initReader
public void initReader()
- Description copied from class:
AbstractReader
- Initialize reader by instantiating necessary arrays.
- Specified by:
initReader in class AbstractReader
loadData
public void loadData()
- Description copied from class:
AbstractReader
- Populate the internal catalog with data; called once all lines have bneen
parsed/processed. Implementations may throw an
IllegalArgumentException if problems occur while loading
data arrays.
- Specified by:
loadData in class AbstractReader
parseLine
public void parseLine(String line)
- Description copied from class:
AbstractReader
- Parse a line of text into values for data arrays.
- Specified by:
parseLine in class AbstractReader
- Parameters:
line - to parse