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 1017d416171539d12665dbd2469c722cac857449..10e44f99c741b014048a1e2167f8733fefdaa25d 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 42d2dc2b5b4fc3c02490c32de3f2e26663b8c3b1..053beb64fbc1e550b264f1e6369a648d0ed9ba89 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" />