nl.sogeti.android.gpstracker.db
Class GPStrackingProvider

java.lang.Object
  extended by ContentProvider
      extended by nl.sogeti.android.gpstracker.db.GPStrackingProvider

public class GPStrackingProvider
extends ContentProvider

Goal of this Content Provider is to make the GPS Tracking information uniformly available to this application and even other applications. The GPS-tracking database can hold, tracks, segments or waypoints

A track is an actual route taken from start to finish. All the GPS locations collected are waypoints. Waypoints taken in sequence without loss of GPS-signal are considered connected and are grouped in segments. A route is build up out of 1 or more segments.

For example:
content://nl.sogeti.android.gpstracker/tracks is the URI that returns all the stored tracks or starts a new track on insert

content://nl.sogeti.android.gpstracker/tracks/2 is the URI string that would return a single result row, the track with ID = 23.

content://nl.sogeti.android.gpstracker/tracks/2/segments is the URI that returns all the stored segments of a track with ID = 2 or starts a new segment on insert

content://nl.sogeti.android.gpstracker/tracks/2/waypoints is the URI that returns all the stored waypoints of a track with ID = 2

content://nl.sogeti.android.gpstracker/tracks/2/segments is the URI that returns all the stored segments of a track with ID = 2

content://nl.sogeti.android.gpstracker/tracks/2/segments/3 is the URI string that would return a single result row, the segment with ID = 3 of a track with ID = 2 .

content://nl.sogeti.android.gpstracker/tracks/2/segments/1/waypoints is the URI that returns all the waypoints of a segment 1 of track 2.

content://nl.sogeti.android.gpstracker/tracks/2/segments/1/waypoints/52 is the URI string that would return a single result row, the waypoint with ID = 52

Media is stored under a waypoint and may be queried as:
content://nl.sogeti.android.gpstracker/tracks/2/segments/3/waypoints/22/media

All media for a segment can be queried with:
content://nl.sogeti.android.gpstracker/tracks/2/segments/3/media

All media for a track can be queried with:
content://nl.sogeti.android.gpstracker/tracks/2/media

The whole set of collected media may be queried as:
content://nl.sogeti.android.gpstracker/media

A single media is stored with an ID, for instance ID = 12:
content://nl.sogeti.android.gpstracker/media/12

Version:
$Id: GPStrackingProvider.java 456 2010-03-14 13:54:21Z rcgroot $
Author:
rene (c) Jan 22, 2009, Sogeti B.V.

Constructor Summary
GPStrackingProvider()
           
 
Method Summary
 int delete(Uri uri, String selection, String[] selectionArgs)
          (non-Javadoc)
 String getType(Uri uri)
          (non-Javadoc)
 Uri insert(Uri uri, ContentValues values)
          (non-Javadoc)
 boolean onCreate()
          (non-Javadoc)
 Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
          (non-Javadoc)
 int update(Uri uri, ContentValues givenValues, String selection, String[] selectionArgs)
          (non-Javadoc)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPStrackingProvider

public GPStrackingProvider()
Method Detail

delete

public int delete(Uri uri,
                  String selection,
                  String[] selectionArgs)
(non-Javadoc)

See Also:
ContentProvider

getType

public String getType(Uri uri)
(non-Javadoc)

See Also:
ContentProvider

insert

public Uri insert(Uri uri,
                  ContentValues values)
(non-Javadoc)

See Also:
ContentProvider

onCreate

public boolean onCreate()
(non-Javadoc)

See Also:
ContentProvider

query

public Cursor query(Uri uri,
                    String[] projection,
                    String selection,
                    String[] selectionArgs,
                    String sortOrder)
(non-Javadoc)

See Also:
ContentProvider

update

public int update(Uri uri,
                  ContentValues givenValues,
                  String selection,
                  String[] selectionArgs)
(non-Javadoc)

See Also:
ContentProvider