Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
738179ee
Commit
738179ee
authored
Jan 17, 2018
by
Piotr Gawron
Browse files
pubmed parser uses new ssl api
parent
b916ab63
Changes
1
Hide whitespace changes
Inline
Side-by-side
annotation/src/main/java/lcsb/mapviewer/annotation/services/PubmedParser.java
View file @
738179ee
...
...
@@ -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="http
s
://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"
,
"http
s
://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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment