19 package org.sleuthkit.autopsy.modules.hashdatabase;
 
   21 import java.util.ArrayList;
 
   22 import java.util.Collection;
 
   23 import java.util.List;
 
   25 import javax.swing.JOptionPane;
 
   26 import org.openide.nodes.AbstractNode;
 
   27 import org.openide.nodes.Children;
 
   28 import org.openide.nodes.Node;
 
   29 import org.openide.util.NbBundle;
 
   30 import org.openide.windows.TopComponent;
 
   31 import org.openide.windows.WindowManager;
 
   40 class HashDbSearchManager {
 
   42     private Map<String, List<AbstractFile>> map;
 
   43     private List<AbstractFile> kvContents;
 
   45     public HashDbSearchManager(Map<String, List<AbstractFile>> map) {
 
   57             kvContents = 
new ArrayList<AbstractFile>();
 
   59             for (String s : map.keySet()) {
 
   60                 for (AbstractFile file : map.get(s)) {
 
   71     public void execute() {
 
   73             Collection<AbstractFile> kvCollection = kvContents;
 
   76             if (kvCollection.size() > 0) {
 
   77                 Children childKeyValueContentNodes
 
   78                         = Children.create(
new HashDbSearchResultFactory(kvCollection), 
true);
 
   80                 rootNode = 
new AbstractNode(childKeyValueContentNodes);
 
   82                 rootNode = Node.EMPTY;
 
   85             final String pathText = NbBundle.getMessage(this.getClass(), 
"HashDbSearchManager.MD5HashSearch");
 
   86             TopComponent searchResultWin = DataResultTopComponent.createInstance(
 
   87                     NbBundle.getMessage(
this.getClass(), 
"HashDbSearchManager.MD5HashSearch"),
 
   92             searchResultWin.requestActive();
 
   94             JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
 
   95                     NbBundle.getMessage(this.getClass(), 
"HashDbSearchManager.noResultsFoundMsg"));