int urlColumnIndex = restable.getColumn("Url").getModelIndex();
int typeColumnIndex = restable.getColumn("Provider").getModelIndex();
int humanUrl = restable.getColumn("Page URL").getModelIndex();
+ int modelformat = restable.getColumn("Model Format").getModelIndex();
int categoryColumnIndex = restable.getColumn("Model Category")
.getModelIndex();
final int up_start_idx = restable.getColumn("Uniprot Start")
.toString();
String modelPage = humanUrl < 1 ? null
: (String) restable.getValueAt(row, humanUrl);
+ String strucFormat = restable.getValueAt(row, modelformat).toString();
+
SequenceI selectedSeq = (SequenceI) restable.getValueAt(row,
refSeqColIndex);
selectedSeqsToView.add(selectedSeq);
{
pdbEntry = new PDBEntry();
pdbEntry.setId(pdbIdStr);
- boolean hasCif = urlStr.toLowerCase(Locale.ENGLISH).endsWith("cif");
- boolean probablyPdb = urlStr.toLowerCase(Locale.ENGLISH)
- .contains("pdb");
- pdbEntry.setType(hasCif ? PDBEntry.Type.MMCIF
- : probablyPdb ? PDBEntry.Type.PDB : PDBEntry.Type.FILE);
+ try
+ {
+ pdbEntry.setType(PDBEntry.Type.valueOf(strucFormat));
+ } catch (Exception q)
+ {
+ Cache.log.warn("Unknown filetype for 3D Beacons Model from: "
+ + strucFormat + " - " + pdbIdStr + " - " + modelPage);
+ }
+
if (!"PDBe".equalsIgnoreCase(typeColumn))
{
pdbEntry.setRetrievalUrl(urlStr);