Autopsy  4.16.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.report.modules.kml.KMLReport Class Reference

Inherits org.sleuthkit.autopsy.report.GeneralReportModule.

Classes

enum  FeatureColor
 

Public Member Functions

default void generateReport (String baseReportDir, ReportProgressPanel progressPanel)
 
void generateReport (String baseReportDir, ReportProgressPanel progressPanel, List< Waypoint > waypointList)
 
void generateReport (GeneralReportSettings settings, ReportProgressPanel progressPanel)
 
default ReportModuleSettings getConfiguration ()
 
JPanel getConfigurationPanel ()
 
default ReportModuleSettings getDefaultConfiguration ()
 
String getDescription ()
 
String getName ()
 
String getRelativeFilePath ()
 
default void setConfiguration (ReportModuleSettings settings)
 
boolean supportsDataSourceSelection ()
 

Static Public Member Functions

static synchronized KMLReport getDefault ()
 

Private Member Functions

 KMLReport ()
 
void addRouteToReport (Route route)
 
void addTrackToReport (Track track)
 
void copyFileUsingStream (AbstractFile inputFile, File outputFile) throws ReadContentInputStreamException, IOException
 
String formatAttribute (String title, String value)
 
String formattedCoordinates (Double latitude, Double longitude)
 
String getFormattedDetails (Waypoint point, String header)
 
String getFormattedDetails (Route route)
 
String getTimeStamp (long timeStamp)
 
Element makeLineString (Double startLatitude, Double startLongitude, Double stopLatitude, Double stopLongitude)
 
Element makePlacemark (String name, FeatureColor color, String description, Long timestamp, Element feature, String coordinates)
 
Element makePlacemarkWithPicture (String name, FeatureColor color, String description, Long timestamp, Element feature, Path path, String coordinates)
 
Element makePoint (Waypoint point)
 
Element makePoint (Double latitude, Double longitude, Double altitude)
 
Document setupReportDocument ()
 
boolean shouldFilterFromReport (Content content) throws TskCoreException
 

Static Private Member Functions

static String removeLeadingImgAndVol (String uniquePath)
 

Private Attributes

Case currentCase
 
Element gpsBookmarksFolder
 
Element gpsExifMetadataFolder
 
Element gpsLastKnownLocationFolder
 
Element gpsRouteFolder
 
Element gpsSearchesFolder
 
Element gpsTrackpointsFolder
 
Element gpsTracksFolder
 
final SimpleDateFormat kmlDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX")
 
Namespace ns
 
GeneralReportSettings settings
 
SleuthkitCase skCase
 
List< WaypointwaypointList = null
 

Static Private Attributes

static final String HTML_PROP_FORMAT = "<b>%s: </b>%s<br>"
 
static KMLReport instance = null
 
static final String KML_STYLE_FILE = "style.kml"
 
static final Logger logger = Logger.getLogger(KMLReport.class.getName())
 
static final String REPORT_KML = "ReportKML.kml"
 
static final String STYLESHEETS_PATH = "/org/sleuthkit/autopsy/report/stylesheets/"
 

Detailed Description

Generates a KML file based on geospatial information from the BlackBoard.

Definition at line 67 of file KMLReport.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.report.modules.kml.KMLReport.KMLReport ( )
private

Member Function Documentation

void org.sleuthkit.autopsy.report.modules.kml.KMLReport.addRouteToReport ( Route  route)
private
void org.sleuthkit.autopsy.report.modules.kml.KMLReport.addTrackToReport ( Track  track)
private
void org.sleuthkit.autopsy.report.modules.kml.KMLReport.copyFileUsingStream ( AbstractFile  inputFile,
File  outputFile 
) throws ReadContentInputStreamException, IOException
private

Extracts the file to the output folder.

Parameters
inputFileThe input AbstractFile to copy
outputFilethe output file
Exceptions
ReadContentInputStreamExceptionWhen a read error occurs.
IOExceptionWhen a general file exception occurs.

