org.android.activityminer.app.db
Class DBRecordingViewFragment

Package class diagram package DBRecordingViewFragment
java.lang.Object
  extended by android.support.v4.app.Fragment
      extended by org.android.activityminer.app.db.DBRecordingViewFragment
All Implemented Interfaces:
ComponentCallbacks, View.OnCreateContextMenuListener, EventObserver<TaskFinishedEvent>

public class DBRecordingViewFragment
extends android.support.v4.app.Fragment
implements EventObserver<TaskFinishedEvent>

The fragment for the recording tab.


Nested Class Summary
 
Nested classes/interfaces inherited from class android.support.v4.app.Fragment
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
 
Field Summary
private  ExpandableDBRecordingStatisticAdapter adapter
          The list adapter
private  DBManager dbManager
          A reference to the global database manager.
private  int index
          Index to temporarily store selected index in
private  DBRecordingStatistic statistic
          The recording statistics
 
Constructor Summary
DBRecordingViewFragment()
           
 
Method Summary
protected  void deleteFeaturesForRecording(DBRecordingStatisticEntry recordStatistics)
          Does delete all extracted features for the given recording entry.
protected  void deleteFeaturesForSequence(DBRecordingStatisticSequenceEntry sequenceStatistic)
          Does delete all extracted features for the given sequence entry.
protected  void deleteRecording(DBRecordingStatisticSequenceEntry sequenceStatistic, DBRecordingStatisticEntry recordStatistics)
          Does delete the recording from the selected recoding statistic.
protected  void deleteSequence(DBRecordingStatisticSequenceEntry sequenceStatistic)
          Does delete the sequence of the recording from the selected recoding statistic.
private  List<DBRecordingStatisticEntry> getRecordingStatisticsForSequenceBehindSelection(DBRecordingStatisticSequenceEntry sequenceStatistic, DBRecordingStatisticEntry recordStatistics)
          Getter for the recordings statistics from the given sequence behind the selected recording identifier
 void onActivityCreated(Bundle savedInstanceState)
           
 boolean onContextItemSelected(MenuItem item)
           
 void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo)
           
 void onCreateOptionsMenu(Menu menu, MenuInflater inflater)
           
 View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
           
private  boolean onDeleteAllTrainingSamples()
          Handler for option delete all training samples.
 void onEvent(ObservableEventSource<? extends TaskFinishedEvent> eventSource, TaskFinishedEvent observedEvent)
           
 boolean onOptionsItemSelected(MenuItem item)
           
private  boolean onReassignSequenceToActivity(DBRecordingStatisticSequenceEntry sequenceStatistic)
          Handler for reassignment of a sequence to an activity..
private  boolean onRecordingDeletion(DBRecordingStatisticSequenceEntry sequenceStatistic, DBRecordingStatisticEntry recordStatistics)
          Handler for option delete selected recoding.
private  boolean onRecordingFeatureExploration(DBRecordingStatisticEntry recordStatistics)
          Handler for option explore features for selected recoding.
private  boolean onSequenceDeletion(DBRecordingStatisticSequenceEntry sequenceStatistic)
          Handler for option delete sequence of selected recoding.
private  boolean onSequenceFeatureDeletion(DBRecordingStatisticSequenceEntry sequenceStatistic)
          Handler for option delete extracted features for selected sequence.
private  boolean onSequenceFeatureExploration(DBRecordingStatisticSequenceEntry sequenceStatistic)
          Handler for option explore features for selected sequence.
private  boolean onSequenceFeatureExtraction(DBRecordingStatisticSequenceEntry sequenceStatistic)
          Handler for option extract features for selected sequence.
private  boolean onSequenceTruncation(DBRecordingStatisticSequenceEntry sequenceStatistic, DBRecordingStatisticEntry recordStatistics)
          Handler for option truncate sequence behind selected recoding.
protected  void truncateSequenceBehindSelected(DBRecordingStatisticSequenceEntry sequenceStatistic, List<DBRecordingStatisticEntry> recStatisticsToRemove)
          Does delete the sequence of the recording from the selected recoding statistic.
private  void updateData()
          Method for data updates
 
Methods inherited from class android.support.v4.app.Fragment
dump, equals, getActivity, getArguments, getChildFragmentManager, getFragmentManager, getId, getLayoutInflater, getLoaderManager, getParentFragment, getResources, getRetainInstance, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onConfigurationChanged, onCreate, onCreateAnimation, onDestroy, onDestroyOptionsMenu, onDestroyView, onDetach, onHiddenChanged, onInflate, onLowMemory, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onResume, onSaveInstanceState, onStart, onStop, onViewCreated, onViewStateRestored, registerForContextMenu, setArguments, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setRetainInstance, setTargetFragment, setUserVisibleHint, startActivity, startActivityForResult, toString, unregisterForContextMenu
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

adapter

private ExpandableDBRecordingStatisticAdapter adapter
The list adapter


statistic

private DBRecordingStatistic statistic
The recording statistics


dbManager

private DBManager dbManager
A reference to the global database manager.


index

private int index
Index to temporarily store selected index in

Constructor Detail

DBRecordingViewFragment

public DBRecordingViewFragment()
Method Detail

onCreateView

public View onCreateView(LayoutInflater inflater,
                         ViewGroup container,
                         Bundle savedInstanceState)
Overrides:
onCreateView in class android.support.v4.app.Fragment

onActivityCreated

public void onActivityCreated(Bundle savedInstanceState)
Overrides:
onActivityCreated in class android.support.v4.app.Fragment

updateData

private void updateData()
Method for data updates


onCreateOptionsMenu

public void onCreateOptionsMenu(Menu menu,
                                MenuInflater inflater)
