mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 19:14:55 +00:00
suppress more columns
This commit is contained in:
parent
9df3f32291
commit
3eae38f53b
@ -7,6 +7,7 @@ package org.sleuthkit.autopsy.communications;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openide.nodes.FilterNode;
|
import org.openide.nodes.FilterNode;
|
||||||
import org.openide.nodes.Sheet;
|
import org.openide.nodes.Sheet;
|
||||||
import org.sleuthkit.autopsy.datamodel.BlackboardArtifactNode;
|
import org.sleuthkit.autopsy.datamodel.BlackboardArtifactNode;
|
||||||
@ -18,24 +19,27 @@ import org.sleuthkit.datamodel.BlackboardAttribute;
|
|||||||
*/
|
*/
|
||||||
public class RelationShipFilterNode extends FilterNode {
|
public class RelationShipFilterNode extends FilterNode {
|
||||||
|
|
||||||
private final BlackboardArtifactNode wrappedNode;
|
|
||||||
|
|
||||||
public RelationShipFilterNode(BlackboardArtifactNode wrappedNode) {
|
public RelationShipFilterNode(BlackboardArtifactNode wrappedNode) {
|
||||||
super(wrappedNode, Children.LEAF);
|
super(wrappedNode, Children.LEAF);
|
||||||
this.wrappedNode = wrappedNode;
|
setDisplayName( StringUtils.stripEnd(wrappedNode.getArtifact().getDisplayName(),"s"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PropertySet[] getPropertySets() {
|
public PropertySet[] getPropertySets() {
|
||||||
PropertySet[] propertySets = super.getPropertySets();
|
PropertySet[] propertySets = super.getPropertySets();
|
||||||
|
|
||||||
HashSet<String> suppressedPropertyNames = new HashSet<>();
|
HashSet<String> propertyNames = new HashSet<>();
|
||||||
suppressedPropertyNames.add("Source File");
|
propertyNames.add("Source File");
|
||||||
suppressedPropertyNames.add("Data Source");
|
propertyNames.add("Data Source");
|
||||||
suppressedPropertyNames.add("Path");
|
propertyNames.add("Path");
|
||||||
suppressedPropertyNames.add("Message ID");
|
propertyNames.add("Message ID");
|
||||||
suppressedPropertyNames.add("Tags");
|
propertyNames.add("Tags");
|
||||||
suppressedPropertyNames.add("Message (Plaintext)");
|
propertyNames.add("Text");
|
||||||
|
propertyNames.add("Read");
|
||||||
|
propertyNames.add("Directon");
|
||||||
|
propertyNames.add("Name");
|
||||||
|
propertyNames.add("Message (Plaintext)");
|
||||||
|
|
||||||
ArrayList<PropertySet> retPropSets = new ArrayList<>();
|
ArrayList<PropertySet> retPropSets = new ArrayList<>();
|
||||||
boolean first = true;
|
boolean first = true;
|
||||||
@ -43,13 +47,11 @@ public class RelationShipFilterNode extends FilterNode {
|
|||||||
Sheet.Set set1 = copySet(set);
|
Sheet.Set set1 = copySet(set);
|
||||||
if (first) {
|
if (first) {
|
||||||
first = false;
|
first = false;
|
||||||
|
set1.put(new NodeProperty<>("Type", "Type", "Type", getDisplayName()));
|
||||||
final String artifactTypeName = wrappedNode.getArtifact().getArtifactTypeName();
|
|
||||||
set1.put(new NodeProperty<>("Type", "Type", "Type", artifactTypeName));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Property<?> p : set.getProperties()) {
|
for (Property<?> p : set.getProperties()) {
|
||||||
if (false == suppressedPropertyNames.contains(p.getName())) {
|
if (false == propertyNames.contains(p.getName())) {
|
||||||
set1.put(p);
|
set1.put(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user