Definition at line 756 of file KMLReport.java.

String org.sleuthkit.autopsy.report.modules.kml.KMLReport.formatAttribute ( String  title,
String  value 
)
private

Returns a HTML formatted string with the given title and value.

Parameters
title
value
Returns
HTML formatted string

Definition at line 866 of file KMLReport.java.

Referenced by org.sleuthkit.autopsy.report.modules.kml.KMLReport.getFormattedDetails().

String org.sleuthkit.autopsy.report.modules.kml.KMLReport.formattedCoordinates ( Double  latitude,
Double  longitude 
)
private

Helper functions for consistently formatting longitude and latitude.

Parameters
latitudeDouble latitude value
longitudeDouble longitude value
Returns
String Nicely formatted double values separated by a comma

Definition at line 929 of file KMLReport.java.

Referenced by org.sleuthkit.autopsy.report.modules.kml.KMLReport.addRouteToReport(), and org.sleuthkit.autopsy.report.modules.kml.KMLReport.addTrackToReport().

default void org.sleuthkit.autopsy.report.GeneralReportModule.generateReport ( String  baseReportDir,
ReportProgressPanel  progressPanel 
)
inherited

Called to generate the report. Method is responsible for saving the file at the path specified and updating progress via the progressPanel object.

Parameters
baseReportDirBase directory that reports are being stored in. Report should go into baseReportDir + getRelativeFilePath().
progressPanelpanel to update the report's progress with
Deprecated:
Use generateReport(GeneralReportSettings settings, ReportProgressPanel progressPanel) instead. The baseReportDir is stored in the settings instance.

Implemented in org.sleuthkit.autopsy.report.GeneralReportModuleAdapter.

Definition at line 36 of file GeneralReportModule.java.

Referenced by org.sleuthkit.autopsy.report.GeneralReportModule.generateReport().

void org.sleuthkit.autopsy.report.modules.kml.KMLReport.generateReport ( String  baseReportDir,
ReportProgressPanel  progressPanel,
List< Waypoint waypointList 
)

Generates a body file format report for use with the MAC time tool.

Parameters
baseReportDirpath to save the report
progressPanelpanel to update the report's progress
waypointList

Definition at line 160 of file KMLReport.java.

References org.sleuthkit.autopsy.report.GeneralReportSettings.setReportDirectoryPath(), and org.sleuthkit.autopsy.report.modules.kml.KMLReport.waypointList.

Referenced by org.sleuthkit.autopsy.geolocation.GeolocationTopComponent.reportButtonActionPerformed().

void org.sleuthkit.autopsy.report.modules.kml.KMLReport.generateReport ( GeneralReportSettings  settings,
ReportProgressPanel  progressPanel 
)

Called to generate the report. Method is responsible for saving the file and updating progress via the progressPanel object. Configuration parameters are passed in the settings class, most notably the directory to save the report. Modules should try to respond to all configuration parameters.

Parameters
settingsConfiguration parameters to customize the report generation process
progressPanelpanel to update the report's progress with

Implements org.sleuthkit.autopsy.report.GeneralReportModule.

Definition at line 173 of file KMLReport.java.

References org.sleuthkit.autopsy.casemodule.Case.addReport(), org.sleuthkit.autopsy.report.ReportProgressPanel.ReportStatus.COMPLETE, org.sleuthkit.autopsy.report.ReportProgressPanel.complete(), org.sleuthkit.autopsy.report.ReportProgressPanel.ReportStatus.ERROR, org.sleuthkit.autopsy.casemodule.Case.getCurrentCaseThrows(), org.sleuthkit.autopsy.casemodule.Case.getDataSources(), org.sleuthkit.autopsy.report.GeneralReportSettings.getReportDirectoryPath(), org.sleuthkit.autopsy.report.GeneralReportSettings.getSelectedDataSources(), org.sleuthkit.autopsy.casemodule.Case.getSleuthkitCase(), org.sleuthkit.autopsy.report.modules.kml.KMLReport.REPORT_KML, org.sleuthkit.autopsy.report.ReportProgressPanel.setIndeterminate(), org.sleuthkit.autopsy.report.GeneralReportSettings.setSelectedDataSources(), org.sleuthkit.autopsy.report.modules.kml.KMLReport.settings, org.sleuthkit.autopsy.report.modules.kml.KMLReport.setupReportDocument(), org.sleuthkit.autopsy.report.ReportProgressPanel.start(), and org.sleuthkit.autopsy.report.ReportProgressPanel.updateStatusLabel().

