public class WeatherDatabase extends AbstractSql
WeatherSurveying.BlockData out of it.| Modifier and Type | Class and Description |
|---|---|
static class |
WeatherDatabase.Dump
Retrieves a list of weather data and dumpe it to stdout.
|
AbstractSql.Columns, AbstractSql.ExtractPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFDATEFIELD
The default binding name of the weather trigger.
|
private static long |
DEFEXTRATIME
The default extra time.
|
private static String |
DEFGOODFLAG
The default setting of the non-valid-reading indicator.
|
private static String |
DEFPRINCIPAL
The default mapping of STELLA sensor names to sql fields.
|
private static String |
DEFWEATHERFIELD
The default binding name of the weather trigger.
|
static String |
KEY_DATEFIELD
The key to the sql date-field name.
|
static String |
KEY_EXTRATIME
A time which is added to date queries to enlarge the time-space.
|
static String |
KEY_GOODFLAG
The key to the good-weather string.
|
static String |
KEY_PRINCIPAL
The mapping of STELLA sensor names to sql data fields.
|
static String |
KEY_WEATHERFIELD
The key to the sql weather-field name.
|
private Map<String,String> |
principal
The mapping of STELLA sensors names to sql field names.
|
KEY_TABLE, SQLBATCHDIR, SQLFAILDIRKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Constructor and Description |
|---|
WeatherDatabase(Map<String,String> prop)
Constructs a new database collector.
|
| Modifier and Type | Method and Description |
|---|---|
List<WeatherSurveying.DataBlock> |
getWeatherData(Date fromsharp,
Date tosharp)
Returns a list of mappings of sensor names to sensor values.
|
void |
init()
Initializes the database current object as well as the database acess
object.
|
delete, distinct, distinct, exit, getAccess, getDefaultArchive, getDefaultFormat, getTable, insert, isEntry, release, release, replace, retrieve, retrieve, retrieve, single, singleclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_PRINCIPAL
public static final String KEY_DATEFIELD
public static final String KEY_WEATHERFIELD
public static final String KEY_GOODFLAG
public static final String KEY_EXTRATIME
private static final String DEFPRINCIPAL
private static final String DEFDATEFIELD
private static final String DEFWEATHERFIELD
private static final String DEFGOODFLAG
private static final long DEFEXTRATIME
public WeatherDatabase(Map<String,String> prop)
GenericSql class must also be
present here if non-default values are wanted. Additionally, the weather
trigger stub is constructed here with the generic properties of the
collector.public void init()
GenericSql#init method and opening the connection.principal, #minima, and
#maxima) are assigned. Additionally, the format look-up table
is constructed using the class names pointed to in the
#KEY_FORMAT property to java classes. Only classes found that
also support a single-string constructor are used.init in interface Initializableinit in class AbstractSqlpublic List<WeatherSurveying.DataBlock> getWeatherData(Date fromsharp, Date tosharp)
WeatherSurveying.BlockData objects.