Go to the documentation of this file.
20package org.sleuthkit.autopsy.commonpropertiessearch;
23import org.openide.nodes.ChildFactory;
24import org.openide.nodes.Children;
25import org.openide.nodes.Node;
26import org.openide.nodes.Sheet;
27import org.openide.util.NbBundle;
28import org.sleuthkit.autopsy.coreutils.Logger;
29import org.sleuthkit.autopsy.datamodel.AbstractAbstractFileNode;
30import org.sleuthkit.autopsy.datamodel.DisplayableItemNode;
31import org.sleuthkit.autopsy.datamodel.DisplayableItemNodeVisitor;
33import org.sleuthkit.autopsy.datamodel.NodeProperty;
54 super(Children.create(
new FileInstanceNodeFactory(attributeValues),
true));
57 this.dataSourceToValueList = attributeValues;
59 this.setDisplayName(this.dataSourceName);
60 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/image.png");
68 String getDatasourceName() {
69 return this.dataSourceName;
76 void createChildren() {
88 return getClass().getName();
93 Sheet sheet =
new Sheet();
94 Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
95 if (sheetSet ==
null) {
96 sheetSet = Sheet.createPropertiesSet();
99 final String NO_DESCR = Bundle.InstanceCountNode_createSheet_noDescription();
101 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_localPath(), Bundle.CommonFilesSearchResultsViewerTable_localPath(), NO_DESCR,
""));
103 sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_valueColLbl(), Bundle.CommonFilesSearchResultsViewerTable_valueColLbl(), NO_DESCR,
""));
109 return visitor.
visit(
this);
115 static class FileInstanceNodeFactory
extends ChildFactory<AbstractCommonAttributeInstance> {
117 private final CommonAttributeValueList descendants;
119 FileInstanceNodeFactory(CommonAttributeValueList descendants) {
120 this.descendants = descendants;
124 protected boolean createKeys(List<AbstractCommonAttributeInstance> list) {
125 for (CommonAttributeValue value : descendants.getDelayedMetadataSet()) {
129 value.getInstances().forEach((acai) -> {
130 acai.getAbstractFile();
133 list.addAll(value.getInstances());
139 protected Node[] createNodesForKey(AbstractCommonAttributeInstance searchResult) {
140 return searchResult.generateNodes();
void displayDelayedMetadata()
static final Logger logger
InstanceDataSourceNode(String dataSourceName, CommonAttributeValueList attributeValues)
final CommonAttributeValueList dataSourceToValueList
final String dataSourceName
synchronized static Logger getLogger(String name)
DisplayableItemNode(Children children)
T visit(DataSourceFilesNode in)
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.