From: Jim Procter Date: Mon, 20 Sep 2021 10:14:41 +0000 (+0100) Subject: JAL-3829 store 3db metadata on PDBEntry so it can be shown in Cache/etc X-Git-Tag: Release_2_11_2_0~34^2~3^2~11 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=00c42e936827790e689ecd5ff7d7781ecabe2313;p=jalview.git JAL-3829 store 3db metadata on PDBEntry so it can be shown in Cache/etc --- diff --git a/src/jalview/datamodel/PDBEntry.java b/src/jalview/datamodel/PDBEntry.java index 793fbd7..b3e17bf 100755 --- a/src/jalview/datamodel/PDBEntry.java +++ b/src/jalview/datamodel/PDBEntry.java @@ -477,16 +477,32 @@ public class PDBEntry return true; } + private boolean _hasProperty(final String key) + { + return (properties != null && properties.containsKey(key)); + } + + private static final String RETRIEVE_FROM = "RETRIEVE_FROM"; + + private static final String PROVIDER = "PROVIDER"; + + private static final String MODELPAGE = "PROVIDERPAGE"; - private static final String RETRIEVE_FROM="RETRIEVE_FROM"; /** * Permanent URI for retrieving the original structure data + * * @param urlStr */ public void setRetrievalUrl(String urlStr) { setProperty(RETRIEVE_FROM, urlStr); } + + public boolean hasRetrievalUrl() + { + return _hasProperty(RETRIEVE_FROM); + } + /** * get the Permanent URI for retrieving the original structure data */ @@ -495,8 +511,50 @@ public class PDBEntry return (String) getProperty(RETRIEVE_FROM); } - public boolean hasRetrievalUrl() + /** + * Data provider name - from 3D Beacons + * + * @param provider + */ + public void setProvider(String provider) + { + setProperty(PROVIDER, provider); + } + + /** + * Get Data provider name - from 3D Beacons + * + */ + public String getProvider() + { + return (String) getProperty(PROVIDER); + } + + /** + * Permanent URI for retrieving the original structure data + * + * @param urlStr + */ + public void setProviderPage(String urlStr) + { + setProperty(MODELPAGE, urlStr); + } + + /** + * get the Permanent URI for retrieving the original structure data + */ + public String getProviderPage() + { + return (String) getProperty(MODELPAGE); + } + + public boolean hasProviderPage() + { + return _hasProperty(MODELPAGE); + } + + public boolean hasProvider() { - return (properties!=null && properties.containsKey(RETRIEVE_FROM)); + return _hasProperty(PROVIDER); } }