20 package org.sleuthkit.autopsy.commonfilesearch;
22 import java.util.List;
23 import org.openide.nodes.ChildFactory;
24 import org.openide.nodes.Children;
25 import org.openide.nodes.Node;
26 import org.openide.nodes.Sheet;
27 import org.openide.util.NbBundle;
44 "CommonAttributeValueNode.CommonAttributeValueNode.format=Value: %s"
51 super(Children.create(
52 new FileInstanceNodeFactory(data),
true));
60 this.setDisplayName(String.format(Bundle.CommonAttributeValueNode_CommonAttributeValueNode_format(), this.
value));
61 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/fileset-icon-16.png");
68 int getCommonFileCount() {
80 String getDataSources() {
92 @NbBundle.Messages({
"Md5Node.createSheet.noDescription= "})
95 Sheet sheet =
new Sheet();
96 Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
97 if (sheetSet == null) {
98 sheetSet = Sheet.createPropertiesSet();
102 final String NO_DESCR = Bundle.Md5Node_createSheet_noDescription();
103 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), NO_DESCR,
""));
104 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), NO_DESCR,
""));
105 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), NO_DESCR,
""));
106 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), NO_DESCR, this.getDataSources()));
114 return visitor.
visit(
this);
124 return getClass().getName();
131 static class FileInstanceNodeFactory
extends ChildFactory<AbstractCommonAttributeInstance> {
136 this.descendants = descendants;
140 protected boolean createKeys(List<AbstractCommonAttributeInstance> list) {
146 protected Node[] createNodesForKey(AbstractCommonAttributeInstance searchResult) {
147 return searchResult.generateNodes();
final int commonFileCount
T visit(DataSourcesNode in)
CommonAttributeValueNode(CommonAttributeValue data)
Collection< AbstractCommonAttributeInstance > getInstances()