4792 adjustments to support intra-case other ocurrences again

This commit is contained in:
William Schaefer 2019-03-11 14:02:23 -04:00
parent 1edbbadf5b
commit 572c1af5a3

View File

@ -774,11 +774,20 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
// get correlation and reference set instances from DB // get correlation and reference set instances from DB
correlatedNodeDataMap.putAll(getCorrelatedInstances(corAttr, dataSourceName, deviceId)); correlatedNodeDataMap.putAll(getCorrelatedInstances(corAttr, dataSourceName, deviceId));
for (OtherOccurrenceNodeInstanceData nodeData : correlatedNodeDataMap.values()) { for (OtherOccurrenceNodeInstanceData nodeData : correlatedNodeDataMap.values()) {
if (nodeData.isCentralRepoNode()) {
try { try {
caseNames.put(nodeData.getCorrelationAttributeInstance().getCorrelationCase().getCaseUUID(), nodeData.getCorrelationAttributeInstance().getCorrelationCase()); caseNames.put(nodeData.getCorrelationAttributeInstance().getCorrelationCase().getCaseUUID(), nodeData.getCorrelationAttributeInstance().getCorrelationCase());
} catch (EamDbException ex) { } catch (EamDbException ex) {
System.out.println("can't get correlation case"); System.out.println("can't get correlation case");
} }
} else {
try {
caseNames.put(Case.getCurrentCaseThrows().getName(), new CorrelationCase(Case.getCurrentCaseThrows().getName(), Case.getCurrentCaseThrows().getDisplayName()));
} catch (NoCurrentCaseException ex){
System.out.println("NO cURRENT CASE");
}
}
} }
} }
// if (caseNames.isEmpty()) { // if (caseNames.isEmpty()) {
@ -852,7 +861,6 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
try { try {
if (((CorrelationCase) casesTableModel.getRow(caseTable.convertRowIndexToModel(selectedCaseRow))).getCaseUUID().equals(nodeData.getCorrelationAttributeInstance().getCorrelationCase().getCaseUUID()) if (((CorrelationCase) casesTableModel.getRow(caseTable.convertRowIndexToModel(selectedCaseRow))).getCaseUUID().equals(nodeData.getCorrelationAttributeInstance().getCorrelationCase().getCaseUUID())
&& dataSourceModel.getValueAt(dataSourceTable.convertRowIndexToModel(selectedDataSourceRow), 1).toString().equals(nodeData.getDeviceID())) { && dataSourceModel.getValueAt(dataSourceTable.convertRowIndexToModel(selectedDataSourceRow), 1).toString().equals(nodeData.getDeviceID())) {
System.out.println(((CorrelationCase) casesTableModel.getRow(caseTable.convertRowIndexToModel(selectedCaseRow))).getCaseUUID());
tableModel.addNodeData(nodeData); tableModel.addNodeData(nodeData);
} }
} catch (EamDbException ex) { } catch (EamDbException ex) {