From 22c0e77e1b9c10c504128232e9bad8f5fa9c4f3c Mon Sep 17 00:00:00 2001
From: Maximilian Brodhun <brodhun@sub.uni-goettingen.de>
Date: Mon, 9 Mar 2020 10:59:04 +0100
Subject: [PATCH] new version of metsModsMapping for IDIOM

---
 oaipmh-core/pom.xml                                   |  2 +-
 .../textgrid/middleware/RecordDelivererIDIOM.java     |  2 ++
 .../java/info/textgrid/middleware/OaiPmhTest.java     | 11 ++++++-----
 .../middleware/OaiPmhTextgridOnlineTests.java         |  4 ++--
 oaipmh-webapp/pom.xml                                 |  2 +-
 pom.xml                                               |  2 +-
 6 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/oaipmh-core/pom.xml b/oaipmh-core/pom.xml
index 8f8d3410..42f38962 100644
--- a/oaipmh-core/pom.xml
+++ b/oaipmh-core/pom.xml
@@ -84,7 +84,7 @@
 		<dependency>
 			<groupId>org.classicmayan.tools</groupId>
 			<artifactId>metsModsMapping</artifactId>
-			<version>1.0</version>
+			<version>1.1.4</version>
 		</dependency>
 		<dependency>
 			<groupId>de.shadowhunt.maven.plugins</groupId>
diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDelivererIDIOM.java b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDelivererIDIOM.java
index 3fc1607f..e0bc710c 100644
--- a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDelivererIDIOM.java
+++ b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDelivererIDIOM.java
@@ -76,8 +76,10 @@ public class RecordDelivererIDIOM extends RecordDelivererAbstract {
 
     GetResponse objectInDatabase = recordById.execute().actionGet();
 
+    System.out.println("id in elasticsearch is: " + changedId);
     this.dateOfObjectCreation =
         objectInDatabase.getField(TGConstants.CREATED).getValue().toString();
+    
     this.dateOfLastOblectModification =
         objectInDatabase.getField(TGConstants.MODIFIED_FIELD).getValue().toString();
   }
diff --git a/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTest.java b/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTest.java
index 8aa5dc45..75713ab5 100644
--- a/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTest.java
+++ b/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTest.java
@@ -361,12 +361,13 @@ public class OaiPmhTest {
     String resToken = "";
     for (Map.Entry<String, Integer> entry : RecordListDelivererIDIOM.cursorCollector.entrySet()) {
       resToken = entry.getKey();
+      String p2 = this.request.getRequest("ListRecords", "", "", "", "", "", resToken);
+      System.out.println(p2);
+      System.out.println("HASH MAP AFTER: ");
+      System.out.println(RecordListDelivererIDIOM.cursorCollector);
+      System.out.println("-----------------------------------\n");
     }
-    String p2 = this.request.getRequest("ListRecords", "", "", "", "", "", resToken);
-    System.out.println(p2);
-    System.out.println("HASH MAP AFTER: ");
-    System.out.println(RecordListDelivererIDIOM.cursorCollector);
-    System.out.println("-----------------------------------\n");
+
   }
 
   /**
diff --git a/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java b/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java
index a8ed9cfe..952f88aa 100644
--- a/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java
+++ b/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java
@@ -338,7 +338,7 @@ public class OaiPmhTextgridOnlineTests {
 
     // Do not test on dev.textgridlab.org.
     if (!host.contains("dev.textgridlab.org")) {
-      testList(VERB_LIST_RECORDS, NO_SET, OAI_IDIOMMETS_PREFIX, 3, 30, NO_THREAD_NAME);
+      testList(VERB_LIST_RECORDS, NO_SET, OAI_IDIOMMETS_PREFIX, 100, 30, NO_THREAD_NAME);
     }
 
     System.out.println(OK);
@@ -699,7 +699,6 @@ public class OaiPmhTextgridOnlineTests {
       throws IOException {
 
     String res = IOUtils.readStringFromStream(theResponse.getInputstream());
-
     // Test for OAIPMH errors.
     if (res.contains("<error code=\"badArgument\">")) {
       System.err.println(theThreadName + ERROR + " IN OAIPMH RESPONSE: " + res);
@@ -853,6 +852,7 @@ public class OaiPmhTextgridOnlineTests {
                 + loopCount + (numberOfPagesToTest != 0 ? "/" + numberOfPagesToTest : "") + ")");
         restok = examineResumptionTokenTag(httpResponse, testOccurance, restok,
             recordsExpectedPerRequest, loopCount, theThreadName);
+
       }
     }
 
diff --git a/oaipmh-webapp/pom.xml b/oaipmh-webapp/pom.xml
index 14dfb55c..9517cb52 100644
--- a/oaipmh-webapp/pom.xml
+++ b/oaipmh-webapp/pom.xml
@@ -5,7 +5,7 @@
 	<parent>
 		<artifactId>oaipmh</artifactId>
 		<groupId>info.textgrid.middleware</groupId>
-		<version>3.1.9-SNAPSHOT</version>
+		<version>3.1.10</version>
 	</parent>
 	<groupId>info.textgrid.middleware</groupId>
 	<artifactId>oaipmh-webapp</artifactId>
diff --git a/pom.xml b/pom.xml
index d831e36e..0a8fa50a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>info.textgrid.middleware</groupId>
 	<artifactId>oaipmh</artifactId>
-	<version>3.1.9-SNAPSHOT</version>
+	<version>3.1.10</version>
 	<packaging>pom</packaging>
 	<name>DARIAHDE :: OAI-PMH DataProvider</name>
 	<properties>
-- 
GitLab