Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder Class Reference

Classes

interface  ParserWithError
 
interface  WaypointFilterQueryCallBack
 

Static Public Member Functions

static List< WaypointgetAllWaypoints (SleuthkitCase skCase) throws GeoLocationDataException
 
static void getAllWaypoints (SleuthkitCase skCase, List< DataSource > dataSources, List< ARTIFACT_TYPE > artifactTypes, boolean showAll, int cntDaysFromRecent, boolean noTimeStamp, WaypointFilterQueryCallBack queryCallBack) throws GeoLocationDataException
 
static List< AreagetAreas (List< Waypoint > waypoints)
 
static List< WaypointgetBookmarkWaypoints (SleuthkitCase skCase) throws GeoLocationDataException
 
static List< WaypointgetBookmarkWaypoints (List< Waypoint > waypoints)
 
static List< WaypointgetEXIFWaypoints (SleuthkitCase skCase) throws GeoLocationDataException
 
static List< WaypointgetEXIFWaypoints (List< Waypoint > waypoints)
 
static List< WaypointgetLastKnownWaypoints (SleuthkitCase skCase) throws GeoLocationDataException
 
static List< WaypointgetLastKnownWaypoints (List< Waypoint > waypoints)
 
static List< RoutegetRoutes (List< Waypoint > waypoints)
 
static List< WaypointgetSearchWaypoints (SleuthkitCase skCase) throws GeoLocationDataException
 
static List< WaypointgetSearchWaypoints (List< Waypoint > waypoints)
 
static List< WaypointgetTrackpointWaypoints (SleuthkitCase skCase) throws GeoLocationDataException
 
static List< WaypointgetTrackpointWaypoints (List< Waypoint > waypoints)
 
static List< TrackgetTracks (List< Waypoint > waypoints)
 

Private Member Functions

 WaypointBuilder ()
 

Static Private Member Functions

static String buildQuery (List< DataSource > dataSources, boolean showAll, int cntDaysFromRecent, boolean noTimeStamp)
 
static String buildQueryForWaypointsWOTimeStamps (List< DataSource > dataSources)
 
static GeoLocationParseResult< WaypointgetWaypointForArtifact (BlackboardArtifact artifact, ARTIFACT_TYPE type)
 
static String getWaypointListQuery (List< DataSource > dataSources)
 
static GeoLocationParseResult< WaypointparseWaypoint (ParserWithError< Waypoint > parser, BlackboardArtifact artifact)
 
static GeoLocationParseResult< WaypointparseWaypoints (ParserWithError< List< Waypoint >> parser, BlackboardArtifact artifact)
 

Static Private Attributes

static final String GEO_ARTIFACT_QUERY
 
static final String GEO_ARTIFACT_QUERY_ID_ONLY
 
static final String GEO_ARTIFACT_WITH_DATA_SOURCES_QUERY
 
static final String GEO_ATTRIBUTE_TYPE_IDS
 
static final Logger logger = Logger.getLogger(WaypointBuilder.class.getName())
 
static final String MOST_RECENT_TIME
 
static final String SELECT_WO_TIMESTAMP
 
static final String TIME_TYPE_IDS
 

Detailed Description

Class for building lists of waypoints.

Definition at line 41 of file WaypointBuilder.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.WaypointBuilder ( )
private

private constructor

Definition at line 109 of file WaypointBuilder.java.

Member Function Documentation

static String org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.buildQuery ( List< DataSource >  dataSources,
boolean  showAll,
int  cntDaysFromRecent,
boolean  noTimeStamp 
)
staticprivate

Build the query to filter the list of waypoints.

If showAll is true, the values of cntDaysFromRecent and noTimeStamp are ignored.

Parameters
dataSourcesThis of data sources to filter the waypoints by. Pass a null or empty list to show way points for all dataSources.
showAllTrue to get all waypoints.
cntDaysFromRecentNumber of days from the most recent time stamp to get waypoints for. This parameter will be ignored if showAll is true;
noTimeStampTrue to include waypoints without timestamp. This parameter will be ignored if showAll is true.
Returns

