+ else
+ {
+ mainFrame
+.setTitle("Structure Chooser - Manual association");
+ if (errors.size() > 0)
+ {
+ StringBuilder errorMsg = new StringBuilder();
+ // "Operation was unsuccessful due to the following: \n");
+ for (String error : errors)
+ {
+ errorMsg.append(error).append("\n");
+ }
+ JOptionPane.showMessageDialog(this, errorMsg.toString(),
+ "PDB Web-service Error", JOptionPane.ERROR_MESSAGE);
+ }
+ }
+ }
+
+ public void loadLocalCachedPDBEntries()
+ {
+ DefaultTableModel tableModel = new DefaultTableModel()
+ {
+ @Override
+ public boolean isCellEditable(int row, int column)
+ {
+ return false;
+ }
+ };
+ tableModel.addColumn("Ref Sequence");
+ tableModel.addColumn("PDB Id");
+ tableModel.addColumn("Chain");
+ tableModel.addColumn("Type");
+ tableModel.addColumn("File");
+ cachedEntryMap = new Hashtable<String, PDBEntry>();
+ for (SequenceI seq : selectedSequences)
+ {
+ if (seq.getDatasetSequence() != null
+ && seq.getDatasetSequence().getPDBId() != null)
+ {
+ for (PDBEntry pdbEntry : seq.getDatasetSequence().getPDBId())
+ {
+
+ String chain = pdbEntry.getChainCode() == null ? "_" : pdbEntry
+ .getChainCode();
+ Object[] pdbEntryRowData = new Object[]
+ { seq, pdbEntry.getId(),
+ chain,
+ pdbEntry.getType(),
+ pdbEntry.getFile() };
+ if (pdbEntry.getFile() != null)
+ {
+ tableModel.addRow(pdbEntryRowData);
+ }
+ cachedEntryMap.put(pdbEntry.getId().toLowerCase(),
+ pdbEntry);
+ }
+ }
+ }
+ tbl_local_pdb.setModel(tableModel);