Commit 738179ee authored by Piotr Gawron's avatar Piotr Gawron
Browse files

pubmed parser uses new ssl api

parent b916ab63
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment