From: Jim Procter Date: Fri, 10 May 2024 14:50:55 +0000 (+0100) Subject: JAL-4411 store class of provider in PDBEntry X-Git-Tag: Release_2_11_4_0~37^2~6^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=71ef7ee21f82ceffee78978a695c64db4e7701e2;p=jalview.git JAL-4411 store class of provider in PDBEntry --- 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;