Definition at line 574 of file WaypointBuilder.java.

References org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.buildQueryForWaypointsWOTimeStamps(), org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.GEO_ARTIFACT_QUERY, org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getWaypointListQuery(), and org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.MOST_RECENT_TIME.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getAllWaypoints().

static String org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.buildQueryForWaypointsWOTimeStamps ( List< DataSource >  dataSources)
staticprivate

Create the query for getting a list of waypoints that do not have time stamps.

Parameters
dataSourcesList of data Sources to filter by
Returns
SQL SELECT statement

Definition at line 536 of file WaypointBuilder.java.

References org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.GEO_ARTIFACT_QUERY_ID_ONLY, org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getWaypointListQuery(), and org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.SELECT_WO_TIMESTAMP.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.buildQuery().

static List<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getAllWaypoints ( SleuthkitCase  skCase) throws GeoLocationDataException
static
static void org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getAllWaypoints ( SleuthkitCase  skCase,
List< DataSource >  dataSources,
List< ARTIFACT_TYPE >  artifactTypes,
boolean  showAll,
int  cntDaysFromRecent,
boolean  noTimeStamp,
WaypointFilterQueryCallBack  queryCallBack 
) throws GeoLocationDataException
static

Get a filtered list of waypoints.

If showAll is true, the values of cntDaysFromRecent and notTimeStamp will be ignored.

To include data from all dataSources pass a null or empty dataSource list.

Parameters
skCaseCurrently open sleuthkit case.
dataSourcesThis of data sources to filter the waypoints by. Pass a null or empty list to show way points for all dataSources.
artifactTypesList of types from which we want to get waypoints.
showAllTrue to get all waypoints.
cntDaysFromRecentNumber of days from the most recent time stamp to get waypoints for. This parameter will be ignored if showAll is true;
noTimeStampTrue to include waypoints without timestamp. This parameter will be ignored if showAll is true.
queryCallBackFunction to call after the DB query has completed.
Exceptions
GeoLocationDataException

Definition at line 490 of file WaypointBuilder.java.

References org.sleuthkit.autopsy.geolocation.datamodel.GeoLocationParseResult< T >.add(), org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.buildQuery(), and org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getWaypointForArtifact().

static List<Area> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getAreas ( List< Waypoint waypoints)
static

Returns a list of areas from the given list of waypoints.

Parameters
waypointsA list of waypoints
Returns
A list of areas or an empty list if none were found.

Definition at line 189 of file WaypointBuilder.java.

static List<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getBookmarkWaypoints ( SleuthkitCase  skCase) throws GeoLocationDataException
static

Gets a list of Waypoints for TSK_GPS_BOOKMARK artifacts.

Parameters
skCaseCurrently open SleuthkitCase
Returns
List of Waypoint
Exceptions
GeoLocationDataException

Definition at line 415 of file WaypointBuilder.java.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getAllWaypoints().

static List<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getBookmarkWaypoints ( List< Waypoint waypoints)
static

Returns a list of waypoints that come from TSK_GPS_LAST_KNOWN_LOCATION artifacts.

Parameters
waypointsA list of waypoints
Returns
A list of trackpoint waypoints or empty list if none were found.

Definition at line 445 of file WaypointBuilder.java.

static List<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getEXIFWaypoints ( SleuthkitCase  skCase) throws GeoLocationDataException
static

Gets a list of Waypoints for TSK_METADATA_EXIF artifacts.

Parameters
skCaseCurrently open SleuthkitCase
Returns
List of Waypoint
Exceptions
GeoLocationDataException

Definition at line 262 of file WaypointBuilder.java.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getAllWaypoints().

static List<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getEXIFWaypoints ( List< Waypoint waypoints)
static

Returns a list of waypoints that come from TSK_METADATA_EXIF artifacts.

Parameters
waypointsA list of waypoints
Returns
A list of trackpoint waypoints or empty list if none were found.

