From ffe8282c432719b82a2212a2f34d2c0ee7f1fb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Prunayre?= Date: Thu, 10 Oct 2024 12:45:53 +0200 Subject: [PATCH] Thesaurus / OWL format / Mobility theme hierarchy (#8393) * Thesaurus / OWL format / Mobility theme hierarchy Follow up of https://github.com/geonetwork/core-geonetwork/pull/7674 Mobility DCAT theme vocabulary top concepts is available at https://mobilitydcat-ap.github.io/controlled-vocabularies/mobility-theme/latest/index.html#/ The vocabulary contains 2 top concepts: ```xml ``` which are not really needed for browsing the main categories and sub categories. Use the narrower terms of the "content category" top concept as the top concepts of the scheme to facilitate keyword selection in editor and generate proper facet hierarchy in search. * Fix test The 2 default top concepts of the vocabulary are replaced by correct one. --- .../vocabularies/KeywordsApiTest.java | 2 +- .../xslt/services/thesaurus/owl-to-skos.xsl | 61 ++++++++++++++++--- 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/services/src/test/java/org/fao/geonet/api/registries/vocabularies/KeywordsApiTest.java b/services/src/test/java/org/fao/geonet/api/registries/vocabularies/KeywordsApiTest.java index 01871cb85a0..2545a897882 100644 --- a/services/src/test/java/org/fao/geonet/api/registries/vocabularies/KeywordsApiTest.java +++ b/services/src/test/java/org/fao/geonet/api/registries/vocabularies/KeywordsApiTest.java @@ -249,6 +249,6 @@ public void testImportOntologyToSkos() throws Exception { "Mobility Theme", scheme.getChildText("title", NAMESPACE_DCT)); List concepts = thesaurus.getChildren("Concept", SKOS_NAMESPACE); - assertEquals(123, concepts.size()); + assertEquals(121, concepts.size()); } } diff --git a/web/src/main/webapp/xslt/services/thesaurus/owl-to-skos.xsl b/web/src/main/webapp/xslt/services/thesaurus/owl-to-skos.xsl index 449ee6d70d5..b7a71380331 100644 --- a/web/src/main/webapp/xslt/services/thesaurus/owl-to-skos.xsl +++ b/web/src/main/webapp/xslt/services/thesaurus/owl-to-skos.xsl @@ -24,9 +24,9 @@ @@ -40,12 +40,38 @@ - + + + + + - + + + + + + + + + + + + + + + + + + - + + + + + + + +