Use of doi instead of concept_doi

This commit is contained in:
Fabio Sinibaldi 2020-02-03 18:14:26 +01:00
parent a17af1d1a4
commit da2158db6a
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ public class ZenodoDeposition {
@JsonFormat(pattern = Commons.ISO_DATE_PATTERN)
private Date created;
private String doi;
private String doi_url;
private DepositionLinks links;
private ArrayList<FileDeposition> files;
private Integer id;
@ -32,7 +33,7 @@ public class ZenodoDeposition {
public URL getDOIUrl() throws MalformedURLException {
try {
return new URL(links.getConceptdoi());
return new URL(doi_url);
}catch(Throwable t) {
log.warn("Returned concept link is broken, forming it from doi..");
return new URL("https://doi.org/"+doi);