Merge branch '3668-intra-case-correlation-content-viewer' of https://github.com/briangsweeney/autopsy into 3668-intra-case-correlation-content-viewer

This commit is contained in:
Andrew Ziehl 2018-05-02 11:41:47 -07:00
commit fd8bbb5e66
9 changed files with 21 additions and 16 deletions

View File

@ -29,7 +29,9 @@ final class AllDataSourcesCommonFilesAlgorithm extends CommonFilesMetadataBuilde
private static final String WHERE_CLAUSE = "%s md5 in (select md5 from tsk_files where (known != 1 OR known IS NULL)%s GROUP BY md5 HAVING COUNT(*) > 1) order by md5"; //NON-NLS private static final String WHERE_CLAUSE = "%s md5 in (select md5 from tsk_files where (known != 1 OR known IS NULL)%s GROUP BY md5 HAVING COUNT(*) > 1) order by md5"; //NON-NLS
/** /**
* Implements the algorithm for getting common files across all data sources. * Implements the algorithm for getting common files across all data
* sources.
*
* @param dataSourceIdMap a map of obj_id to datasource name * @param dataSourceIdMap a map of obj_id to datasource name
* @param filterByMediaMimeType match only on files whose mime types can be broadly categorized as media types * @param filterByMediaMimeType match only on files whose mime types can be broadly categorized as media types
* @param filterByDocMimeType match only on files whose mime types can be broadly categorized as document types * @param filterByDocMimeType match only on files whose mime types can be broadly categorized as document types

View File

@ -32,6 +32,7 @@ final class CommonFilesMetadata {
/** /**
* Create meta dat object which can be handed off to the node factories * Create meta dat object which can be handed off to the node factories
*
* @param metadata map of md5 to parent-level node meta data * @param metadata map of md5 to parent-level node meta data
*/ */
CommonFilesMetadata(Map<String, Md5Metadata> metadata) { CommonFilesMetadata(Map<String, Md5Metadata> metadata) {

View File

@ -244,11 +244,12 @@ abstract class CommonFilesMetadataBuilder {
"CommonFilesMetadataBuilder.buildCategorySelectionString.media=Media", "CommonFilesMetadataBuilder.buildCategorySelectionString.media=Media",
"CommonFilesMetadataBuilder.buildCategorySelectionString.all=All File Categories" "CommonFilesMetadataBuilder.buildCategorySelectionString.all=All File Categories"
}) })
protected String buildCategorySelectionString() { protected String buildCategorySelectionString() {
if (!this.filterByDoc && !this.filterByMedia) { if (!this.filterByDoc && !this.filterByMedia) {
return Bundle.CommonFilesMetadataBuilder_buildCategorySelectionString_all(); return Bundle.CommonFilesMetadataBuilder_buildCategorySelectionString_all();
} else { } else {
List<String> filters = new ArrayList<String>(); List<String> filters = new ArrayList<>();
if (this.filterByDoc) { if (this.filterByDoc) {
filters.add(Bundle.CommonFilesMetadataBuilder_buildCategorySelectionString_doc()); filters.add(Bundle.CommonFilesMetadataBuilder_buildCategorySelectionString_doc());
} }

View File

@ -34,6 +34,7 @@ import org.sleuthkit.autopsy.datamodel.DisplayableItemNodeVisitor;
*/ */
final public class CommonFilesNode extends DisplayableItemNode { final public class CommonFilesNode extends DisplayableItemNode {
CommonFilesNode(CommonFilesMetadata metadataList) { CommonFilesNode(CommonFilesMetadata metadataList) {
super(Children.create(new Md5NodeFactory(metadataList), true), Lookups.singleton(CommonFilesNode.class)); super(Children.create(new Md5NodeFactory(metadataList), true), Lookups.singleton(CommonFilesNode.class));
} }

View File

@ -52,4 +52,5 @@ final public class FileInstanceMetadata {
public String getDataSourceName(){ public String getDataSourceName(){
return this.dataSourceName; return this.dataSourceName;
} }
} }

View File

@ -59,7 +59,7 @@ final public class Md5Metadata {
} }
public String getDataSources() { public String getDataSources() {
Set<String> sources = new HashSet<String> (); Set<String> sources = new HashSet<> ();
for(FileInstanceMetadata data : this.fileInstances){ for(FileInstanceMetadata data : this.fileInstances){
sources.add(data.getDataSourceName()); sources.add(data.getDataSourceName());
} }

View File

@ -32,7 +32,7 @@ final class SingleDataSource extends CommonFilesMetadataBuilder {
/** /**
* Implements the algorithm for getting common files that appear at least * Implements the algorithm for getting common files that appear at least
* once in the given data source. * once in the given data source
* @param dataSourceId data source id for which common files must appear at least once * @param dataSourceId data source id for which common files must appear at least once
* @param dataSourceIdMap a map of obj_id to datasource name * @param dataSourceIdMap a map of obj_id to datasource name
* @param filterByMediaMimeType match only on files whose mime types can be broadly categorized as media types * @param filterByMediaMimeType match only on files whose mime types can be broadly categorized as media types

View File

@ -141,7 +141,6 @@ public final class DataResultViewerTable extends AbstractDataResultViewer {
*/ */
outlineView.setAllowedDragActions(DnDConstants.ACTION_NONE); outlineView.setAllowedDragActions(DnDConstants.ACTION_NONE);
outline = outlineView.getOutline(); outline = outlineView.getOutline();
outline.setRowSelectionAllowed(true); outline.setRowSelectionAllowed(true);
outline.setColumnSelectionAllowed(true); outline.setColumnSelectionAllowed(true);