org.opensha.commons.eq.cat.io
Class Reader_SCEDC

java.lang.Object
  extended by org.opensha.commons.eq.cat.io.AbstractReader
      extended by 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:

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

Field Summary
 
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.
 
Methods inherited from class org.opensha.commons.eq.cat.io.AbstractReader
description, process, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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
Method Detail

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