20 package org.sleuthkit.autopsy.commonpropertiessearch;
 
   22 import java.util.HashMap;
 
   23 import java.util.Iterator;
 
   24 import java.util.List;
 
   26 import org.openide.nodes.ChildFactory;
 
   27 import org.openide.nodes.Children;
 
   28 import org.openide.nodes.Node;
 
   29 import org.openide.nodes.Sheet;
 
   30 import org.openide.util.NbBundle;
 
   60         "InstanceCountNode.displayName=Exists in %s data sources (%s)" 
   63         super(Children.create(
new CommonAttributeValueNodeFactory(attributeValues.
getMetadataList(), 
type), 
true));
 
   68         this.setDisplayName(String.format(Bundle.InstanceCountNode_displayName(), Integer.toString(instanceCount), attributeValues.getCommonAttributeListSize()));
 
   69         this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/fileset-icon-16.png"); 
 
   77     int getInstanceCount() {
 
   85     void createChildren() {
 
   87         setChildren(Children.create(
new CommonAttributeValueNodeFactory(attributeValues.
getMetadataList(), 
type), 
false));
 
   95     CommonAttributeValueList getAttributeValues() {
 
  100     public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
 
  101         return visitor.visit(
this);
 
  111         return getClass().getName();
 
  114     @NbBundle.Messages({
"InstanceCountNode.createSheet.noDescription= "})
 
  117         Sheet sheet = 
new Sheet();
 
  118         Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
 
  119         if (sheetSet == null) {
 
  120             sheetSet = Sheet.createPropertiesSet();
 
  124         final String NO_DESCR = Bundle.InstanceCountNode_createSheet_noDescription();
 
  131         sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_instancesColLbl(), Bundle.CommonFilesSearchResultsViewerTable_instancesColLbl(), NO_DESCR, this.getInstanceCount()));
 
  132         sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), NO_DESCR, 
""));
 
  133         sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_caseColLbl(), Bundle.CommonFilesSearchResultsViewerTable_caseColLbl(), NO_DESCR, 
""));
 
  134         sheetSet.put(
new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), NO_DESCR, 
""));
 
  144     static class CommonAttributeValueNodeFactory 
extends ChildFactory<String> {
 
  151         private final Map<String, CommonAttributeValue> metadata;
 
  155             this.metadata = 
new HashMap<>();
 
  157             Iterator<CommonAttributeValue> iterator = attributeValues.iterator();
 
  158             while (iterator.hasNext()) {
 
  160                 this.metadata.put(attributeValue.
getValue(), attributeValue);
 
  165         protected boolean createKeys(List<String> list) {
 
  167             list.addAll(this.metadata.keySet());
 
  172         protected Node createNodeForKey(String attributeValue) {
 
  173             CommonAttributeValue md5Metadata = this.metadata.get(attributeValue);
 
  174             return new CommonAttributeValueNode(md5Metadata, type);
 
static final Logger logger
void displayDelayedMetadata()
InstanceCountNode(int instanceCount, CommonAttributeValueList attributeValues, CorrelationAttributeInstance.Type type)
final CorrelationAttributeInstance.Type type
List< CommonAttributeValue > getMetadataList()
static boolean getHideSCOColumns()
synchronized static Logger getLogger(String name)
final CommonAttributeValueList attributeValues