|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectandroid.os.AsyncTask<Void,Integer,Long>
org.android.activityminer.app.db.FeatureExtractionTask<T>
T - the enumeration type for the dimensionspublic class FeatureExtractionTask<T extends Enum<T> & Dimensions>
The asynchronous feature extraction task.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class android.os.AsyncTask |
|---|
AsyncTask.Status |
| Field Summary | |
|---|---|
private double |
avgTimeForFeatureExtraction
The average extraction time per cut-out. |
private Context |
context
The activity context. |
private int |
extractedSampleCount
The count of extracted samples. |
private List<Long> |
failedIds
The recoding identifiers which failed to process. |
private FeatureExtractionHelper<T> |
helper
Helper to delegate feature extraction to |
private ObservableEventSource<TaskFinishedEvent> |
observableEventSource
The observable event source for delegation. |
private double |
processingTime
The total processing time in seconds. |
private Integer[] |
progress
The progress counter. |
private ProgressDialog |
progressDialog
The progress dialog. |
private DBRecordingStatisticSequenceEntry |
sequenceStatistics
The sequence statistic to process. |
| Fields inherited from class android.os.AsyncTask |
|---|
SERIAL_EXECUTOR, THREAD_POOL_EXECUTOR |
| Constructor Summary | |
|---|---|
private |
FeatureExtractionTask(Context context,
DBRecordingStatisticSequenceEntry sequenceStatistics,
FeatureExtractionHelper<T> featureExtractionHelper)
Constructor |
| Method Summary | |
|---|---|
static void |
createAndRunTask(Context context,
DBManager dbManager,
Configuration config,
DBRecordingStatisticSequenceEntry sequenceStatistic,
EventObserver<? extends TaskFinishedEvent> finishedObserver)
Does create and execute a feature extraction Task for the given configuration and recording identifiers. |
protected Long |
doInBackground(Void... params)
|
void |
execute()
An execution wrapper. |
boolean |
hasObservers()
|
void |
notify(TaskFinishedEvent data)
|
private void |
notifyForErrors()
Does notify the user about the errors. |
private void |
notifyForResult()
Does notify the average extraction time needed per cut-out. |
void |
onEvent(ObservableEventSource<? extends FeatureExtractionHelper.ProgressEvent> eventSource,
FeatureExtractionHelper.ProgressEvent observedEvent)
|
protected void |
onPostExecute(Long result)
|
protected void |
onPreExecute()
|
protected void |
onProgressUpdate(Integer... values)
|
void |
registerEventObserver(EventObserver<? extends TaskFinishedEvent> observer)
|
void |
removeAllObservers()
|
void |
unregisterEventObserver(EventObserver<? extends TaskFinishedEvent> observer)
|
| Methods inherited from class android.os.AsyncTask |
|---|
cancel, execute, execute, executeOnExecutor, get, get, getStatus, isCancelled, onCancelled, onCancelled, publishProgress |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final Context context
private final FeatureExtractionHelper<T extends Enum<T> & Dimensions> helper
private ProgressDialog progressDialog
private final DBRecordingStatisticSequenceEntry sequenceStatistics
private final List<Long> failedIds
private final Integer[] progress
private final ObservableEventSource<TaskFinishedEvent> observableEventSource
private double avgTimeForFeatureExtraction
private int extractedSampleCount
private double processingTime
| Constructor Detail |
|---|
private FeatureExtractionTask(Context context,
DBRecordingStatisticSequenceEntry sequenceStatistics,
FeatureExtractionHelper<T> featureExtractionHelper)
context - the application contextsequenceStatistics - the sequence statistics to processfeatureExtractionHelper - the feature extraction helper| Method Detail |
|---|
protected void onPreExecute()
onPreExecute in class AsyncTask<Void,Integer,Long>protected void onPostExecute(Long result)
onPostExecute in class AsyncTask<Void,Integer,Long>private void notifyForResult()
private void notifyForErrors()
protected void onProgressUpdate(Integer... values)
onProgressUpdate in class AsyncTask<Void,Integer,Long>protected Long doInBackground(Void... params)
doInBackground in class AsyncTask<Void,Integer,Long>public void execute()
public static final void createAndRunTask(Context context,
DBManager dbManager,
Configuration config,
DBRecordingStatisticSequenceEntry sequenceStatistic,
EventObserver<? extends TaskFinishedEvent> finishedObserver)
context - the context of the callerdbManager - the database manager to useconfig - the configuration to usesequenceStatistic - the sequence statistics to processfinishedObserver - the finished event observerpublic void registerEventObserver(EventObserver<? extends TaskFinishedEvent> observer)
registerEventObserver in interface ObserverRegistration<TaskFinishedEvent>public void unregisterEventObserver(EventObserver<? extends TaskFinishedEvent> observer)
unregisterEventObserver in interface ObserverRegistration<TaskFinishedEvent>public void removeAllObservers()
removeAllObservers in interface ObserverRegistration<TaskFinishedEvent>public void notify(TaskFinishedEvent data)
notify in interface ObservableEventSource<TaskFinishedEvent>public boolean hasObservers()
hasObservers in interface ObservableEventSource<TaskFinishedEvent>
public void onEvent(ObservableEventSource<? extends FeatureExtractionHelper.ProgressEvent> eventSource,
FeatureExtractionHelper.ProgressEvent observedEvent)
onEvent in interface EventObserver<FeatureExtractionHelper.ProgressEvent>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||