From e880e37bedc45b755cf120a7bc9313185d1e5d9c Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Thu, 14 Dec 2023 09:12:11 +0100 Subject: [PATCH 1/3] Initial commit From 6989e8f4d12fc7d960a0b7a643ef35a46bffbded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Ko=C5=A1arko?= Date: Thu, 14 Dec 2023 09:13:32 +0100 Subject: [PATCH 2/3] fixes ufal/clarin-dspace#1096 (#471) --- dspace/config/spring/api/discovery.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dspace/config/spring/api/discovery.xml b/dspace/config/spring/api/discovery.xml index 9b8b8351fe55..d40242314260 100644 --- a/dspace/config/spring/api/discovery.xml +++ b/dspace/config/spring/api/discovery.xml @@ -200,6 +200,7 @@ + @@ -2488,6 +2489,17 @@ + + + + + dc.publisher + + + + + + From 9d07cab690e410bb8cc0f896ce44898f67bbc9cd Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Thu, 14 Dec 2023 09:41:45 +0100 Subject: [PATCH 3/3] Added publisher filter in the integration test check --- .../app/rest/ClarinDiscoveryRestControllerIT.java | 1 + .../dspace/app/rest/matcher/SearchFilterMatcher.java | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinDiscoveryRestControllerIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinDiscoveryRestControllerIT.java index 95051697a462..72b12c7962af 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinDiscoveryRestControllerIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ClarinDiscoveryRestControllerIT.java @@ -984,6 +984,7 @@ public void discoverSearchTest() throws Exception { SearchFilterMatcher.authorFilter(), SearchFilterMatcher.subjectFilter(), // SearchFilterMatcher.dateIssuedFilter(), + SearchFilterMatcher.publisherFilter(), SearchFilterMatcher.hasContentInOriginalBundleFilter(), SearchFilterMatcher.hasFileNameInOriginalBundleFilter(), SearchFilterMatcher.hasFileDescriptionInOriginalBundleFilter(), diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/matcher/SearchFilterMatcher.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/matcher/SearchFilterMatcher.java index 2d38aeb12968..7700d5291249 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/matcher/SearchFilterMatcher.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/matcher/SearchFilterMatcher.java @@ -195,4 +195,15 @@ public static Matcher clarinItemsTypeFilter() { checkOperators() ); } + + public static Matcher publisherFilter() { + return allOf( + hasJsonPath("$.filter", is("publisher")), + hasJsonPath("$.hasFacets", is(false)), + hasJsonPath("$.type", is("text")), + hasJsonPath("$.openByDefault", is(false)), + checkOperators() + + ); + } }