default ReportModuleSettings org.sleuthkit.autopsy.report.ReportModule.getConfiguration ( )
inherited

Get current configuration for this report module.

Returns
Object which contains current report module settings.

Implemented in org.sleuthkit.autopsy.report.modules.stix.STIXReportModule, org.sleuthkit.autopsy.report.modules.html.HTMLReport, and org.sleuthkit.autopsy.report.modules.taggedhashes.SaveTaggedHashesToHashDb.

Definition at line 79 of file ReportModule.java.

JPanel org.sleuthkit.autopsy.report.modules.kml.KMLReport.getConfigurationPanel ( )

Returns the configuration panel for the report, which is displayed in the report configuration step of the report wizard.

Returns
Configuration panel or null if the module does not need configuration.

Implements org.sleuthkit.autopsy.report.ReportModule.

Definition at line 786 of file KMLReport.java.

static synchronized KMLReport org.sleuthkit.autopsy.report.modules.kml.KMLReport.getDefault ( )
static
default ReportModuleSettings org.sleuthkit.autopsy.report.ReportModule.getDefaultConfiguration ( )
inherited
String org.sleuthkit.autopsy.report.modules.kml.KMLReport.getDescription ( )

Gets a one-line, user friendly description of the type of report this module generates.

Implements org.sleuthkit.autopsy.report.ReportModule.

Definition at line 780 of file KMLReport.java.

String org.sleuthkit.autopsy.report.modules.kml.KMLReport.getFormattedDetails ( Waypoint  point,
String  header 
)
private
String org.sleuthkit.autopsy.report.modules.kml.KMLReport.getFormattedDetails ( Route  route)
private
String org.sleuthkit.autopsy.report.modules.kml.KMLReport.getName ( )

Get the name of the report this module generates.

Implements org.sleuthkit.autopsy.report.ReportModule.

Definition at line 769 of file KMLReport.java.

String org.sleuthkit.autopsy.report.modules.kml.KMLReport.getRelativeFilePath ( )

Gets the relative path of the report file, if any, generated by this module. The path should be relative to the location that gets passed in to generateReport() (or similar).

Returns
Relative path to where report will be stored. Return an empty string if the location passed to generateReport() is the output location. Return null to indicate that there is no report file.

Implements org.sleuthkit.autopsy.report.ReportModule.

Definition at line 775 of file KMLReport.java.

String org.sleuthkit.autopsy.report.modules.kml.KMLReport.getTimeStamp ( long  timeStamp)
private

Format a point time stamp (in seconds) to the report format.

Parameters
timeStampThe timestamp in epoch seconds.
Returns
The formatted timestamp

Definition at line 581 of file KMLReport.java.

Referenced by org.sleuthkit.autopsy.report.modules.kml.KMLReport.getFormattedDetails(), org.sleuthkit.autopsy.report.modules.kml.KMLReport.makePlacemark(), and org.sleuthkit.autopsy.report.modules.kml.KMLReport.makePlacemarkWithPicture().

Element org.sleuthkit.autopsy.report.modules.kml.KMLReport.makeLineString ( Double  startLatitude,
Double  startLongitude,
Double  stopLatitude,
Double  stopLongitude 
)
private

