pdbEntry.getType(),
pdbEntry.getFile() };
tableModel.addRow(pdbEntryRowData);
- cachedEntryMap.put(seq.getDisplayId(false) + pdbEntry.getId(),
+ cachedEntryMap.put(pdbEntry.getId().toLowerCase(),
pdbEntry);
}
}
{
String pdbIdStr = tbl_summary.getValueAt(summaryRow, pdbIdCol)
.toString();
- PDBEntry pdbEntry = new PDBEntry();
- pdbEntry.setId(pdbIdStr);
- pdbEntry.setType(PDBEntry.Type.PDB);
+
+ PDBEntry pdbEntry = cachedEntryMap.get(pdbIdStr.toLowerCase());
+ if (pdbEntry == null)
+ {
+ pdbEntry = new PDBEntry();
+ pdbEntry.setId(pdbIdStr);
+ pdbEntry.setType(PDBEntry.Type.PDB);
+ }
pdbEntriesToView[count++] = pdbEntry;
}
-
launchStructureViewer(ap.getStructureSelectionManager(),
pdbEntriesToView, ap, selectedSequences);
}
int count = 0;
for (int row : selectedRows)
{
- String entryKey = tbl_local_pdb.getValueAt(row, 0).toString() + tbl_local_pdb.getValueAt(row, 1).toString();
+ String entryKey = tbl_local_pdb.getValueAt(row, 1).toString()
+ .toLowerCase();
pdbEntriesToView[count++] = cachedEntryMap.get(entryKey);
}
launchStructureViewer(ap.getStructureSelectionManager(),
{
selectedSequence = userSelectedSeq;
}
- PDBEntry pdbEntry = new PDBEntry();
- pdbEntry.setId(txt_search.getText());
- pdbEntry.setType(PDBEntry.Type.PDB);
+
+ String pdbIdStr = txt_search.getText();
+ PDBEntry pdbEntry = cachedEntryMap.get(pdbIdStr.toLowerCase());
+ if (pdbEntry == null)
+ {
+ pdbEntry = new PDBEntry();
+ pdbEntry.setId(txt_search.getText());
+ pdbEntry.setType(PDBEntry.Type.PDB);
+ }
+
selectedSequence.getDatasetSequence().addPDBId(pdbEntry);
PDBEntry[] pdbEntriesToView = new PDBEntry[]
{ pdbEntry };
}
}
+
}