From 71ef7ee21f82ceffee78978a695c64db4e7701e2 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 10 May 2024 15:50:55 +0100 Subject: [PATCH] JAL-4411 store class of provider in PDBEntry --- src/jalview/datamodel/PDBEntry.java | 18 ++++++++++++++++++ .../ThreeDBStructureChooserQuerySource.java | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/src/jalview/datamodel/PDBEntry.java b/src/jalview/datamodel/PDBEntry.java index ae8523d..c3906f9 100755 --- a/src/jalview/datamodel/PDBEntry.java +++ b/src/jalview/datamodel/PDBEntry.java @@ -560,6 +560,8 @@ public class PDBEntry private static final String MODELPAGE = "PROVIDERPAGE"; + private static final String PROVIDERCATEGORY = "PROVIDERCATEGORY"; + /** * Permanent URI for retrieving the original structure data * @@ -644,4 +646,20 @@ public class PDBEntry { return sf != null && sf.inFile != null && sf.inFile.exists(); } + + public void setProviderCategory(String providerCategory) + { + setProperty(PROVIDERCATEGORY, providerCategory); + } + + public String getProviderCategory() + { + return (String) getProperty(PROVIDERCATEGORY); + } + + public boolean hasProviderCategory() + { + return _hasProperty(PROVIDERCATEGORY); + } + } diff --git a/src/jalview/gui/structurechooser/ThreeDBStructureChooserQuerySource.java b/src/jalview/gui/structurechooser/ThreeDBStructureChooserQuerySource.java index 76ef85f..f585b0c 100644 --- a/src/jalview/gui/structurechooser/ThreeDBStructureChooserQuerySource.java +++ b/src/jalview/gui/structurechooser/ThreeDBStructureChooserQuerySource.java @@ -387,6 +387,8 @@ public class ThreeDBStructureChooserQuerySource int typeColumnIndex = restable.getColumn("Provider").getModelIndex(); int humanUrl = restable.getColumn("Page URL").getModelIndex(); int modelformat = restable.getColumn("Model Format").getModelIndex(); + int idx_mcat = restable.getColumn("Model Category").getModelIndex(); + final int up_start_idx = restable.getColumn("Uniprot Start") .getModelIndex(); final int up_end_idx = restable.getColumn("Uniprot End") @@ -423,6 +425,9 @@ public class ThreeDBStructureChooserQuerySource .toString(); String modelPage = humanUrl < 1 ? null : (String) restable.getValueAt(row, humanUrl); + + String modelCategory = idx_mcat < 1 ? null :(String) restable.getValueAt(row,idx_mcat); + String strucFormat = restable.getValueAt(row, modelformat).toString(); SequenceI selectedSeq = (SequenceI) restable.getValueAt(row, @@ -457,6 +462,7 @@ public class ThreeDBStructureChooserQuerySource { pdbEntry.setProviderPage(modelPage); } + pdbEntry.setProviderClass(modelCategory); selectedSeq.getDatasetSequence().addPDBId(pdbEntry); } pdbEntriesToView[count++] = pdbEntry; -- 1.7.10.2