Go to the documentation of this file.
20package org.sleuthkit.autopsy.commonpropertiessearch;
22import java.util.HashMap;
25import org.openide.nodes.ChildFactory;
26import org.openide.nodes.Children;
27import org.openide.nodes.Node;
28import org.openide.nodes.Sheet;
29import org.openide.util.NbBundle;
30import org.sleuthkit.autopsy.coreutils.Logger;
31import org.sleuthkit.autopsy.datamodel.AbstractAbstractFileNode;
32import org.sleuthkit.autopsy.datamodel.DisplayableItemNode;
33import org.sleuthkit.autopsy.datamodel.DisplayableItemNodeVisitor;
34import org.sleuthkit.autopsy.datamodel.NodeProperty;
55 super(Children.create(
new CommonAttributeDataSourceNodeFactory(attributeValues),
true));
57 this.dataSourceToValueList = attributeValues;
58 this.setDisplayName(this.caseName);
59 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/briefcase.png");
67 String getCaseName() {
75 void createChildren() {
85 Map<String, CommonAttributeValueList> getDataSourceToValueList() {
86 return this.dataSourceToValueList;
90 public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
91 return visitor.visit(
this);
101 return getClass().getName();
106 Sheet sheet =
new Sheet();
107 Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
108 if (sheetSet ==
null) {
109 sheetSet = Sheet.createPropertiesSet();
112 final String NO_DESCR = Bundle.InstanceCountNode_createSheet_noDescription();
114 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_localPath(), Bundle.CommonFilesSearchResultsViewerTable_localPath(), NO_DESCR,
""));
116 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_valueColLbl(), Bundle.CommonFilesSearchResultsViewerTable_valueColLbl(), NO_DESCR,
""));
124 static class CommonAttributeDataSourceNodeFactory
extends ChildFactory<String> {
130 private final Map<String, CommonAttributeValueList> metadata;
132 CommonAttributeDataSourceNodeFactory(Map<String, CommonAttributeValueList> attributeValues) {
133 this.metadata =
new HashMap<>();
134 this.metadata.putAll(attributeValues);
138 protected boolean createKeys(List<String> list) {
139 list.addAll(this.metadata.keySet());
144 protected Node createNodeForKey(String dataSourceName) {
145 return new InstanceDataSourceNode(dataSourceName, this.metadata.get(dataSourceName));
final Map< String, CommonAttributeValueList > dataSourceToValueList
static final Logger logger
InstanceCaseNode(String caseName, Map< String, CommonAttributeValueList > attributeValues)
synchronized static Logger getLogger(String name)
DisplayableItemNode(Children children)
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.