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 f917270d8a88f9da0a9c4f27bf0235caa230838f..0fbcd7a00e507a8d95cb43a2491c02a565fc1610 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);