Create a LineString for use in a Placemark. Note in this method, start and stop altitudes get ignored, as Google Earth apparently has trouble using altitudes for LineStrings, though the parameters are still in the call.

If null values are pass for the latitudes or longitudes a line will not be drawn.

Parameters
startLatitudeStarting latitude
startLongitudeStarting longitude
stopLatitudeEnding latitude
stopLongitudeEnding longitude
Returns
the Line as an Element

Definition at line 649 of file KMLReport.java.

Referenced by org.sleuthkit.autopsy.report.modules.kml.KMLReport.addRouteToReport().

Element org.sleuthkit.autopsy.report.modules.kml.KMLReport.makePlacemark ( String  name,
FeatureColor  color,
String  description,
Long  timestamp,
Element  feature,
String  coordinates 
)
private

Make a Placemark for use in displaying features. Takes a coordinate-bearing feature (Point, LineString, etc) and places it in the Placemark element.

Parameters
namePlacemark name
colorPlacemark color
descriptionDescription for the info bubble on the map
timestampPlacemark timestamp
featureThe feature to show. Could be Point, LineString, etc.
coordinatesThe coordinates to display in the list view snippet
Returns
the entire KML placemark

Definition at line 679 of file KMLReport.java.

References org.sleuthkit.autopsy.report.modules.kml.KMLReport.FeatureColor.getColor(), and org.sleuthkit.autopsy.report.modules.kml.KMLReport.getTimeStamp().

Referenced by org.sleuthkit.autopsy.report.modules.kml.KMLReport.addRouteToReport(), and org.sleuthkit.autopsy.report.modules.kml.KMLReport.addTrackToReport().

Element org.sleuthkit.autopsy.report.modules.kml.KMLReport.makePlacemarkWithPicture ( String  name,
FeatureColor  color,
String  description,
Long  timestamp,
Element  feature,
Path  path,
String  coordinates 
)
private

Make a Placemark for use in displaying features. Takes a coordinate-bearing feature (Point, LineString, etc) and places it in the Placemark element.

Parameters
namePlacemark file name
colorPlacemark color
descriptionDescription for the info bubble on the map
timestampPlacemark timestamp
featureThe feature to show. Could be Point, LineString, etc.
pathThe path to the file in the source image
coordinatesThe coordinates to display in the list view snippet
Returns
the entire KML Placemark, including a picture.

Definition at line 717 of file KMLReport.java.

References org.sleuthkit.autopsy.report.modules.kml.KMLReport.FeatureColor.getColor(), and org.sleuthkit.autopsy.report.modules.kml.KMLReport.getTimeStamp().

Element org.sleuthkit.autopsy.report.modules.kml.KMLReport.makePoint ( Waypoint  point)
private
Element org.sleuthkit.autopsy.report.modules.kml.KMLReport.makePoint ( Double  latitude,
Double  longitude,
Double  altitude 
)
private

Create a Point for use in a Placemark. Note in this method altitude is ignored, as Google Earth apparently has trouble using altitudes for LineStrings, though the parameters are still in the call.

Parameters
latitudepoint latitude
longitudepoint longitude
altitudepoint altitude. Currently ignored.
Returns
the Point as an Element

Definition at line 607 of file KMLReport.java.

static String org.sleuthkit.autopsy.report.modules.kml.KMLReport.removeLeadingImgAndVol ( String  uniquePath)
staticprivate

This is a smash-n-grab from AbstractFile.createNonUniquePath(String). This method is intended to be removed when img_ and vol_ are no longer added to images and volumes respectively, OR when AbstractFile is sorted out with respect to this.

Parameters
uniquePathThe path to sanitize.
Returns
path without leading img_/vol_ in position 0 or 1 respectively.

Definition at line 800 of file KMLReport.java.

default void org.sleuthkit.autopsy.report.ReportModule.setConfiguration ( ReportModuleSettings  settings)
inherited
Document org.sleuthkit.autopsy.report.modules.kml.KMLReport.setupReportDocument ( )
private
boolean org.sleuthkit.autopsy.report.modules.kml.KMLReport.shouldFilterFromReport ( Content  content) throws TskCoreException
private

