From ecc541cc50a1582a2f4b4bc9fac728a92760a823 Mon Sep 17 00:00:00 2001
From: Maximilian Behnert-Brodhun <behnert-brodhun@sub.uni-goettingen.de>
Date: Thu, 1 Jul 2021 13:11:30 +0200
Subject: [PATCH] use correct fieldLoader function for DC in ListRecords

---
 .../info/textgrid/middleware/RecordListDelivererDC.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java
index 99a8b99d..96d0a3e8 100644
--- a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java
+++ b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java
@@ -344,7 +344,8 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract {
     result.setDescription(
         DublinCoreFieldLoader.fillList(responseWorkValues, this.descriptionList));
     result.setFormat(DublinCoreFieldLoader.fillList(hit, this.formatList));
-    result.setIdentifier(DublinCoreFieldLoader.fillList(hit, this.identifierList));
+    //result.setIdentifier(DublinCoreFieldLoader.fillList(hit, this.identifierList));
+    result.setIdentifier(OAIPMHUtilities.fieldLoader(new JSONObject(hit.getSourceAsMap()), fields));
     result.setLanguage(DublinCoreFieldLoader.fillList(hit, this.languageList));
     result.setPublisher(DublinCoreFieldLoader.fillList(hit, this.publisherList));
     result.setRelation(DublinCoreFieldLoader.fillList(hit, this.relationList));
@@ -377,7 +378,8 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract {
     result.setDate(DublinCoreFieldLoader.fillList(hit, this.dateList));
     result.setDescription(DublinCoreFieldLoader.fillList(hit, this.descriptionList));
     result.setFormat(DublinCoreFieldLoader.fillList(hit, this.formatList));
-    result.setIdentifier(DublinCoreFieldLoader.fillList(hit, this.identifierList));
+    //result.setIdentifier(DublinCoreFieldLoader.fillList(hit, this.identifierList));
+    result.setIdentifier(OAIPMHUtilities.fieldLoader(new JSONObject(hit.getSourceAsMap()), fields));
     result.setLanguage(DublinCoreFieldLoader.fillList(hit, this.languageList));
     result.setPublisher(DublinCoreFieldLoader.fillList(hit, this.publisherList));
     result.setRelation(DublinCoreFieldLoader.fillList(hit, this.relationList));
-- 
GitLab