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

Static Public Member Functions

static List< ResultgetFilesInGroup (String userName, List< AbstractFilter > filters, AttributeType groupAttributeType, Group.GroupSortingAlgorithm groupSortingType, ResultsSorter.SortingMethod fileSortingMethod, GroupKey groupKey, int startingEntry, int numberOfEntries, SleuthkitCase caseDb, CentralRepository centralRepoDb, SearchContext context) throws DiscoveryException, SearchCancellationException
 
static Map< GroupKey, Integer > getGroupSizes (String userName, List< AbstractFilter > filters, AttributeType groupAttributeType, Group.GroupSortingAlgorithm groupSortingType, ResultsSorter.SortingMethod fileSortingMethod, SleuthkitCase caseDb, CentralRepository centralRepoDb, SearchContext context) throws DiscoveryException, SearchCancellationException
 
static Map< GroupKey, List< Result > > runFileSearch (String userName, List< AbstractFilter > filters, AttributeType groupAttributeType, Group.GroupSortingAlgorithm groupSortingType, ResultsSorter.SortingMethod fileSortingMethod, SleuthkitCase caseDb, CentralRepository centralRepoDb, SearchContext context) throws DiscoveryException, SearchCancellationException
 
static TextSummary summarize (AbstractFile file)
 

Private Member Functions

 FileSearch ()
 

Static Private Member Functions

static void addAttributes (List< AttributeType > attrs, List< Result > results, SleuthkitCase caseDb, CentralRepository centralRepoDb, SearchContext context) throws DiscoveryException, SearchCancellationException
 

Static Private Attributes

static final Logger logger = Logger.getLogger(FileSearch.class.getName())
 
static final int MAXIMUM_CACHE_SIZE = 10
 
static final Cache< SearchKey, Map< GroupKey, List< Result > > > searchCache
 

Detailed Description

Main class to perform the file search.

Definition at line 44 of file FileSearch.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.discovery.search.FileSearch.FileSearch ( )
private

Definition at line 330 of file FileSearch.java.

Member Function Documentation

static void org.sleuthkit.autopsy.discovery.search.FileSearch.addAttributes ( List< AttributeType attrs,
List< Result results,
SleuthkitCase  caseDb,
CentralRepository  centralRepoDb,
SearchContext  context 
) throws DiscoveryException, SearchCancellationException
staticprivate

Add any attributes corresponding to the attribute list to the given result files. For example, specifying the KeywordListAttribute will populate the list of keyword set names in the ResultFile objects.

Parameters
attrsThe attributes to add to the list of result files
resultsThe result files
caseDbThe case database
centralRepoDbThe central repository database. Can be null if not needed.
contextThe SearchContext the search is being performed from.
Exceptions
DiscoveryException
SearchCancellationException- Thrown when the user has cancelled the search.

Definition at line 323 of file FileSearch.java.

Referenced by org.sleuthkit.autopsy.discovery.search.FileSearch.runFileSearch().

static List<Result> org.sleuthkit.autopsy.discovery.search.FileSearch.getFilesInGroup ( String  userName,
List< AbstractFilter filters,
AttributeType  groupAttributeType,
Group.GroupSortingAlgorithm  groupSortingType,
ResultsSorter.SortingMethod  fileSortingMethod,
GroupKey  groupKey,
int  startingEntry,
int  numberOfEntries,
SleuthkitCase  caseDb,
CentralRepository  centralRepoDb,
SearchContext  context 
) throws DiscoveryException, SearchCancellationException
static

Get the files from the specified group from the cache, if the the group was not cached perform a search caching the groups.

Parameters
userNameThe name of the user performing the search.
filtersThe filters to apply
groupAttributeTypeThe attribute to use for grouping
groupSortingTypeThe method to use to sort the groups
fileSortingMethodThe method to use to sort the files within the groups
groupKeyThe key which uniquely identifies the group to get entries from
startingEntryThe first entry to return
numberOfEntriesThe number of entries to return
caseDbThe case database
centralRepoDbThe central repository database. Can be null if not needed.
contextThe SearchContext the search is being performed from.
Returns
A LinkedHashMap grouped and sorted according to the parameters
Exceptions
DiscoveryException
SearchCancellationException- Thrown when the user has cancelled the search.

