From 24f4f87945c7c5db1fb2c176f95c9aa1b8169440 Mon Sep 17 00:00:00 2001
From: Maximilian Behnert-Brodhun <behnert-brodhun@sub.uni-goettingen.de>
Date: Fri, 25 Feb 2022 12:40:52 +0100
Subject: [PATCH] added images to ListIdentifiers for oai_idiom_mets

---
 .../IdentifierListDelivererIDIOM.java         | 24 ++++++++++++++-----
 .../src/main/webapp/WEB-INF/beans.xml         |  3 ++-
 2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/IdentifierListDelivererIDIOM.java b/oaipmh-core/src/main/java/info/textgrid/middleware/IdentifierListDelivererIDIOM.java
index 1017d416..10e44f99 100644
--- a/oaipmh-core/src/main/java/info/textgrid/middleware/IdentifierListDelivererIDIOM.java
+++ b/oaipmh-core/src/main/java/info/textgrid/middleware/IdentifierListDelivererIDIOM.java
@@ -61,18 +61,30 @@ public class IdentifierListDelivererIDIOM extends IdentifierListDelivererAbstrac
     ListIdentifiersType identifierList = new ListIdentifiersType();
 
     BoolQueryBuilder recordFilterForClassicMayan;
-    RangeQueryBuilder rangeQuery;
 
-    rangeQuery = QueryBuilders.rangeQuery("lastModified").from(from).to(to);
+    BoolQueryBuilder both;
 
-    recordFilterForClassicMayan = QueryBuilders.boolQuery().must(rangeQuery)
+    RangeQueryBuilder rangeQuery = QueryBuilders.rangeQuery("lastModified").from(from).to(to);
+    
+    BoolQueryBuilder test = QueryBuilders.boolQuery()
         .must(QueryBuilders.matchPhraseQuery("project.id",
-            "TGPR-0e926f53-1aba-d415-ecf6-539edcd8a318"))
+        "TGPR-0e926f53-1aba-d415-ecf6-539edcd8a318"));
+
+    BoolQueryBuilder artefact = QueryBuilders.boolQuery()
         .must(QueryBuilders.matchPhraseQuery("format", "text/tg.inputform+rdf+xml"))
         .must(QueryBuilders.matchPhraseQuery("notes", "ARTEFACT"));
+        
+    BoolQueryBuilder conedakor = QueryBuilders.boolQuery()
+        .must(QueryBuilders.matchPhraseQuery("format", "application/json"))
+        .must(QueryBuilders.matchPhraseQuery("notes", "ConedaKorMediumData"));
+
+
+    both = QueryBuilders.boolQuery().should(artefact).should(conedakor);
+
+    BoolQueryBuilder bla = QueryBuilders.boolQuery().must(rangeQuery)
+    .must(test.filter(both));
 
-    // List<String> artefactURIs = new ArrayList<String>();
-    // Queries queries = new Queries();
+    recordFilterForClassicMayan = bla;
 
     SearchResponse scrollResp;
 
diff --git a/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml b/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml
index 42d2dc2b..053beb64 100644
--- a/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -24,7 +24,8 @@
 		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
 		<property name="locations">
 			<list>
-				<value>file:/etc/dhrep/oaipmh/oaipmh.properties</value>
+				<value>file:C:\dev\oai-pmh\oaipmh-webapp\src\main\webapp\WEB-INF\oaipmh.textgrid.properties</value>
+				<!--value>file:/etc/dhrep/oaipmh/oaipmh.properties</value-->
 			</list>
 		</property>
 		<property name="ignoreResourceNotFound" value="true" />
-- 
GitLab