19 package org.sleuthkit.autopsy.centralrepository.contentviewer;
 
   22 import java.util.ArrayList;
 
   23 import java.util.HashMap;
 
   24 import java.util.List;
 
   26 import java.util.logging.Level;
 
   27 import javax.swing.table.AbstractTableModel;
 
   28 import org.openide.util.NbBundle.Messages;
 
   29 import org.apache.commons.io.FilenameUtils;
 
   44     private final List<String> 
nodeKeys = 
new ArrayList<>();
 
   45     private final Map<String, List<NodeData>> 
nodeMap = 
new HashMap<>();
 
   61         return nodeKeys.size();
 
   64     @Messages({
"OtherOccurrencesFilesTableModel.fileName=File Name",
 
   65         "OtherOccurrencesFilesTableModel.noData=No Data."})
 
   68         return Bundle.OtherOccurrencesFilesTableModel_fileName();
 
   74         if (nodeMap.isEmpty() || nodeKeys.isEmpty() || rowIdx < 0
 
   75                 || rowIdx >= nodeKeys.size() || nodeKeys.get(rowIdx) == null
 
   76                 || nodeMap.get(nodeKeys.get(rowIdx)) == null
 
   77                 || nodeMap.get(nodeKeys.get(rowIdx)).isEmpty()) {
 
   78             return Bundle.OtherOccurrencesFilesTableModel_noData();
 
   80         return FilenameUtils.getName( nodeMap.get(nodeKeys.get(rowIdx)).
get(0).getFilePath());
 
   92     List<NodeData> getListOfNodesForFile(
int rowIdx) {
 
   94         if (nodeMap.isEmpty() || nodeKeys.isEmpty() || rowIdx < 0
 
   95                 || rowIdx >= nodeKeys.size() || nodeKeys.get(rowIdx) == null
 
   96                 || nodeMap.get(nodeKeys.get(rowIdx)) == null) {
 
   97             return new ArrayList<>();
 
   99         return nodeMap.get(nodeKeys.get(rowIdx));
 
  112     void addNodeData(
NodeData newNodeData) {
 
  114         List<NodeData> nodeList = nodeMap.get(newNodeKey);
 
  115         if (nodeList == null) {
 
  116             nodeKeys.add(newNodeKey);
 
  117             nodeList = 
new ArrayList<>();
 
  119         nodeList.add(newNodeData);
 
  120         nodeMap.put(newNodeKey, nodeList);
 
  121         fireTableDataChanged();
 
  134                 logger.log(Level.WARNING, 
"Unable to get current case", ex);
 
  147         fireTableDataChanged();
 
String getColumnName(int colIdx)
Object getValueAt(int rowIdx, int colIdx)
CorrelationAttributeInstance getCorrelationAttributeInstance()
final Map< String, List< NodeData > > nodeMap
Class< String > getColumnClass(int colIdx)
static final Logger logger
static final long serialVersionUID
synchronized static Logger getLogger(String name)
final List< String > nodeKeys
static Case getCurrentCaseThrows()
CorrelationCase getCorrelationCase()
static String getPlaceholderUUID()
String getDataSourceName()
String createNodeKey(NodeData nodeData)