Go to the documentation of this file.
20package org.sleuthkit.autopsy.commonpropertiessearch;
22import java.util.HashMap;
23import java.util.Iterator;
26import org.openide.nodes.ChildFactory;
27import org.openide.nodes.Children;
28import org.openide.nodes.Node;
29import org.openide.nodes.Sheet;
30import org.openide.util.NbBundle;
31import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
32import org.sleuthkit.autopsy.core.UserPreferences;
33import org.sleuthkit.autopsy.coreutils.Logger;
34import org.sleuthkit.autopsy.datamodel.AbstractAbstractFileNode;
35import org.sleuthkit.autopsy.datamodel.DisplayableItemNode;
36import org.sleuthkit.autopsy.datamodel.DisplayableItemNodeVisitor;
37import org.sleuthkit.autopsy.datamodel.NodeProperty;
60 "InstanceCountNode.displayName=Exists in %s data sources (%s)"
63 super(Children.create(
new CommonAttributeValueNodeFactory(
attributeValues.getMetadataList(),
type),
true));
68 this.setDisplayName(String.format(Bundle.InstanceCountNode_displayName(), Integer.toString(
instanceCount),
attributeValues.getCommonAttributeListSize()));
69 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/fileset-icon-16.png");
77 int getInstanceCount() {
78 return this.instanceCount;
85 void createChildren() {
95 CommonAttributeValueList getAttributeValues() {
96 return this.attributeValues;
100 public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
101 return visitor.visit(
this);
111 return getClass().getName();
114 @NbBundle.Messages({
"InstanceCountNode.createSheet.noDescription= "})
117 Sheet sheet =
new Sheet();
118 Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
119 if (sheetSet ==
null) {
120 sheetSet = Sheet.createPropertiesSet();
124 final String NO_DESCR = Bundle.InstanceCountNode_createSheet_noDescription();
131 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_instancesColLbl(), Bundle.CommonFilesSearchResultsViewerTable_instancesColLbl(), NO_DESCR,
this.getInstanceCount()));
132 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), NO_DESCR,
""));
133 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_caseColLbl(), Bundle.CommonFilesSearchResultsViewerTable_caseColLbl(), NO_DESCR,
""));
134 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), NO_DESCR,
""));
144 static class CommonAttributeValueNodeFactory
extends ChildFactory<String> {
151 private final Map<String, CommonAttributeValue> metadata;
155 this.metadata =
new HashMap<>();
158 while (iterator.hasNext()) {
160 this.metadata.put(attributeValue.
getValue(), attributeValue);
165 protected boolean createKeys(List<String> list) {
167 list.addAll(this.metadata.keySet());
172 protected Node createNodeForKey(String attributeValue) {
173 CommonAttributeValue md5Metadata = this.metadata.get(attributeValue);
174 return new CommonAttributeValueNode(md5Metadata,
type);
void displayDelayedMetadata()
List< CommonAttributeValue > getMetadataList()
final CorrelationAttributeInstance.Type type
static final Logger logger
final CommonAttributeValueList attributeValues
InstanceCountNode(int instanceCount, CommonAttributeValueList attributeValues, CorrelationAttributeInstance.Type type)
static boolean getHideSCOColumns()
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.