19 package org.sleuthkit.autopsy.commonpropertiessearch;
21 import java.util.List;
24 import org.openide.nodes.ChildFactory;
25 import org.openide.nodes.Children;
26 import org.openide.nodes.Node;
27 import org.openide.util.NbBundle;
40 super(Children.create(
new InstanceCountNodeFactory(metadataList, type),
true));
44 super(Children.create(
new InstanceCaseNodeFactory(metadataList),
true));
48 "CommonFilesNode.getName.text=Common Files"})
51 return Bundle.CommonFilesNode_getName_text();
56 return visitor.
visit(
this);
66 return getClass().getName();
72 static class InstanceCountNodeFactory
extends ChildFactory<Integer> {
87 this.searchResults = searchResults;
92 protected boolean createKeys(List<Integer> list) {
93 list.addAll(this.searchResults.
getMetadata().keySet());
98 protected Node createNodeForKey(Integer instanceCount) {
99 CommonAttributeValueList attributeValues = this.searchResults.getAttributeValuesForInstanceCount(instanceCount);
100 return new InstanceCountNode(instanceCount, attributeValues, type);
107 static class InstanceCaseNodeFactory
extends ChildFactory<String> {
109 private static final Logger LOGGER = Logger.
getLogger(InstanceCaseNodeFactory.class.getName());
111 private final CommonAttributeCaseSearchResults searchResults;
120 InstanceCaseNodeFactory(CommonAttributeCaseSearchResults searchResults) {
121 this.searchResults = searchResults;
125 protected boolean createKeys(List<String> list) {
126 list.addAll(this.searchResults.getMetadata().keySet());
131 protected Node createNodeForKey(String caseName) {
132 Map<String, CommonAttributeValueList> dataSourceNameToInstances = this.searchResults.getAttributeValuesForCaseName(caseName);
133 return new InstanceCaseNode(caseName, dataSourceNameToInstances);
Map< Integer, CommonAttributeValueList > getMetadata()
T visit(DataSourceFilesNode in)
synchronized static Logger getLogger(String name)