Indicates if the content should be filtered from the report.

Definition at line 940 of file KMLReport.java.

References org.sleuthkit.autopsy.report.GeneralReportSettings.getSelectedDataSources().

boolean org.sleuthkit.autopsy.report.modules.kml.KMLReport.supportsDataSourceSelection ( )

Determines if the module supports report generation on a subset of data sources in a case. Defaults to false. The data source selections are stored in the GeneralReportSettings instance.

Returns
True if the module can be configured to run on a subset of data sources.

Implements org.sleuthkit.autopsy.report.GeneralReportModule.

Definition at line 168 of file KMLReport.java.

Member Data Documentation

Case org.sleuthkit.autopsy.report.modules.kml.KMLReport.currentCase
private

Definition at line 74 of file KMLReport.java.

Element org.sleuthkit.autopsy.report.modules.kml.KMLReport.gpsBookmarksFolder
private

Definition at line 81 of file KMLReport.java.

Element org.sleuthkit.autopsy.report.modules.kml.KMLReport.gpsExifMetadataFolder
private

Definition at line 80 of file KMLReport.java.

Element org.sleuthkit.autopsy.report.modules.kml.KMLReport.gpsLastKnownLocationFolder
private

Definition at line 82 of file KMLReport.java.

Element org.sleuthkit.autopsy.report.modules.kml.KMLReport.gpsRouteFolder
private

Definition at line 83 of file KMLReport.java.

Element org.sleuthkit.autopsy.report.modules.kml.KMLReport.gpsSearchesFolder
private

Definition at line 84 of file KMLReport.java.

Element org.sleuthkit.autopsy.report.modules.kml.KMLReport.gpsTrackpointsFolder
private

Definition at line 85 of file KMLReport.java.

Element org.sleuthkit.autopsy.report.modules.kml.KMLReport.gpsTracksFolder
private

Definition at line 86 of file KMLReport.java.

final String org.sleuthkit.autopsy.report.modules.kml.KMLReport.HTML_PROP_FORMAT = "<b>%s: </b>%s<br>"
staticprivate

Definition at line 78 of file KMLReport.java.

KMLReport org.sleuthkit.autopsy.report.modules.kml.KMLReport.instance = null
staticprivate
final String org.sleuthkit.autopsy.report.modules.kml.KMLReport.KML_STYLE_FILE = "style.kml"
staticprivate

Definition at line 70 of file KMLReport.java.

final SimpleDateFormat org.sleuthkit.autopsy.report.modules.kml.KMLReport.kmlDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX")
private

Definition at line 76 of file KMLReport.java.

final Logger org.sleuthkit.autopsy.report.modules.kml.KMLReport.logger = Logger.getLogger(KMLReport.class.getName())
staticprivate

Definition at line 69 of file KMLReport.java.

Namespace org.sleuthkit.autopsy.report.modules.kml.KMLReport.ns
private

Definition at line 77 of file KMLReport.java.

final String org.sleuthkit.autopsy.report.modules.kml.KMLReport.REPORT_KML = "ReportKML.kml"
staticprivate
GeneralReportSettings org.sleuthkit.autopsy.report.modules.kml.KMLReport.settings
private
SleuthkitCase org.sleuthkit.autopsy.report.modules.kml.KMLReport.skCase
private

Definition at line 75 of file KMLReport.java.

final String org.sleuthkit.autopsy.report.modules.kml.KMLReport.STYLESHEETS_PATH = "/org/sleuthkit/autopsy/report/stylesheets/"
staticprivate

Definition at line 72 of file KMLReport.java.

List<Waypoint> org.sleuthkit.autopsy.report.modules.kml.KMLReport.waypointList = null
private

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

Copyright © 2012-2020 Basis Technology. Generated on: Tue Sep 22 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.