mysql
Class WeatherSql

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by mysql.AbstractSql
                  extended by mysql.WeatherSql
All Implemented Interfaces:
Cloneable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class WeatherSql
extends AbstractSql

Weather data interface.


Nested Class Summary
static class WeatherSql.Derivative
          This class derives derivatives of weather sensor data at a given date.
static class WeatherSql.Focus
          This class reads a focus optimum output file and calculates the derivatives of the ambient and bay temperature at the times of measure.
static class WeatherSql.Radar
           
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static String DATEDIFF
          Used as a customized name for a second-length intervall date diff.
static String DATEKEY
          The key for the DATE column.
private static String DATEORDER
          Used as a customized name for a second-length intervall date diff.
private static String DEFTABLE
          The default table name.
static int ORDER
          Default order of interpolating derivatives, 1=linear.
 
Fields inherited from class mysql.AbstractSql
KEY_TABLE
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
WeatherSql(Map<String,String> prop)
          Constructs a new history database.
 
Method Summary
 List<Double> getDerivatives(List<String> sensors, Date at)
          Returns a list of differences usable as derivatives of the queried sensor names to seconds.
 List<Double> getDerivatives(List<String> sensors, Date at, int n)
          Returns a list of differences usable as derivatives of the queried sensor names to seconds.
 List<WeatherSql.Radar> getWeather(List<String> sensors, Date from, Date to)
          Returns a list of HistoryAware.Picks of all targets that have been picked between the given dates.
 
Methods inherited from class mysql.AbstractSql
getPassword, getTable, getUserName, init, isEntry
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
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, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, 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, stringProperties
 

Field Detail

ORDER

public static final int ORDER
Default order of interpolating derivatives, 1=linear.

See Also:
Constant Field Values

DATEKEY

public static final String DATEKEY
The key for the DATE column.

See Also:
Constant Field Values

DATEDIFF

private static final String DATEDIFF
Used as a customized name for a second-length intervall date diff.

See Also:
Constant Field Values

DATEORDER

private static final String DATEORDER
Used as a customized name for a second-length intervall date diff.

See Also:
Constant Field Values

DEFTABLE

private static final String DEFTABLE
The default table name.

See Also:
Constant Field Values
Constructor Detail

WeatherSql

public WeatherSql(Map<String,String> prop)
Constructs a new history database.

Method Detail

getWeather

public List<WeatherSql.Radar> getWeather(List<String> sensors,
                                         Date from,
                                         Date to)
Returns a list of HistoryAware.Picks of all targets that have been picked between the given dates.

Returns:
A mapping of target identifier to list of picks.

getDerivatives

public List<Double> getDerivatives(List<String> sensors,
                                   Date at)
Returns a list of differences usable as derivatives of the queried sensor names to seconds. Uses the default number of close sensor readings.


getDerivatives

public List<Double> getDerivatives(List<String> sensors,
                                   Date at,
                                   int n)
Returns a list of differences usable as derivatives of the queried sensor names to seconds.