Definition at line 293 of file WaypointBuilder.java.

static List<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getLastKnownWaypoints ( SleuthkitCase  skCase) throws GeoLocationDataException
static

Gets a list of Waypoints for TSK_GPS_LAST_KNOWN_LOCATION artifacts.

Parameters
skCaseCurrently open SleuthkitCase
Returns
List of Waypoint
Exceptions
GeoLocationDataException

Definition at line 364 of file WaypointBuilder.java.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getAllWaypoints().

static List<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getLastKnownWaypoints ( List< Waypoint waypoints)
static

Returns a list of waypoints that come from TSK_GPS_LAST_KNOWN_LOCATION artifacts.

Parameters
waypointsA list of waypoints
Returns
A list of trackpoint waypoints or empty list if none were found.

Definition at line 394 of file WaypointBuilder.java.

static List<Route> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getRoutes ( List< Waypoint waypoints)
static

Returns a list of routes from the given list of waypoints.

Parameters
waypointsA list of waypoints
Returns
A list of routes or an empty list if none were found.

Definition at line 145 of file WaypointBuilder.java.

static List<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getSearchWaypoints ( SleuthkitCase  skCase) throws GeoLocationDataException
static

Gets a list of Waypoints for TSK_GPS_SEARCH artifacts.

Parameters
skCaseCurrently open SleuthkitCase
Returns
List of Waypoint
Exceptions
GeoLocationDataException

Definition at line 314 of file WaypointBuilder.java.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getAllWaypoints().

static List<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getSearchWaypoints ( List< Waypoint waypoints)
static

Returns a list of waypoints that come from TSK_GPS_SEARCH artifacts.

Parameters
waypointsA list of waypoints
Returns
A list of trackpoint waypoints or empty list if none were found.

Definition at line 343 of file WaypointBuilder.java.

static List<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getTrackpointWaypoints ( SleuthkitCase  skCase) throws GeoLocationDataException
static

Gets a list of Waypoints for TSK_GPS_TRACKPOINT artifacts.

Parameters
skCaseCurrently open SleuthkitCase
Returns
List of Waypoint
Exceptions
GeoLocationDataException

Definition at line 214 of file WaypointBuilder.java.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getAllWaypoints().

static List<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getTrackpointWaypoints ( List< Waypoint waypoints)
static

Returns a list of waypoints that come from TSK_GEO_TRACKPOINT artifacts.

Parameters
waypointsA list of waypoints
Returns
A list of trackpoint waypoints or empty list if none were found.

Definition at line 241 of file WaypointBuilder.java.

static List<Track> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getTracks ( List< Waypoint waypoints)
static

Returns a list of tracks from the given list of waypoints.

Parameters
waypointsA list of waypoints
Returns
A list of track or an empty list if none were found.

Definition at line 167 of file WaypointBuilder.java.

static GeoLocationParseResult<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getWaypointForArtifact ( BlackboardArtifact  artifact,
ARTIFACT_TYPE  type 
)
staticprivate

Create a Waypoint object for the given Blackboard artifact.

Parameters
artifactThe artifact to create the waypoint from
typeThe type of artifact
Returns
A new waypoint object

Definition at line 698 of file WaypointBuilder.java.

References org.sleuthkit.autopsy.geolocation.datamodel.GeoLocationParseResult< T >.add(), org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.parseWaypoint(), and org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.parseWaypoints().

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getAllWaypoints().

static String org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getWaypointListQuery ( List< DataSource >  dataSources)
staticprivate

Returns the query to get a list of waypoints filted by the given data sources.

An artifact is assumed to be a "waypoint" if it has the attributes TSK_GEO_LATITUDE or TSK_GEO_LATITUDE_START

Parameters
dataSourcesA list of data sources to filter by. If the list is null or empty the data source list will be ignored.
Returns

Definition at line 621 of file WaypointBuilder.java.

