19 package org.sleuthkit.autopsy.commonfilesearch;
21 import java.util.List;
23 import java.util.logging.Logger;
24 import org.openide.nodes.ChildFactory;
25 import org.openide.nodes.Children;
26 import org.openide.nodes.Node;
27 import org.openide.util.NbBundle;
39 super(Children.create(
new InstanceCountNodeFactory(metadataList),
true));
43 super(Children.create(
new InstanceCaseNodeFactory(metadataList),
true));
47 "CommonFilesNode.getName.text=Common Files"})
50 return Bundle.CommonFilesNode_getName_text();
55 return visitor.
visit(
this);
65 return getClass().getName();
71 static class InstanceCountNodeFactory
extends ChildFactory<Integer> {
85 this.searchResults = searchResults;
89 protected boolean createKeys(List<Integer> list) {
90 list.addAll(this.searchResults.
getMetadata().keySet());
95 protected Node createNodeForKey(Integer instanceCount) {
96 CommonAttributeValueList attributeValues = this.searchResults.getAttributeValuesForInstanceCount(instanceCount);
97 return new InstanceCountNode(instanceCount, attributeValues);
104 static class InstanceCaseNodeFactory
extends ChildFactory<String> {
106 private static final Logger LOGGER = Logger.
getLogger(InstanceCaseNodeFactory.class.getName());
108 private final CommonAttributeCaseSearchResults searchResults;
117 InstanceCaseNodeFactory(CommonAttributeCaseSearchResults searchResults) {
118 this.searchResults = searchResults;
122 protected boolean createKeys(List<String> list) {
123 list.addAll(this.searchResults.getMetadata().keySet());
128 protected Node createNodeForKey(String caseName) {
129 Map<String, CommonAttributeValueList> dataSourceNameToInstances = this.searchResults.getAttributeValuesForCaseName(caseName);
130 return new InstanceCaseNode(caseName, dataSourceNameToInstances);
Map< Integer, CommonAttributeValueList > getMetadata()
T visit(DataSourcesNode in)
synchronized static Logger getLogger(String name)