mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
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:
commit
fd8bbb5e66
@ -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
|
||||||
|
@ -32,12 +32,13 @@ 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) {
|
||||||
this.metadata = metadata;
|
this.metadata = metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the meta data for the given md5.
|
* Find the meta data for the given md5.
|
||||||
*
|
*
|
||||||
@ -63,7 +64,7 @@ final class CommonFilesMetadata {
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
for (Md5Metadata data : this.metadata.values()) {
|
for (Md5Metadata data : this.metadata.values()) {
|
||||||
count += data.size();
|
count += data.size();
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -238,21 +238,22 @@ abstract class CommonFilesMetadataBuilder {
|
|||||||
"CommonFilesMetadataBuilder.buildTabTitle.titleSingle=Common Files (Match Within Data Source: %s, %s)"
|
"CommonFilesMetadataBuilder.buildTabTitle.titleSingle=Common Files (Match Within Data Source: %s, %s)"
|
||||||
})
|
})
|
||||||
protected abstract String buildTabTitle();
|
protected abstract String buildTabTitle();
|
||||||
|
|
||||||
@NbBundle.Messages({
|
@NbBundle.Messages({
|
||||||
"CommonFilesMetadataBuilder.buildCategorySelectionString.doc=Documents",
|
"CommonFilesMetadataBuilder.buildCategorySelectionString.doc=Documents",
|
||||||
"CommonFilesMetadataBuilder.buildCategorySelectionString.media=Media",
|
"CommonFilesMetadataBuilder.buildCategorySelectionString.media=Media",
|
||||||
"CommonFilesMetadataBuilder.buildCategorySelectionString.all=All File Categories"
|
"CommonFilesMetadataBuilder.buildCategorySelectionString.all=All File Categories"
|
||||||
})
|
})
|
||||||
protected String buildCategorySelectionString(){
|
|
||||||
if(!this.filterByDoc && !this.filterByMedia){
|
protected String buildCategorySelectionString() {
|
||||||
|
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());
|
||||||
}
|
}
|
||||||
if(this.filterByMedia){
|
if (this.filterByMedia) {
|
||||||
filters.add(Bundle.CommonFilesMetadataBuilder_buildCategorySelectionString_media());
|
filters.add(Bundle.CommonFilesMetadataBuilder_buildCategorySelectionString_media());
|
||||||
}
|
}
|
||||||
return String.join(", ", filters);
|
return String.join(", ", filters);
|
||||||
|
@ -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));
|
||||||
}
|
}
|
||||||
@ -79,7 +80,7 @@ final public class CommonFilesNode extends DisplayableItemNode {
|
|||||||
protected void removeNotify() {
|
protected void removeNotify() {
|
||||||
metadata = null;
|
metadata = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Node createNodeForKey(String md5){
|
protected Node createNodeForKey(String md5){
|
||||||
Md5Metadata metadata = this.metadata.getMetadataForMd5(md5);
|
Md5Metadata metadata = this.metadata.getMetadataForMd5(md5);
|
||||||
|
@ -274,11 +274,11 @@ public final class CommonFilesPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
setTitleForSingleSource(dataSourceId);
|
setTitleForSingleSource(dataSourceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tabTitle = builder.buildTabTitle();
|
this.tabTitle = builder.buildTabTitle();
|
||||||
|
|
||||||
CommonFilesMetadata metadata = builder.findCommonFiles();
|
CommonFilesMetadata metadata = builder.findCommonFiles();
|
||||||
|
|
||||||
return metadata;
|
return metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,4 +52,5 @@ final public class FileInstanceMetadata {
|
|||||||
public String getDataSourceName(){
|
public String getDataSourceName(){
|
||||||
return this.dataSourceName;
|
return this.dataSourceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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());
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user