19 package org.sleuthkit.autopsy.centralrepository.contentviewer;
21 import java.util.ArrayList;
22 import java.util.List;
23 import javax.swing.table.AbstractTableModel;
24 import org.openide.util.NbBundle.Messages;
33 @Messages({
"DataContentViewerOtherCasesTableModel.case=Case",
34 "DataContentViewerOtherCasesTableModel.device=Device",
35 "DataContentViewerOtherCasesTableModel.dataSource=Data Source",
36 "DataContentViewerOtherCasesTableModel.path=Path",
37 "DataContentViewerOtherCasesTableModel.type=Correlation Type",
38 "DataContentViewerOtherCasesTableModel.value=Correlation Value",
39 "DataContentViewerOtherCasesTableModel.known=Known",
40 "DataContentViewerOtherCasesTableModel.comment=Comment",
41 "DataContentViewerOtherCasesTableModel.noData=No Data.",})
45 CASE_NAME(Bundle.DataContentViewerOtherCasesTableModel_case(), 100),
46 DATA_SOURCE(Bundle.DataContentViewerOtherCasesTableModel_dataSource(), 100),
47 TYPE(Bundle.DataContentViewerOtherCasesTableModel_type(), 100),
48 VALUE(Bundle.DataContentViewerOtherCasesTableModel_value(), 200),
49 KNOWN(Bundle.DataContentViewerOtherCasesTableModel_known(), 50),
50 FILE_PATH(Bundle.DataContentViewerOtherCasesTableModel_path(), 450),
51 COMMENT(Bundle.DataContentViewerOtherCasesTableModel_comment(), 200),
52 DEVICE(Bundle.DataContentViewerOtherCasesTableModel_device(), 250);
54 private final String columnName;
55 private final int columnWidth;
57 TableColumns(String columnName,
int columnWidth) {
58 this.columnName = columnName;
59 this.columnWidth = columnWidth;
62 public String columnName() {
66 public int columnWidth() {
71 List<CorrelationAttribute> eamArtifacts;
74 eamArtifacts =
new ArrayList<>();
79 return TableColumns.values().length;
93 return TableColumns.values()[colIdx].columnWidth();
98 return eamArtifacts.size();
103 return TableColumns.values()[colIdx].columnName();
108 if (0 == eamArtifacts.size()) {
109 return Bundle.DataContentViewerOtherCasesTableModel_noData();
112 return mapValueById(rowIdx, TableColumns.values()[colIdx]);
116 return eamArtifacts.get(rowIdx);
130 String value = Bundle.DataContentViewerOtherCasesTableModel_noData();
179 eamArtifacts.add(eamArtifact);
180 fireTableDataChanged();
184 eamArtifacts.clear();
185 fireTableDataChanged();
String getCorrelationValue()
Type getCorrelationType()
Object mapValueById(int rowIdx, TableColumns colId)
TskData.FileKnown getKnownStatus()
int getColumnPreferredWidth(int colIdx)
String getColumnName(int colIdx)
List< CorrelationAttributeInstance > getInstances()
CorrelationDataSource getCorrelationDataSource()
Object getValueAt(int rowIdx, int colIdx)
Object getRow(int rowIdx)
void addEamArtifact(CorrelationAttribute eamArtifact)
CorrelationCase getCorrelationCase()
Class< String > getColumnClass(int colIdx)