Definition at line 174 of file FileSearch.java.

References org.sleuthkit.autopsy.discovery.search.FileSearch.runFileSearch(), and org.sleuthkit.autopsy.discovery.search.FileSearch.searchCache.

static Map<GroupKey, Integer> org.sleuthkit.autopsy.discovery.search.FileSearch.getGroupSizes ( String  userName,
List< AbstractFilter filters,
AttributeType  groupAttributeType,
Group.GroupSortingAlgorithm  groupSortingType,
ResultsSorter.SortingMethod  fileSortingMethod,
SleuthkitCase  caseDb,
CentralRepository  centralRepoDb,
SearchContext  context 
) throws DiscoveryException, SearchCancellationException
static

Run the file search to get the group keys and sizes. Clears cache of search results, caching new results for access at later time.

Parameters
userNameThe name of the user performing the search.
filtersThe filters to apply
groupAttributeTypeThe attribute to use for grouping
groupSortingTypeThe method to use to sort the groups
fileSortingMethodThe method to use to sort the files within the groups
caseDbThe case database
centralRepoDbThe central repository database. Can be null if not needed.
contextThe SearchContext the search is being performed from.
Returns
A LinkedHashMap grouped and sorted according to the parameters
Exceptions
DiscoveryException
SearchCancellationException- Thrown when the user has cancelled the search.

Definition at line 130 of file FileSearch.java.

References org.sleuthkit.autopsy.discovery.search.FileSearch.runFileSearch().

static Map<GroupKey, List<Result> > org.sleuthkit.autopsy.discovery.search.FileSearch.runFileSearch ( String  userName,
List< AbstractFilter filters,
AttributeType  groupAttributeType,
Group.GroupSortingAlgorithm  groupSortingType,
ResultsSorter.SortingMethod  fileSortingMethod,
SleuthkitCase  caseDb,
CentralRepository  centralRepoDb,
SearchContext  context 
) throws DiscoveryException, SearchCancellationException
static

Run the file search. Caching new results for access at later time.

Parameters
userNameThe name of the user performing the search.
filtersThe filters to apply
groupAttributeTypeThe attribute to use for grouping
groupSortingTypeThe method to use to sort the groups
fileSortingMethodThe method to use to sort the files within the groups
caseDbThe case database
centralRepoDbThe central repository database. Can be null if not needed.
contextThe SearchContext the search is being performed from.
Returns
A LinkedHashMap grouped and sorted according to the parameters
Exceptions
DiscoveryException
SearchCancellationException- Thrown when the user has cancelled the search.

Definition at line 273 of file FileSearch.java.

References org.sleuthkit.autopsy.discovery.search.FileSearch.addAttributes(), and org.sleuthkit.autopsy.discovery.search.FileSearch.searchCache.

Referenced by org.sleuthkit.autopsy.discovery.search.FileSearch.getFilesInGroup(), and org.sleuthkit.autopsy.discovery.search.FileSearch.getGroupSizes().

static TextSummary org.sleuthkit.autopsy.discovery.search.FileSearch.summarize ( AbstractFile  file)
static

Get a summary for the specified AbstractFile. If no TextSummarizers exist get the beginning of the file.

Parameters
fileThe AbstractFile to summarize.
Returns
The summary or beginning of the specified file as a String.

Definition at line 231 of file FileSearch.java.

References org.sleuthkit.autopsy.textsummarizer.TextSummary.getSummaryText(), org.sleuthkit.autopsy.discovery.search.FileSearch.searchCache, and org.sleuthkit.autopsy.textsummarizer.TextSummarizer.summarize().

Referenced by org.sleuthkit.autopsy.discovery.ui.ResultsPanel.DocumentPreviewWorker.doInBackground().

Member Data Documentation

final Logger org.sleuthkit.autopsy.discovery.search.FileSearch.logger = Logger.getLogger(FileSearch.class.getName())
staticprivate

Definition at line 46 of file FileSearch.java.

final int org.sleuthkit.autopsy.discovery.search.FileSearch.MAXIMUM_CACHE_SIZE = 10
staticprivate

Definition at line 47 of file FileSearch.java.

final Cache<SearchKey, Map<GroupKey, List<Result> > > org.sleuthkit.autopsy.discovery.search.FileSearch.searchCache
staticprivate

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

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