org.android.activityminer.provider
Class PredictionsProvider

Package class diagram package PredictionsProvider
java.lang.Object
  extended by android.content.ContentProvider
      extended by org.android.activityminer.provider.PredictionsProvider
All Implemented Interfaces:
ComponentCallbacks, ComponentCallbacks2

public class PredictionsProvider
extends ContentProvider

The content provider for the stored activities recognized by the activity miner recognition service.


Nested Class Summary
private  class PredictionsProvider.DatabaseHelper
          The internal SQLite helper class
 
Nested classes/interfaces inherited from class android.content.ContentProvider
ContentProvider.PipeDataWriter<T>
 
Field Summary
private static String CREATE_TABLE_STATEMENT
          The create table statement.
private  PredictionsProvider.DatabaseHelper dbHelper
          The internally used database helper
private static int DIRECTORY
          The directory uri identifier
static String KEY_CERTAINTY
          The prediction certainty field.
private static String KEY_ID
          The id field.
static String KEY_PREDICTION
          The predicted activity label field.
static String KEY_TS
          The time stamp field.
private  HashMap<String,String> projectionMap
          Projection map for the column names
private  ContentResolver resolver
          The content resolver
private static int SINGLE_ITEM
          The item uri identifier
private static String TABLE_NAME
          The table name.
private  UriMatcher uriMatcher
          The internal URI matcher
 
Fields inherited from interface android.content.ComponentCallbacks2
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
 
Constructor Summary
PredictionsProvider()
          Constructor
 
Method Summary
 int delete(Uri uri, String selection, String[] selectionArgs)
           
 String getType(Uri uri)
           
 Uri insert(Uri uri, ContentValues values)
           
 boolean onCreate()
           
 Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
           
 int update(Uri uri, ContentValues values, String selection, String[] selectionArgs)
           
 
Methods inherited from class android.content.ContentProvider
applyBatch, attachInfo, bulkInsert, call, canonicalize, dump, getCallingPackage, getContext, getPathPermissions, getReadPermission, getStreamTypes, getWritePermission, isTemporary, onConfigurationChanged, onLowMemory, onTrimMemory, openAssetFile, openAssetFile, openFile, openFile, openFileHelper, openPipeHelper, openTypedAssetFile, openTypedAssetFile, query, setPathPermissions, setReadPermission, setWritePermission, shutdown, uncanonicalize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE_NAME

private static final String TABLE_NAME
The table name.

See Also:
Constant Field Values

KEY_ID

private static final String KEY_ID
The id field.

See Also:
Constant Field Values

KEY_PREDICTION

public static final String KEY_PREDICTION
The predicted activity label field.

See Also:
Constant Field Values

KEY_CERTAINTY

public static final String KEY_CERTAINTY
The prediction certainty field.

See Also:
Constant Field Values

KEY_TS

public static final String KEY_TS
The time stamp field.

See Also:
Constant Field Values

CREATE_TABLE_STATEMENT

private static final String CREATE_TABLE_STATEMENT
The create table statement.

See Also:
Constant Field Values

uriMatcher

private final UriMatcher uriMatcher
The internal URI matcher


resolver

private ContentResolver resolver
The content resolver


SINGLE_ITEM

private static final int SINGLE_ITEM
The item uri identifier

See Also:
Constant Field Values

DIRECTORY

private static final int DIRECTORY
The directory uri identifier

See Also:
Constant Field Values

dbHelper

private PredictionsProvider.DatabaseHelper dbHelper
The internally used database helper


projectionMap

private final HashMap<String,String> projectionMap
Projection map for the column names

Constructor Detail

PredictionsProvider

public PredictionsProvider()
Constructor

Method Detail

onCreate

public final boolean onCreate()
Specified by:
onCreate in class ContentProvider

query

public final Cursor query(Uri uri,
                          String[] projection,
                          String selection,
                          String[] selectionArgs,
                          String sortOrder)
Specified by:
query in class ContentProvider

insert

public final Uri insert(Uri uri,
                        ContentValues values)
Specified by:
insert in class ContentProvider

delete

public final int delete(Uri uri,
                        String selection,
                        String[] selectionArgs)
Specified by:
delete in class ContentProvider

update

public final int update(Uri uri,
                        ContentValues values,
                        String selection,
                        String[] selectionArgs)
Specified by:
update in class ContentProvider

getType

public final String getType(Uri uri)
Specified by:
getType in class ContentProvider