Package edu.sc.seis.sod.source.event
Class CSVEventSource
java.lang.Object
edu.sc.seis.sod.source.AbstractSource
edu.sc.seis.sod.source.event.SimpleEventSource
edu.sc.seis.sod.source.event.CSVEventSource
- All Implemented Interfaces:
EventSource
,Source
public class CSVEventSource extends SimpleEventSource
-
Field Summary
Fields Modifier and Type Field Description 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.AbstractSource
name, NAME_ELEMENT, RETRIES_ELEMENT
-
Constructor Summary
Constructors Constructor Description CSVEventSource(java.lang.String filename)
CSVEventSource(org.w3c.dom.Element config)
-
Method Summary
Modifier and Type Method Description static java.lang.String
concatenateValidFields()
java.lang.String
getDescription()
edu.sc.seis.sod.model.event.CacheEvent[]
getEvents()
static edu.sc.seis.sod.model.event.CacheEvent[]
getEventsFromCSVFile(java.lang.String filename)
static edu.sc.seis.sod.model.event.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 edu.sc.seis.sod.source.AbstractSource
appendToName, getName, getRetries, getRetryStrategy, setRetryStrategy
-
Field Details
-
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 Details
-
CSVEventSource
- Throws:
ConfigurationException
-
CSVEventSource
- Throws:
ConfigurationException
-
-
Method Details
-
initFromFile
- Throws:
ConfigurationException
-
getDescription
public java.lang.String getDescription() -
getEvents
public edu.sc.seis.sod.model.event.CacheEvent[] getEvents()- Specified by:
getEvents
in classSimpleEventSource
-
getEventsFromCSVFile
public static edu.sc.seis.sod.model.event.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 edu.sc.seis.sod.model.event.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 classjava.lang.Object
-