|
MessageDB | messageDB |
|
TaskDB | taskDB |
|
SensePlatform | sensePlatform |
|
DBBackendSync | dbBackendSync |
|
String | PREFERENCES_FIRST_TIME_SYNCED = "historian_first_time_synced" |
|
|
static final String | name = "Historian" |
|
static final String | TAG = name |
|
void nl.sense_os.cortex.coaching.Historian.clearHistory |
( |
| ) |
|
Removes all the local historical data (tasks and messages)
boolean nl.sense_os.cortex.coaching.Historian.firstTimeInit |
( |
| ) |
|
|
protected |
First time initialization
When this is the first run on this phone for this user, a check will be performed whether this users has old tasks and messages to be downloaded.
- Returns
- True if the initialization was successful. False if it failed.
DBBackendSync nl.sense_os.cortex.coaching.Historian.getDBBackEndSync |
( |
| ) |
|
Get the backend sync instance
The DBBackendSync uploads the Tasks, Messages, and Coach states to the back-end. With this instance the current local data can be manually flushed, and the periodically scheduled uploads can be started/stopped.
- Returns
- The DBBackendSync instance
static synchronized Historian nl.sense_os.cortex.coaching.Historian.getInstance |
( |
SensePlatform |
sensePlatformt | ) |
|
|
staticprotected |
The Historian instance
Returns the singleton instance of a historian.
The Historian receive data of all the Coaches.
- Returns
- The Historian instance
List<Message> nl.sense_os.cortex.coaching.Historian.getMessages |
( |
Task |
task | ) |
|
Get Messages based on the Task
Get the messages of a Task.
- Parameters
-
task | The Task to get the messages for |
- Returns
- A list with the Messages
List<Task> nl.sense_os.cortex.coaching.Historian.getPastTasks |
( |
double |
start_time, |
|
|
double |
end_time, |
|
|
Coach.TYPE |
coach_type |
|
) |
| |
Get the Completed tasks
Get the Tasks from a certain Coach.Type which were active in the given time range.
- Parameters
-
start_time | The epoch start time in seconds |
end_time | The epoch end time in seconds |
coach_type | The Coach.Type of the Coach |
- Returns
- The past or current tasks for a certain period and coach type
List<Task> nl.sense_os.cortex.coaching.Historian.getPastTasks |
( |
double |
start_time, |
|
|
double |
end_time |
|
) |
| |
Get the Completed tasks
Get the Tasks which where active in the given time range.
- Parameters
-
start_time | The epoch start time in seconds |
end_time | The epoch end time in seconds |
- Returns
- The past or current tasks for a certain period
Task nl.sense_os.cortex.coaching.Historian.getTask |
( |
Message |
message | ) |
|
Get a Task based on the message
- Parameters
-
message | The message to find the task for |
- Returns
- a Task
The documentation for this class was generated from the following file:
- android-sdk/src/nl/sense_os/cortex/coaching/Historian.java