Merge branch 'ui-redesign' of gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot into ui-redesign
This commit is contained in:
commit
3d51b6bd3c
|
@ -1684,21 +1684,26 @@ 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 (((Boolean)extraProperties.get("visible"))) {
|
if (extraProperties.get("visible") == null) {
|
||||||
Instant publicationDate = Instant.parse(extraProperties.get("publicDate").toString());
|
|
||||||
if (publicationDate.isBefore(Instant.now())) {
|
|
||||||
dataBuilder.append("open\",\n");
|
|
||||||
} else {
|
|
||||||
dataBuilder.append("embargoed\",\n");
|
|
||||||
dataBuilder.append(" \"embargo_date\": \"" + publicationDate + "\",\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (extraProperties.get("license") != null) {
|
|
||||||
dataBuilder.append(" \"license\": \"").append(((Map)extraProperties.get("license")).get("pid")).append("\",\n");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
dataBuilder.append("restricted\",\n");
|
dataBuilder.append("restricted\",\n");
|
||||||
dataBuilder.append(" \"access_conditions\": \"\",\n");
|
dataBuilder.append(" \"access_conditions\": \"\",\n");
|
||||||
|
} else {
|
||||||
|
if (((Boolean) extraProperties.get("visible"))) {
|
||||||
|
Instant publicationDate = Instant.parse(extraProperties.get("publicDate").toString());
|
||||||
|
if (publicationDate.isBefore(Instant.now())) {
|
||||||
|
dataBuilder.append("open\",\n");
|
||||||
|
} else {
|
||||||
|
dataBuilder.append("embargoed\",\n");
|
||||||
|
dataBuilder.append(" \"embargo_date\": \"" + publicationDate + "\",\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (extraProperties.get("license") != null) {
|
||||||
|
dataBuilder.append(" \"license\": \"").append(((Map) extraProperties.get("license")).get("pid")).append("\",\n");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dataBuilder.append("restricted\",\n");
|
||||||
|
dataBuilder.append(" \"access_conditions\": \"\",\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (dmp.isPublic()) {
|
if (dmp.isPublic()) {
|
||||||
dataBuilder.append(" \"related_identifiers\": [{\n");
|
dataBuilder.append(" \"related_identifiers\": [{\n");
|
||||||
|
|
Loading…
Reference in New Issue