This commit is contained in:
Miriam Baglioni 2024-03-04 08:45:29 +01:00
parent 752fd896e4
commit 7b715b2bb8
1 changed files with 6 additions and 6 deletions

View File

@ -199,18 +199,18 @@ public class DumpResult implements Serializable {
manifestation.setAccess_right(AccessRight.UNAVAILABLE.label); manifestation.setAccess_right(AccessRight.UNAVAILABLE.label);
} }
manifestation manifestation
.setLicence( .setLicence(
Optional Optional
.ofNullable(epm.getInstance().getLicense()) .ofNullable(epm.getInstance().getLicense())
.map(value -> value.getValue()) .map(value -> value.getValue())
.orElse(null)); .orElse(null));
manifestation if(Optional.ofNullable(epm.getInstance().getUrl()).isPresent() && epm.getInstance().getUrl().size() > 0)
.setUrl( manifestation
Optional .setUrl(epm.getInstance().getUrl().get(0));
.ofNullable(epm.getInstance().getUrl()) else
.map(value -> value.get(0)) manifestation.setUrl(null);
.orElse(null));
if (Optional.ofNullable(epm.getInstance().getPid()).isPresent() && epm.getInstance().getPid().size() > 0) { if (Optional.ofNullable(epm.getInstance().getPid()).isPresent() && epm.getInstance().getPid().size() > 0) {
manifestation.setPid(epm.getInstance().getPid().get(0).getValue()); manifestation.setPid(epm.getInstance().getPid().get(0).getValue());