stella.sql
Class Statistics

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

public class Statistics
extends AbstractSql

We get some statistic information stored in the db.


Nested Class Summary
static class Statistics.Duty
           
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
static String DEFPASSWORD
          The key to the password for db-acces if not default.
static String DEFUSERNAME
          The key to the user name for db-acces if not default.
 
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
Statistics()
           
 
Method Summary
 double getEnvCount(Date night, String addsel)
          Get the roof-open time at that night.
 double getExposureTimeSum(Date night)
          Get the sum of all exposure times at a given night in seconds.
private  double getExpSum(Date night, String addsel)
           
 double getNightCount(Date night, double solz)
          Get the maximum time for sun below horizon at that night.
 double getRoofOpenCount(Date night)
          Get the roof-open time at that night.
 double getScienceTimeSum(Date night)
          Get the sum of all scientific times at a given night in seconds.
 
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

DEFUSERNAME

public static final String DEFUSERNAME
The key to the user name for db-acces if not default.

See Also:
Constant Field Values

DEFPASSWORD

public static final String DEFPASSWORD
The key to the password for db-acces if not default.

See Also:
Constant Field Values
Constructor Detail

Statistics

public Statistics()
Method Detail

getExposureTimeSum

public double getExposureTimeSum(Date night)
Get the sum of all exposure times at a given night in seconds.

Parameters:
night - midnight of the day in question.

getScienceTimeSum

public double getScienceTimeSum(Date night)
Get the sum of all scientific times at a given night in seconds.


getNightCount

public double getNightCount(Date night,
                            double solz)
Get the maximum time for sun below horizon at that night.


getRoofOpenCount

public double getRoofOpenCount(Date night)
Get the roof-open time at that night.


getEnvCount

public double getEnvCount(Date night,
                          String addsel)
Get the roof-open time at that night.


getExpSum

private double getExpSum(Date night,
                         String addsel)