Overrides:
onCreateOptionsMenu in class android.support.v4.app.Fragment

onOptionsItemSelected

public final boolean onOptionsItemSelected(MenuItem item)
Overrides:
onOptionsItemSelected in class android.support.v4.app.Fragment

onCreateContextMenu

public void onCreateContextMenu(ContextMenu menu,
                                View v,
                                ContextMenu.ContextMenuInfo menuInfo)
Specified by:
onCreateContextMenu in interface View.OnCreateContextMenuListener
Overrides:
onCreateContextMenu in class android.support.v4.app.Fragment

onContextItemSelected

public boolean onContextItemSelected(MenuItem item)
Overrides:
onContextItemSelected in class android.support.v4.app.Fragment

onRecordingFeatureExploration

private boolean onRecordingFeatureExploration(DBRecordingStatisticEntry recordStatistics)
Handler for option explore features for selected recoding.

Parameters:
recordStatistics - the statistic entry of the recording
Returns:
true if successful, false otherwise

onSequenceFeatureExploration

private boolean onSequenceFeatureExploration(DBRecordingStatisticSequenceEntry sequenceStatistic)
Handler for option explore features for selected sequence.

Parameters:
sequenceStatistic - the statistic entry of the sequence
Returns:
true if successful, false otherwise

onSequenceFeatureExtraction

private boolean onSequenceFeatureExtraction(DBRecordingStatisticSequenceEntry sequenceStatistic)
Handler for option extract features for selected sequence.

Parameters:
sequenceStatistic - the statistic entry of the sequence
Returns:
true if successful, false otherwise

onDeleteAllTrainingSamples

private boolean onDeleteAllTrainingSamples()
Handler for option delete all training samples.

Returns:
true if successful, false otherwise

deleteFeaturesForRecording

protected final void deleteFeaturesForRecording(DBRecordingStatisticEntry recordStatistics)
Does delete all extracted features for the given recording entry.

Parameters:
recordStatistics - the statistic entry of the recording

onSequenceFeatureDeletion

private boolean onSequenceFeatureDeletion(DBRecordingStatisticSequenceEntry sequenceStatistic)
Handler for option delete extracted features for selected sequence.

Parameters:
sequenceStatistic - the statistic entry of the sequence
Returns:
true if successful, false otherwise

deleteFeaturesForSequence

protected final void deleteFeaturesForSequence(DBRecordingStatisticSequenceEntry sequenceStatistic)
Does delete all extracted features for the given sequence entry.

Parameters:
sequenceStatistic - the statistic entry of the sequence

onEvent

public void onEvent(ObservableEventSource<? extends TaskFinishedEvent> eventSource,
                    TaskFinishedEvent observedEvent)
Specified by:
onEvent in interface EventObserver<TaskFinishedEvent>

onSequenceTruncation

private boolean onSequenceTruncation(DBRecordingStatisticSequenceEntry sequenceStatistic,
                                     DBRecordingStatisticEntry recordStatistics)
Handler for option truncate sequence behind selected recoding.

Parameters:
sequenceStatistic - the statistic entry of the sequence
recordStatistics - the statistic entry of the recording in the sequence to truncate
Returns:
true if successful, false otherwise

onSequenceDeletion

private boolean onSequenceDeletion(DBRecordingStatisticSequenceEntry sequenceStatistic)
Handler for option delete sequence of selected recoding.

Parameters:
sequenceStatistic - the statistic entry of the sequence
Returns:
true if successful, false otherwise

getRecordingStatisticsForSequenceBehindSelection

private List<DBRecordingStatisticEntry> getRecordingStatisticsForSequenceBehindSelection(DBRecordingStatisticSequenceEntry sequenceStatistic,
                                                                                         DBRecordingStatisticEntry recordStatistics)
Getter for the recordings statistics from the given sequence behind the selected recording identifier

Parameters:
sequenceStatistic - the statistic entry of the sequence
recordStatistics - the statistic entry of the recording in the sequence to truncate behind
Returns:
a list with the recording statistics

onRecordingDeletion

private boolean onRecordingDeletion(DBRecordingStatisticSequenceEntry sequenceStatistic,
                                    DBRecordingStatisticEntry recordStatistics)
Handler for option delete selected recoding.

Parameters:
sequenceStatistic - the statistic of the sequence to remove from list
recordStatistics - the recording statistic of the recording to delete
Returns:
true if successful, false otherwise

deleteRecording

protected void deleteRecording(DBRecordingStatisticSequenceEntry sequenceStatistic,
                               DBRecordingStatisticEntry recordStatistics)
Does delete the recording from the selected recoding statistic.

Parameters:
sequenceStatistic - the statistic of the sequence to remove from list
recordStatistics - the recording statistic of the recording to delete

deleteSequence

protected void deleteSequence(DBRecordingStatisticSequenceEntry sequenceStatistic)
Does delete the sequence of the recording from the selected recoding statistic.

Parameters:
sequenceStatistic - the statistic of the sequence to remove from list

onReassignSequenceToActivity

private boolean onReassignSequenceToActivity(DBRecordingStatisticSequenceEntry sequenceStatistic)
Handler for reassignment of a sequence to an activity..

Parameters:
sequenceStatistic - the statistic entry of the sequence
Returns:
true if successful, false otherwise

truncateSequenceBehindSelected

protected void truncateSequenceBehindSelected(DBRecordingStatisticSequenceEntry sequenceStatistic,
                                              List<DBRecordingStatisticEntry> recStatisticsToRemove)
Does delete the sequence of the recording from the selected recoding statistic.

Parameters:
sequenceStatistic - the statistic entry of the sequence
recStatisticsToRemove - the recording statistics of the sequence to remove from list