1""" Conditions Database interface definition. """
2from abc
import ABCMeta, abstractmethod
3from datetime
import datetime
11__author__ =
"Tom Vrancken"
12__email__ =
"dev@tomvrancken.nl"
13__copyright__ =
"TU/e ST2019"
14__credits__ = [
"Juan van der Heijden",
"Georgios Azis"]
16__status__ =
"Prototype"
19_ABC = ABCMeta(
'ABC', (object,), {
'__slots__': ()})
95 collected_at=datetime.now(), valid_since=datetime.now(),
96 valid_until=datetime.max):
222 type=None, valid_since=None, valid_until=None):
Conditions Database Interface definition.
get_detector(self, detector_id)
Returns a detector dictionary.
get_conditions_by_tag(self, detector_id, tag)
Returns a list with condition dictionaries having a specific tag for a given detector.
get_condition_by_name_and_tag(self, detector_id, name, tag)
Returns a condition dictionary of a specific condition belonging to a detector, identified by conditi...
get_condition_by_name_and_collection_date(self, detector_id, name, collected_at)
Returns a condition dictionary of a specific condition belonging to a detector, identified by conditi...
add_detector(self, name, parent_id=None)
Adds a new detector to the database.
remove_detector(self, detector_id)
Removes a detector from the database.
get_conditions_by_name(self, detector_id, name)
Returns a list with condition dictionaries having a specific name for a given detector.
update_condition_by_name_and_tag(self, detector_id, name, tag, type=None, valid_since=None, valid_until=None)
Updates the type, valid_since and valid_until values of a specific condition belonging to a detector,...
get_conditions_by_name_and_validity(self, detector_id, name, start_date, end_date=None)
Returns a list with condition dictionaries associated with a detector that are valid on the specified...
list_detectors(self, parent_id=None)
Returns a list with all the detector names in the database.
add_condition(self, detector_id, name, tag, values, type=None, collected_at=datetime.now(), valid_since=datetime.now(), valid_until=datetime.max)
Adds a condition to a detector.
get_conditions(self, detector_id)
Returns a list with all condition dictionaries associated with a detector.