From 1131c73e47389f056ac8feafa3ac74691d97430f Mon Sep 17 00:00:00 2001 From: lindareijnhoudt Date: Tue, 23 Nov 2021 12:04:17 +0100 Subject: [PATCH] DD-709: Give dataverse.other-id a prefix for PAN (#65) --- .../DepositPropertiesFactory.scala | 2 +- .../DepositPropertiesFactorySpec.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/nl.knaw.dans.easy.bag2deposit/DepositPropertiesFactory.scala b/src/main/scala/nl.knaw.dans.easy.bag2deposit/DepositPropertiesFactory.scala index 28e31e9f..06fd4f22 100644 --- a/src/main/scala/nl.knaw.dans.easy.bag2deposit/DepositPropertiesFactory.scala +++ b/src/main/scala/nl.knaw.dans.easy.bag2deposit/DepositPropertiesFactory.scala @@ -86,7 +86,7 @@ case class DepositPropertiesFactory(configuration: Configuration, idType: IdType addProperty("dataverse.sword-token", bagInfo.versionOf.getOrElse(bagInfo.uuid)) addProperty("dataverse.nbn", basePids.urn) formatOfPanId.foreach(node => - addProperty("dataverse.other-id", node.text) + addProperty("dataverse.other-id", node.text.replace("-",":")) ) case FEDORA => addProperty("dataverse.nbn", basePids.urn) diff --git a/src/test/scala/nl.knaw.dans.easy.bag2deposit/DepositPropertiesFactorySpec.scala b/src/test/scala/nl.knaw.dans.easy.bag2deposit/DepositPropertiesFactorySpec.scala index 3efde601..a3fe4ce3 100644 --- a/src/test/scala/nl.knaw.dans.easy.bag2deposit/DepositPropertiesFactorySpec.scala +++ b/src/test/scala/nl.knaw.dans.easy.bag2deposit/DepositPropertiesFactorySpec.scala @@ -112,7 +112,7 @@ class DepositPropertiesFactorySpec extends AnyFlatSpec with Matchers with AppCon |bag-store.bag-id = $bagUUID |dataverse.sword-token = $baseUUID |dataverse.nbn = urn:nbn:nl:ui:13-z4-f8cm - |dataverse.other-id = PAN-00019180 + |dataverse.other-id = PAN:00019180 |dataverse.bag-id = urn:uuid:$bagUUID |dataverse.id-protocol = urn |dataverse.id-identifier = z4-f8cm