mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 02:07:42 +00:00
Remove scope column and reference set entries from the content viewer
This commit is contained in:
parent
cbf545e578
commit
f44e570d4a
@ -433,36 +433,6 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the global file instances matching the given eamArtifact and convert
|
||||
* them to central repository artifact instances.
|
||||
*
|
||||
* @param eamArtifact Artifact to use for ArtifactTypeEnum matching
|
||||
*
|
||||
* @return List of central repository artifact instances, empty list if none
|
||||
* found
|
||||
*/
|
||||
public Collection<CorrelationAttributeInstance> getReferenceInstancesAsArtifactInstances(CorrelationAttribute eamArtifact) {
|
||||
Collection<CorrelationAttributeInstance> eamArtifactInstances = new ArrayList<>();
|
||||
// FUTURE: support other reference types
|
||||
if (eamArtifact.getCorrelationType().getId() != CorrelationAttribute.FILES_TYPE_ID) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
try {
|
||||
EamDb dbManager = EamDb.getInstance();
|
||||
Collection<EamGlobalFileInstance> eamGlobalFileInstances = dbManager.getReferenceInstancesByTypeValue(eamArtifact.getCorrelationType(), eamArtifact.getCorrelationValue());
|
||||
eamGlobalFileInstances.forEach((eamGlobalFileInstance) -> {
|
||||
eamArtifactInstances.add(new CorrelationAttributeInstance(
|
||||
null, null, "", eamGlobalFileInstance.getComment(), eamGlobalFileInstance.getKnownStatus()
|
||||
));
|
||||
});
|
||||
return eamArtifactInstances;
|
||||
} catch (EamDbException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Error getting reference instances from database.", ex); // NON-NLS
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSupported(Node node) {
|
||||
if (!EamDb.isEnabled()) {
|
||||
@ -517,7 +487,6 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
|
||||
|
||||
// get correlation and reference set instances from DB
|
||||
corAttrInstances.addAll(getCorrelatedInstances(corAttr, dataSourceName, deviceId));
|
||||
corAttrInstances.addAll(getReferenceInstancesAsArtifactInstances(corAttr));
|
||||
|
||||
corAttrInstances.forEach((corAttrInstance) -> {
|
||||
CorrelationAttribute newCeArtifact = new CorrelationAttribute(
|
||||
|
@ -36,8 +36,7 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
|
||||
"DataContentViewerOtherCasesTableModel.path=Path",
|
||||
"DataContentViewerOtherCasesTableModel.type=Correlation Type",
|
||||
"DataContentViewerOtherCasesTableModel.value=Correlation Value",
|
||||
"DataContentViewerOtherCasesTableModel.scope=Scope",
|
||||
"DataContentViewerOtherCasesTableModel.known=Known",
|
||||
"DataContentViewerOtherCasesTableModel.known=Tagged",
|
||||
"DataContentViewerOtherCasesTableModel.comment=Comment",
|
||||
"DataContentViewerOtherCasesTableModel.noData=No Data.",})
|
||||
enum TableColumns {
|
||||
@ -48,7 +47,6 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
|
||||
TYPE(Bundle.DataContentViewerOtherCasesTableModel_type(), 100),
|
||||
VALUE(Bundle.DataContentViewerOtherCasesTableModel_value(), 200),
|
||||
KNOWN(Bundle.DataContentViewerOtherCasesTableModel_known(), 50),
|
||||
SCOPE(Bundle.DataContentViewerOtherCasesTableModel_scope(), 50),
|
||||
FILE_PATH(Bundle.DataContentViewerOtherCasesTableModel_path(), 450),
|
||||
COMMENT(Bundle.DataContentViewerOtherCasesTableModel_comment(), 200),
|
||||
DEVICE(Bundle.DataContentViewerOtherCasesTableModel_device(), 250);
|
||||
@ -156,9 +154,6 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
|
||||
case VALUE:
|
||||
value = eamArtifact.getCorrelationValue();
|
||||
break;
|
||||
case SCOPE:
|
||||
value = eamArtifactInstance.getGlobalStatus().toString();
|
||||
break;
|
||||
case KNOWN:
|
||||
value = eamArtifactInstance.getKnownStatus().getName();
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user