mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 09:17:42 +00:00
Comment out Panel call to CR matches builder. Build metadata list of only intercase matches.
This commit is contained in:
parent
5e40c87a94
commit
d3de276cfc
@ -225,6 +225,7 @@ abstract class CommonFilesMetadataBuilder {
|
|||||||
Map<String, Md5Metadata> commonFiles = metaData.getMetadata();
|
Map<String, Md5Metadata> commonFiles = metaData.getMetadata();
|
||||||
List<String> values = Arrays.asList((String[]) commonFiles.keySet().toArray());
|
List<String> values = Arrays.asList((String[]) commonFiles.keySet().toArray());
|
||||||
|
|
||||||
|
Map<String, Md5Metadata> interCaseCommonFiles = metaData.getMetadata();
|
||||||
try {
|
try {
|
||||||
|
|
||||||
EamDb dbManager = EamDb.getInstance();
|
EamDb dbManager = EamDb.getInstance();
|
||||||
@ -233,30 +234,38 @@ abstract class CommonFilesMetadataBuilder {
|
|||||||
|
|
||||||
|
|
||||||
for (CorrelationAttributeCommonInstance instance : artifactInstances) {
|
for (CorrelationAttributeCommonInstance instance : artifactInstances) {
|
||||||
Long objectId = 1L; //TODO, need to retrieve ALL (even count < 2) AbstractFiles from this case to us for objectId for CR matches;
|
//Long objectId = 1L; //TODO, need to retrieve ALL (even count < 2) AbstractFiles from this case to us for objectId for CR matches;
|
||||||
String md5 = instance.getValue();
|
String md5 = instance.getValue();
|
||||||
String dataSource = instance.getCorrelationDataSource().getName();
|
String dataSource = instance.getCorrelationDataSource().getName();
|
||||||
|
|
||||||
if (md5 == null || HashUtility.isNoDataMd5(md5)) {
|
if (md5 == null || HashUtility.isNoDataMd5(md5)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// TODO Build a 3rd list which contains instances which are in commonFiles map, use current case objectId
|
//Builds a 3rd list which contains instances which are in commonFiles map, uses current case objectId
|
||||||
if (commonFiles.containsKey(md5)) {
|
if (commonFiles.containsKey(md5)) {
|
||||||
final Md5Metadata md5Metadata = commonFiles.get(md5);
|
// TODO sloppy, but we don't *have* all the information for the rows in the CR, so what do we do?
|
||||||
//TODO should FIleInstanceMetadata carry Knownstatus from CR instances?
|
Long objectId = commonFiles.get(md5).getMetadata().iterator().next().getObjectId();
|
||||||
|
if(interCaseCommonFiles.containsKey(md5)) {
|
||||||
|
//Add to intercase metaData
|
||||||
|
final Md5Metadata md5Metadata = interCaseCommonFiles.get(md5);
|
||||||
md5Metadata.addFileInstanceMetadata(new FileInstanceMetadata(objectId, dataSource));
|
md5Metadata.addFileInstanceMetadata(new FileInstanceMetadata(objectId, dataSource));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
final List<FileInstanceMetadata> fileInstances = new ArrayList<>();
|
// Create new intercase metadata
|
||||||
fileInstances.add(new FileInstanceMetadata(objectId, dataSource));
|
final Md5Metadata md5Metadata = commonFiles.get(md5);
|
||||||
Md5Metadata md5Metadata = new Md5Metadata(md5, fileInstances);
|
md5Metadata.addFileInstanceMetadata(new FileInstanceMetadata(objectId, dataSource));
|
||||||
commonFiles.put(md5, md5Metadata);
|
interCaseCommonFiles.put(md5, md5Metadata);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// TODO This should never happen. All current case files with potential matches are in comonFiles Map.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (EamDbException ex) {
|
} catch (EamDbException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Error getting artifact instances from database.", ex); // NON-NLS
|
LOGGER.log(Level.SEVERE, "Error getting artifact instances from database.", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
return new CommonFilesMetadata(commonFiles);
|
// Builds intercase-only matches metadata
|
||||||
|
return new CommonFilesMetadata(interCaseCommonFiles);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,10 +267,10 @@ public final class CommonFilesPanel extends javax.swing.JPanel {
|
|||||||
builder = new SingleDataSource(dataSourceId, CommonFilesPanel.this.dataSourceMap, filterByMedia, filterByDocuments);
|
builder = new SingleDataSource(dataSourceId, CommonFilesPanel.this.dataSourceMap, filterByMedia, filterByDocuments);
|
||||||
|
|
||||||
setTitleForSingleSource(dataSourceId);
|
setTitleForSingleSource(dataSourceId);
|
||||||
} else if(false) {
|
}// else if(false) {
|
||||||
// TODO, is CR cases, add option chosen CorrelationCase ID lookup
|
// TODO, is CR cases, add option chosen CorrelationCase ID lookup
|
||||||
builder = new AllDataSourcesEamDbCommonFilesAlgorithm(CommonFilesPanel.this.dataSourceMap, filterByMedia, filterByDocuments);
|
// builder = new AllDataSourcesEamDbCommonFilesAlgorithm(CommonFilesPanel.this.dataSourceMap, filterByMedia, filterByDocuments);
|
||||||
}
|
//}
|
||||||
|
|
||||||
this.tabTitle = builder.buildTabTitle();
|
this.tabTitle = builder.buildTabTitle();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user