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.event.SimpleEventSource
hasNextBeenCalled
-
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
concatenateValidFields()
java.lang.String
getDescription()
edu.sc.seis.fissuresUtil.cache.CacheEvent[]
getEvents()
static edu.sc.seis.fissuresUtil.cache.CacheEvent[]
getEventsFromCSVFile(java.lang.String filename)
static edu.sc.seis.fissuresUtil.cache.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, getFissuresNamingService, getName, getRetries, getRetryStrategy, setRetryStrategy
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface edu.sc.seis.sod.source.Source
appendToName, getName, getRetries
-
-
-
-
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 edu.sc.seis.fissuresUtil.cache.CacheEvent[] getEvents()
- Specified by:
getEvents
in classSimpleEventSource
-
getEventsFromCSVFile
public static edu.sc.seis.fissuresUtil.cache.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.fissuresUtil.cache.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
-
-