From 972f20c4d098b40e5e6b54bc336099def92149aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Lindo?= Date: Thu, 29 Feb 2024 13:13:40 +0000 Subject: [PATCH] Fixed metadata files wrongly named --- src/main/java/org/roda/rodain/core/creation/EarkSipCreator.java | 2 +- .../java/org/roda/rodain/core/creation/HungarianSipCreator.java | 2 +- src/main/java/org/roda/rodain/core/creation/SipCreator.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/roda/rodain/core/creation/EarkSipCreator.java b/src/main/java/org/roda/rodain/core/creation/EarkSipCreator.java index b8f234d8..6da3fc6f 100644 --- a/src/main/java/org/roda/rodain/core/creation/EarkSipCreator.java +++ b/src/main/java/org/roda/rodain/core/creation/EarkSipCreator.java @@ -145,7 +145,7 @@ private Pair createEarkSip(Sip descriptionObject) { if (metadataPath == null) { String content = descriptionObject.getMetadataWithReplaces(descObjMetadata); - metadataPath = tempDir.resolve(descObjMetadata.getId()); + metadataPath = descObjMetadata.getPath(); FileUtils.writeStringToFile(metadataPath.toFile(), content, Constants.RODAIN_DEFAULT_ENCODING); } diff --git a/src/main/java/org/roda/rodain/core/creation/HungarianSipCreator.java b/src/main/java/org/roda/rodain/core/creation/HungarianSipCreator.java index a1ef9f1d..8d0b62d9 100644 --- a/src/main/java/org/roda/rodain/core/creation/HungarianSipCreator.java +++ b/src/main/java/org/roda/rodain/core/creation/HungarianSipCreator.java @@ -144,7 +144,7 @@ private Pair createHungarianSip(Sip descriptionObject) { if (metadataPath == null) { String content = descriptionObject.getMetadataWithReplaces(descObjMetadata); - metadataPath = tempDir.resolve(descObjMetadata.getId()); + metadataPath = descObjMetadata.getPath(); FileUtils.writeStringToFile(metadataPath.toFile(), content, Constants.RODAIN_DEFAULT_ENCODING); } diff --git a/src/main/java/org/roda/rodain/core/creation/SipCreator.java b/src/main/java/org/roda/rodain/core/creation/SipCreator.java index 922ef182..0c608242 100644 --- a/src/main/java/org/roda/rodain/core/creation/SipCreator.java +++ b/src/main/java/org/roda/rodain/core/creation/SipCreator.java @@ -204,7 +204,7 @@ protected Pair createEarkSip(final Sip descriptionObject) { if (metadataPath == null) { final String content = descriptionObject.getMetadataWithReplaces(descObjMetadata); - metadataPath = tempDir.resolve(descObjMetadata.getId()); + metadataPath = descObjMetadata.getPath(); FileUtils.writeStringToFile(metadataPath.toFile(), content, Constants.RODAIN_DEFAULT_ENCODING); }