From d36171e2b54163a1aeacb4b3beddc8551536add2 Mon Sep 17 00:00:00 2001 From: Sam Leeflang Date: Mon, 16 Dec 2024 16:40:26 +0100 Subject: [PATCH] Add source system to media --- .../dissco/core/translator/terms/BaseDigitalObjectDirector.java | 2 ++ .../core/translator/terms/DwcaDigitalObjectDirectorTest.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/dissco/core/translator/terms/BaseDigitalObjectDirector.java b/src/main/java/eu/dissco/core/translator/terms/BaseDigitalObjectDirector.java index fef8b0e..6cba2ef 100644 --- a/src/main/java/eu/dissco/core/translator/terms/BaseDigitalObjectDirector.java +++ b/src/main/java/eu/dissco/core/translator/terms/BaseDigitalObjectDirector.java @@ -814,6 +814,8 @@ private List assembleDigitalMediaEntityRelationships( relationships.add( addEntityRelationship(HAS_FDO_TYPE, fdoProperties.getDigitalMediaType(), fdoProperties.getApplicationName(), fdoProperties.getApplicationPID())); + relationships.add(addEntityRelationship(HAS_SOURCE_SYSTEM_ID, digitalMedia.getOdsSourceSystemID(), + fdoProperties.getApplicationName(), fdoProperties.getApplicationPID())); if (digitalMedia.getDctermsRights() != null && digitalMedia.getDctermsRights() .startsWith("http")) { relationships.add( diff --git a/src/test/java/eu/dissco/core/translator/terms/DwcaDigitalObjectDirectorTest.java b/src/test/java/eu/dissco/core/translator/terms/DwcaDigitalObjectDirectorTest.java index 5f5a3ad..a486e16 100644 --- a/src/test/java/eu/dissco/core/translator/terms/DwcaDigitalObjectDirectorTest.java +++ b/src/test/java/eu/dissco/core/translator/terms/DwcaDigitalObjectDirectorTest.java @@ -124,7 +124,7 @@ void testConstructDwcaDigitalMedia() throws JsonProcessingException, Organisatio // Then assertThat(result).isNotNull(); assertThat(result.getOdsHasEntityRelationships()).asInstanceOf(InstanceOfAssertFactories.LIST) - .hasSize(3); + .hasSize(4); assertThat(result.getOdsHasIdentifiers()).asInstanceOf(InstanceOfAssertFactories.LIST) .hasSize(2); }