edu.sc.seis.sod.source
Class AbstractCSVSource
java.lang.Object
edu.sc.seis.sod.source.AbstractCSVSource
- Direct Known Subclasses:
- CSVNetworkSource
public abstract class AbstractCSVSource
- extends java.lang.Object
Method Summary |
java.lang.String |
concatenateValidFields()
|
abstract java.lang.String[] |
getFields()
|
boolean |
isValidField(java.lang.String field)
|
static double |
loadDouble(java.util.List<java.lang.String> headers,
com.csvreader.CsvReader csvReader,
java.lang.String headerName,
double defaultValue)
|
static float |
loadFloat(java.util.List<java.lang.String> headers,
com.csvreader.CsvReader csvReader,
java.lang.String headerName,
float defaultValue)
|
static java.lang.String |
loadString(java.util.List<java.lang.String> headers,
com.csvreader.CsvReader csvReader,
java.lang.String headerName,
java.lang.String defaultValue)
|
static Time |
loadTime(java.util.List<java.lang.String> headers,
com.csvreader.CsvReader csvReader,
java.lang.String headerName,
Time defaultTime)
|
static UnitImpl |
loadUnit(java.util.List<java.lang.String> headers,
com.csvreader.CsvReader csvReader,
java.lang.String headerName,
UnitImpl defaultUnit)
|
java.util.List<java.lang.String> |
validateHeaders(com.csvreader.CsvReader csvReader)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
ELEVATION
public static final java.lang.String ELEVATION
- See Also:
- Constant Field Values
DEPTH
public static final java.lang.String DEPTH
- 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
ELEVATION_UNITS
public static final java.lang.String ELEVATION_UNITS
- See Also:
- Constant Field Values
UNKNOWN
public static final java.lang.String UNKNOWN
- See Also:
- Constant Field Values
DEFAULT_TIME
public static final Time DEFAULT_TIME
DEFAULT_END
public static final Time DEFAULT_END
csvFilename
protected java.lang.String csvFilename
AbstractCSVSource
public AbstractCSVSource()
getFields
public abstract java.lang.String[] getFields()
isValidField
public boolean isValidField(java.lang.String field)
concatenateValidFields
public java.lang.String concatenateValidFields()
validateHeaders
public java.util.List<java.lang.String> validateHeaders(com.csvreader.CsvReader csvReader)
throws java.io.IOException,
java.io.FileNotFoundException,
ConfigurationException
- Throws:
java.io.IOException
java.io.FileNotFoundException
ConfigurationException
loadFloat
public static float loadFloat(java.util.List<java.lang.String> headers,
com.csvreader.CsvReader csvReader,
java.lang.String headerName,
float defaultValue)
throws UserConfigurationException,
java.io.IOException
- Throws:
UserConfigurationException
java.io.IOException
loadDouble
public static double loadDouble(java.util.List<java.lang.String> headers,
com.csvreader.CsvReader csvReader,
java.lang.String headerName,
double defaultValue)
throws UserConfigurationException,
java.io.IOException
- Throws:
UserConfigurationException
java.io.IOException
loadString
public static java.lang.String loadString(java.util.List<java.lang.String> headers,
com.csvreader.CsvReader csvReader,
java.lang.String headerName,
java.lang.String defaultValue)
throws UserConfigurationException,
java.io.IOException
- Throws:
UserConfigurationException
java.io.IOException
loadUnit
public static UnitImpl loadUnit(java.util.List<java.lang.String> headers,
com.csvreader.CsvReader csvReader,
java.lang.String headerName,
UnitImpl defaultUnit)
throws UserConfigurationException,
java.io.IOException
- Throws:
UserConfigurationException
java.io.IOException
loadTime
public static Time loadTime(java.util.List<java.lang.String> headers,
com.csvreader.CsvReader csvReader,
java.lang.String headerName,
Time defaultTime)
throws UserConfigurationException,
java.io.IOException
- Throws:
UserConfigurationException
java.io.IOException