edu.sc.seis.sod.source.event
Class CSVEventSource

java.lang.Object
  extended by edu.sc.seis.sod.source.event.SimpleEventSource
      extended by edu.sc.seis.sod.source.event.CSVEventSource
All Implemented Interfaces:
SodElement, EventSource

public class CSVEventSource
extends SimpleEventSource


Field Summary
static java.lang.String CATALOG
           
static java.lang.String CONTRIBUTOR
           
static java.lang.String DEPTH
           
static java.lang.String DEPTH_UNITS
           
static java.lang.String FE_GEO_REGION
           
static java.lang.String FE_REGION
           
static java.lang.String FE_REGION_TYPE
           
static java.lang.String FE_SEIS_REGION
           
static java.lang.String LATITUDE
           
static java.lang.String LONGITUDE
           
static java.lang.String MAGNITUDE
           
static java.lang.String MAGNITUDE_CONTRIBUTOR
           
static java.lang.String MAGNITUDE_TYPE
           
static java.lang.String NAME
           
static java.lang.String TIME
           
static java.lang.String UNKNOWN
           
 
Fields inherited from class edu.sc.seis.sod.source.event.SimpleEventSource
hasNextBeenCalled
 
Constructor Summary
CSVEventSource(org.w3c.dom.Element config)
           
CSVEventSource(java.lang.String filename)
           
 
Method Summary
static java.lang.String concatenateValidFields()
           
 java.lang.String getDescription()
           
 CacheEvent[] getEvents()
           
static CacheEvent[] getEventsFromCSVFile(java.lang.String filename)
           
static CacheEvent[] getEventsFromReader(java.io.Reader reader)
           
protected  void initFromFile(java.lang.String filename)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.sc.seis.sod.source.event.SimpleEventSource
extractBeginTime, getEventTimeRange, getWaitBeforeNext, hasNext, next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TIME

public static final java.lang.String TIME
See Also:
Constant Field Values

LONGITUDE

public static final java.lang.String LONGITUDE
See Also:
Constant Field Values

LATITUDE

public static final java.lang.String LATITUDE
See Also:
Constant Field Values

DEPTH

public static final java.lang.String DEPTH
See Also:
Constant Field Values

MAGNITUDE

public static final java.lang.String MAGNITUDE
See Also:
Constant Field Values

CATALOG

public static final java.lang.String CATALOG
See Also:
Constant Field Values

CONTRIBUTOR

public static final java.lang.String CONTRIBUTOR
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

FE_SEIS_REGION

public static final java.lang.String FE_SEIS_REGION
See Also:
Constant Field Values

FE_GEO_REGION

public static final java.lang.String FE_GEO_REGION
See Also:
Constant Field Values

FE_REGION

public static final java.lang.String FE_REGION
See Also:
Constant Field Values

FE_REGION_TYPE

public static final java.lang.String FE_REGION_TYPE
See Also:
Constant Field Values

DEPTH_UNITS

public static final java.lang.String DEPTH_UNITS
See Also:
Constant Field Values

MAGNITUDE_TYPE

public static final java.lang.String MAGNITUDE_TYPE
See Also:
Constant Field Values

MAGNITUDE_CONTRIBUTOR

public static final java.lang.String MAGNITUDE_CONTRIBUTOR
See Also:
Constant Field Values

UNKNOWN

public static final java.lang.String UNKNOWN
See Also:
Constant Field Values
Constructor Detail

CSVEventSource

public CSVEventSource(org.w3c.dom.Element config)
               throws ConfigurationException
Throws:
ConfigurationException

CSVEventSource

public CSVEventSource(java.lang.String filename)
               throws ConfigurationException
Throws:
ConfigurationException
Method Detail

initFromFile

protected void initFromFile(java.lang.String filename)
                     throws ConfigurationException
Throws:
ConfigurationException

getDescription

public java.lang.String getDescription()

getEvents

public CacheEvent[] getEvents()
Specified by:
getEvents in class SimpleEventSource

getEventsFromCSVFile

public static CacheEvent[] getEventsFromCSVFile(java.lang.String filename)
                                         throws java.io.FileNotFoundException,
                                                java.io.IOException,
                                                ConfigurationException
Throws:
java.io.FileNotFoundException
java.io.IOException
ConfigurationException

getEventsFromReader

public static CacheEvent[] getEventsFromReader(java.io.Reader reader)
                                        throws java.io.IOException,
                                               java.io.FileNotFoundException,
                                               ConfigurationException
Throws:
java.io.IOException
java.io.FileNotFoundException
ConfigurationException

concatenateValidFields

public static java.lang.String concatenateValidFields()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object