From 738179ee6e01ced1db7fc03ac7b4df2750353cec Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Wed, 17 Jan 2018 15:48:44 +0100 Subject: [PATCH] pubmed parser uses new ssl api --- .../mapviewer/annotation/services/PubmedParser.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/annotation/src/main/java/lcsb/mapviewer/annotation/services/PubmedParser.java b/annotation/src/main/java/lcsb/mapviewer/annotation/services/PubmedParser.java index f917270d8a..0fbcd7a00e 100644 --- a/annotation/src/main/java/lcsb/mapviewer/annotation/services/PubmedParser.java +++ b/annotation/src/main/java/lcsb/mapviewer/annotation/services/PubmedParser.java @@ -29,7 +29,7 @@ import lcsb.mapviewer.model.map.MiriamType; /** * This class is a backend to publically available pubmed API in - * <a href="http://europepmc.org/RestfulWebService">Europe PubMed Central </a>. + * <a href="https://europepmc.org/RestfulWebService">Europe PubMed Central </a>. * * @author Piotr Gawron * @@ -57,6 +57,8 @@ public class PubmedParser extends CachableInterface implements IExternalService */ static final String SUPPORTED_VERSION = "5.2.2"; + static final String API_URL = "https://www.ebi.ac.uk/europepmc/webservices/rest/"; + /** * Connector used for accessing data from miriam registry. */ @@ -131,7 +133,7 @@ public class PubmedParser extends CachableInterface implements IExternalService result = new Article(); try { - String url = "http://www.ebi.ac.uk/europepmc/webservices/rest/search/resulttype=core&query=" + String url = API_URL+"search/resulttype=core&query=" + java.net.URLEncoder.encode("src:med ext_id:" + id, "UTF-8"); String content = getWebPageContent(url); @@ -261,7 +263,7 @@ public class PubmedParser extends CachableInterface implements IExternalService @Override public ExternalServiceStatus getServiceStatus() { - ExternalServiceStatus status = new ExternalServiceStatus("Europe PubMed Central", "http://europepmc.org/RestfulWebService"); + ExternalServiceStatus status = new ExternalServiceStatus("Europe PubMed Central", "https://europepmc.org/RestfulWebService"); GeneralCacheInterface cacheCopy = getCache(); this.setCache(null); @@ -292,7 +294,7 @@ public class PubmedParser extends CachableInterface implements IExternalService */ public String getApiVersion() throws PubmedSearchException { try { - String url = "http://www.ebi.ac.uk/europepmc/webservices/rest/search/resulttype=core&query=src%3Amed+ext_id%3A23644949"; + String url = API_URL+"search/resulttype=core&query=src%3Amed+ext_id%3A23644949"; String content = getWebPageContent(url); -- GitLab