If DMP is lacking the visibility option then create a Zenodo DOI with resstricted file access and no license
This commit is contained in:
parent
097c862ab6
commit
a728e7da4a
|
@ -1684,6 +1684,10 @@ public class DataManagementPlanManager {
|
||||||
dataBuilder.append(" \"description\": \"").append((dmp.getDescription() != null && !dmp.getDescription().isEmpty() ? dmp.getDescription() : "<p></p>")).append("\",\n");
|
dataBuilder.append(" \"description\": \"").append((dmp.getDescription() != null && !dmp.getDescription().isEmpty() ? dmp.getDescription() : "<p></p>")).append("\",\n");
|
||||||
dataBuilder.append(" \"version\": \"").append(dmp.getVersion()).append("\",\n");
|
dataBuilder.append(" \"version\": \"").append(dmp.getVersion()).append("\",\n");
|
||||||
dataBuilder.append(" \"access_right\": \"");
|
dataBuilder.append(" \"access_right\": \"");
|
||||||
|
if (extraProperties.get("visible") == null) {
|
||||||
|
dataBuilder.append("restricted\",\n");
|
||||||
|
dataBuilder.append(" \"access_conditions\": \"\",\n");
|
||||||
|
} else {
|
||||||
if (((Boolean) extraProperties.get("visible"))) {
|
if (((Boolean) extraProperties.get("visible"))) {
|
||||||
Instant publicationDate = Instant.parse(extraProperties.get("publicDate").toString());
|
Instant publicationDate = Instant.parse(extraProperties.get("publicDate").toString());
|
||||||
if (publicationDate.isBefore(Instant.now())) {
|
if (publicationDate.isBefore(Instant.now())) {
|
||||||
|
@ -1700,6 +1704,7 @@ public class DataManagementPlanManager {
|
||||||
dataBuilder.append("restricted\",\n");
|
dataBuilder.append("restricted\",\n");
|
||||||
dataBuilder.append(" \"access_conditions\": \"\",\n");
|
dataBuilder.append(" \"access_conditions\": \"\",\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (dmp.isPublic()) {
|
if (dmp.isPublic()) {
|
||||||
dataBuilder.append(" \"related_identifiers\": [{\n");
|
dataBuilder.append(" \"related_identifiers\": [{\n");
|
||||||
dataBuilder.append(" \t\t\"identifier\": \"").append((this.environment.getProperty("dmp.domain") + "/external/zenodo/" + id.toString())).append("\",\n");
|
dataBuilder.append(" \t\t\"identifier\": \"").append((this.environment.getProperty("dmp.domain") + "/external/zenodo/" + id.toString())).append("\",\n");
|
||||||
|
|
Loading…
Reference in New Issue