public class FlatAndScienceGroup extends AbstractParameter implements ErrorDependingParameter, Refreshing
| Modifier and Type | Class and Description |
|---|---|
static class |
FlatAndScienceGroup.Db
Test class that retrieves statistic from db and prints it out.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFFILTERLIST
The list of filters served.
|
private static String |
DEFFLATGROUPS
The name of the flat group versus its members.
|
private static String |
DEFFLATMEMBERS
For each filter in filterlist the sky-flat targets to check.
|
private static String |
DEFFLATTYPES
This types indicate flat fields.
|
private static String |
DEFGROUPDEFAULT
Order imposed if multiple groups remain.
|
static String |
DEFNAME
Default name of this parameter.
|
private static String |
DEFPRIORITYDEFAULT
The default filter priority list.
|
private static String |
DEFSCIENCETYPES
These types indicate science targets.
|
private static String |
DEFSETUPIDS
These setups may contain the filter definition.
|
private static String |
DEFTELESCOPE
The name of the telescope for db access.
|
private Map<String,Date> |
flat
The mapping of served filter names to dates of last flat fields.
|
private Map<String,List<String>> |
groups
For each filter group name, we have the list of filters in it.
|
private HistorySql |
hsql
The done db.
|
static String |
KEY_FILTERLIST
The list of filters served.
|
static String |
KEY_FLATGROUPS
The name of the flat group versus its members.
|
static String |
KEY_FLATMEMBERS
For each filter in filterlist the sky-flat targets to check.
|
static String |
KEY_FLATTYPES
This types indicate flat fields.
|
static String |
KEY_GROUPDEFAULT
Order imposed if multiple groups remain.
|
static String |
KEY_HISTORYDB
This are the done database properties, if needed.
|
static String |
KEY_OBSERVEDB
This are the obs database properties, if needed.
|
static String |
KEY_PRIORITYDEFAULT
The default filter priority list.
|
static String |
KEY_SCIENCETYPES
These types indicate science targets.
|
static String |
KEY_SETUPIDS
These setups may contain the filter definition.
|
static String |
KEY_TELESCOPE
The name of the telescope for db access.
|
private Map<String,List<String>> |
members
The mapping of filter names to sky flat target name lists.
|
private ObserveSql |
osql
The obs db.
|
private Map<String,Date> |
science
The mapping of served filter names to dates of last observations.
|
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWNKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORNAMING_EXTENSIONCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
FlatAndScienceGroup(Map<String,String> prop)
Constructs a new flat group parameter object, defaulting all values.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
get()
The filter group is determined by grabbing the filters in the priority
order and than selecting a filter group out of all.
|
Object |
getForError(ErrorEvent ee)
Get for error returns no other value than get, only after registering a
target the return value may change.
|
private List<String> |
getPriorityList()
This method returns a priority list of filter where flats should be
obtained, starting from high to low priorities.
|
long |
getRefreshInterval()
We are a cron for noon.
|
void |
init()
On init, we update our current knowledge of recently observed filters and
flats by refreshing.
|
boolean |
isFixedRate()
We are a cron for noon.
|
void |
refresh()
We update the list of observed filters and successfully executed flat
fields.
|
void |
registerError(ErrorEvent fin)
Only target finished errors are considered.
|
private List<String> |
screen(List<String> from,
String filt)
In a non-destuctive way we screen all entries from the provided list that
refer to a flat group name that has the filter in question not in it.
|
Object |
set(Object no)
Sets the value of this parameter.
|
private boolean |
updateFlats()
For each filter in our sky-flat memeber list we check for the last
successful observation and keep the most actual one.
|
private boolean |
updateObserved()
For all filters specified in the filterlist, we query the obs-db for
their last occurence (=a fits file has been generated).
|
createParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, overrideDefaultName, register, rescanned, setName, toStringclone, 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, setObject, setProperties, setProperty, stringPropertiesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFormatted, getName, getStringdefaultBoolean, 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_TELESCOPE
public static final String KEY_FILTERLIST
public static final String KEY_FLATGROUPS
public static final String KEY_GROUPDEFAULT
public static final String KEY_FLATMEMBERS
public static final String KEY_SETUPIDS
public static final String KEY_PRIORITYDEFAULT
public static final String KEY_FLATTYPES
public static final String KEY_SCIENCETYPES
public static final String KEY_HISTORYDB
public static final String KEY_OBSERVEDB
public static final String DEFNAME
private static final String DEFTELESCOPE
private static final String DEFFILTERLIST
private static final String DEFFLATGROUPS
private static final String DEFGROUPDEFAULT
private static final String DEFFLATMEMBERS
private static final String DEFSETUPIDS
private static final String DEFPRIORITYDEFAULT
private static final String DEFFLATTYPES
private static final String DEFSCIENCETYPES
private Map<String,List<String>> members
private Map<String,List<String>> groups
private Map<String,Date> science
private transient HistorySql hsql
private transient ObserveSql osql
public void init()
throws InitException
init in interface Initializableinit in class AbstractParameterInitExceptionpublic Object get()
public Object set(Object no)
Parameterpublic void refresh()
refresh in interface Refreshingpublic boolean isFixedRate()
isFixedRate in interface Refreshingpublic long getRefreshInterval()
getRefreshInterval in interface Refreshingpublic Object getForError(ErrorEvent ee)
getForError in interface ErrorDependingParameterpublic void registerError(ErrorEvent fin)
registerError in interface ErrorDependingParameterprivate List<String> screen(List<String> from, String filt)
private List<String> getPriorityList()
private boolean updateObserved()
throws InitException
InitExceptionprivate boolean updateFlats()
throws InitException
InitException