References org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.GEO_ARTIFACT_QUERY, and org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.GEO_ARTIFACT_WITH_DATA_SOURCES_QUERY.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.buildQuery(), and org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.buildQueryForWaypointsWOTimeStamps().

static GeoLocationParseResult<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.parseWaypoint ( ParserWithError< Waypoint parser,
BlackboardArtifact  artifact 
)
staticprivate

Parses one waypoint.

Parameters
parserThe parser to use.
artifactThe artifact to be parsed.
Returns
Returns a parse result that is either successful with a parsed waypoint or unsuccessful with an exception.

Definition at line 665 of file WaypointBuilder.java.

References org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.ParserWithError< T >.parse().

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getWaypointForArtifact().

static GeoLocationParseResult<Waypoint> org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.parseWaypoints ( ParserWithError< List< Waypoint >>  parser,
BlackboardArtifact  artifact 
)
staticprivate

Parses a list of waypoints.

Parameters
parserThe parser to use.
artifactThe artifact to be parsed.
Returns
Returns a parse result that is either successful with a parsed waypoint or unsuccessful with an exception.

Definition at line 682 of file WaypointBuilder.java.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getWaypointForArtifact().

Member Data Documentation

final String org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.GEO_ARTIFACT_QUERY
staticprivate
Initial value:
= "SELECT artifact_id, artifact_type_id "
+ "FROM blackboard_attributes "
+ "WHERE attribute_type_id IN (%s) "

Definition at line 57 of file WaypointBuilder.java.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.buildQuery(), and org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getWaypointListQuery().

final String org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.GEO_ARTIFACT_QUERY_ID_ONLY
staticprivate
Initial value:
= "SELECT artifact_id "
+ "FROM blackboard_attributes "
+ "WHERE attribute_type_id IN (%s) "

Definition at line 63 of file WaypointBuilder.java.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.buildQueryForWaypointsWOTimeStamps().

final String org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.GEO_ARTIFACT_WITH_DATA_SOURCES_QUERY
staticprivate
Initial value:
= "SELECT blackboard_attributes.artifact_id "
+ "FROM blackboard_attributes, blackboard_artifacts "
+ "WHERE blackboard_attributes.artifact_id = blackboard_artifacts.artifact_id "
+ "AND blackboard_attributes.attribute_type_id IN(%s) "
+ "AND data_source_obj_id IN (%s)"

Definition at line 69 of file WaypointBuilder.java.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.getWaypointListQuery().

final String org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.GEO_ATTRIBUTE_TYPE_IDS
staticprivate
Initial value:
= String.format("%d, %d, %d",
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE.getTypeID(),
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE_START.getTypeID(),
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_WAYPOINTS.getTypeID())

Definition at line 49 of file WaypointBuilder.java.

final Logger org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.logger = Logger.getLogger(WaypointBuilder.class.getName())
staticprivate

Definition at line 43 of file WaypointBuilder.java.

final String org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.MOST_RECENT_TIME
staticprivate
Initial value:
= "SELECT MAX(value_int64) - (%d * 86400)"
+ "FROM blackboard_attributes "
+ "WHERE attribute_type_id IN(%s) "
+ "AND artifact_id "
+ "IN ( "
+ "%s"
+ " )"

Definition at line 77 of file WaypointBuilder.java.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.buildQuery().

final String org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.SELECT_WO_TIMESTAMP
staticprivate
Initial value:
= "SELECT DISTINCT artifact_id, artifact_type_id "
+ "FROM blackboard_attributes "
+ "WHERE artifact_id NOT IN (%s) "
+ "AND artifact_id IN (%s)"

Definition at line 87 of file WaypointBuilder.java.

Referenced by org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.buildQueryForWaypointsWOTimeStamps().

final String org.sleuthkit.autopsy.geolocation.datamodel.WaypointBuilder.TIME_TYPE_IDS
staticprivate
Initial value:
= String.format("%d, %d",
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID(),
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID())

Definition at line 45 of file WaypointBuilder.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2022 Basis Technology. Generated on: Thu Oct 6 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.