20 package org.sleuthkit.autopsy.commonpropertiessearch;
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;
47 "CommonAttributeValueNode.CommonAttributeValueNode.format=Value: %s"
56 super(Children.create(
57 new FileInstanceNodeFactory(data),
true));
63 if (type == null || type.getId() == FILES_TYPE_ID) {
64 this.setDisplayName(data.getTokenFileName());
66 this.setDisplayName(String.format(Bundle.CommonAttributeValueNode_CommonAttributeValueNode_format(), this.
value));
68 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/fileset-icon-16.png");
76 int getCommonFileCount() {
89 String getDataSources() {
103 "ValueNode.createSheet.noDescription= "
107 Sheet sheet =
new Sheet();
108 Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
109 if (sheetSet == null) {
110 sheetSet = Sheet.createPropertiesSet();
114 final String NO_DESCR = Bundle.ValueNode_createSheet_noDescription();
116 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), NO_DESCR,
""));
117 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), NO_DESCR, this.getDataSources()));
124 return visitor.
visit(
this);
134 return getClass().getName();
141 static class FileInstanceNodeFactory
extends ChildFactory<AbstractCommonAttributeInstance> {
146 this.descendants = descendants;
150 protected boolean createKeys(List<AbstractCommonAttributeInstance> list) {
155 acai.getAbstractFile();
162 protected Node[] createNodesForKey(AbstractCommonAttributeInstance searchResult) {
163 return searchResult.generateNodes();
CommonAttributeValueNode(CommonAttributeValue data, CorrelationAttributeInstance.Type type)
Collection< AbstractCommonAttributeInstance > getInstances()
Set< String > getDataSources()
T visit(DataSourceFilesNode in)
final int commonFileCount
static final int FILES_TYPE_ID