From e8ef5ecb9ece5dcb6e710d62095471a80b46a4a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Garc=C3=ADa?= Date: Mon, 21 Oct 2024 16:40:12 +0200 Subject: [PATCH 1/2] Support metadata thumbnails --- src/main/plugin/dcat-ap/extract-relations.xsl | 51 ++++++++++++++++--- .../plugin/dcat-ap/index-fields/index.xsl | 17 ++++++- .../plugin/dcat-ap/layout/config-editor.xml | 9 ++++ .../plugin/dcat-ap/process/thumbnail-add.xsl | 21 +++++--- .../dcat-ap/process/thumbnail-remove.xsl | 7 ++- 5 files changed, 89 insertions(+), 16 deletions(-) diff --git a/src/main/plugin/dcat-ap/extract-relations.xsl b/src/main/plugin/dcat-ap/extract-relations.xsl index 9b30360..09ab4b0 100644 --- a/src/main/plugin/dcat-ap/extract-relations.xsl +++ b/src/main/plugin/dcat-ap/extract-relations.xsl @@ -23,26 +23,65 @@ --> + + + + + + + + + + + + - + + + + + + + + - + - + - + + + + + - <value lang="dut"><xsl:value-of select="dct:title[1]"/></value> + <xsl:for-each select="dct:description"> + <xsl:variable name="localeId" + select="@xml:lang"/> + + <value lang="{$localeId}"> + <xsl:value-of select="."/> + </value> + </xsl:for-each> thumbnail diff --git a/src/main/plugin/dcat-ap/index-fields/index.xsl b/src/main/plugin/dcat-ap/index-fields/index.xsl index b5c265d..a862da8 100644 --- a/src/main/plugin/dcat-ap/index-fields/index.xsl +++ b/src/main/plugin/dcat-ap/index-fields/index.xsl @@ -249,8 +249,21 @@ - - + + + + + + + { + "url": "" + , + "nameObject": + + } + + + + @@ -746,6 +749,9 @@ displayTooltipsMode="onhover" hideTimeInCalendar="true"> + + @@ -889,6 +895,9 @@ + + diff --git a/src/main/plugin/dcat-ap/process/thumbnail-add.xsl b/src/main/plugin/dcat-ap/process/thumbnail-add.xsl index a6b531a..4e48a33 100644 --- a/src/main/plugin/dcat-ap/process/thumbnail-add.xsl +++ b/src/main/plugin/dcat-ap/process/thumbnail-add.xsl @@ -26,15 +26,23 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dct="http://purl.org/dc/terms/" xmlns:dcat="http://www.w3.org/ns/dcat#" - xmlns:adms="http://www.w3.org/ns/adms#" + xmlns:foaf="http://xmlns.com/foaf/0.1/" + xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:geonet="http://www.fao.org/geonetwork" exclude-result-prefixes="#all" version="2.0"> + + + + + + + @@ -55,14 +63,13 @@ - - - + + - + - - + + diff --git a/src/main/plugin/dcat-ap/process/thumbnail-remove.xsl b/src/main/plugin/dcat-ap/process/thumbnail-remove.xsl index 44dac7a..90d3ae3 100644 --- a/src/main/plugin/dcat-ap/process/thumbnail-remove.xsl +++ b/src/main/plugin/dcat-ap/process/thumbnail-remove.xsl @@ -26,6 +26,7 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:adms="http://www.w3.org/ns/adms#" + xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:geonet="http://www.fao.org/geonetwork" exclude-result-prefixes="#all" version="2.0"> @@ -39,7 +40,11 @@ + match="foaf:page[normalize-space(foaf:Document/@rdf:about) = normalize-space($thumbnail_url)]"/> + + From a3125fc8a91d9ebf3eb8ebaf2454ba5d6be02372 Mon Sep 17 00:00:00 2001 From: Francois Prunayre Date: Wed, 23 Oct 2024 10:29:10 +0200 Subject: [PATCH 2/2] Support metadata thumbnails / Use matches as dublin-core schema. Add to full view. Fix some multilingual records exception on indexing. --- src/main/plugin/dcat-ap/extract-relations.xsl | 17 +---------------- .../plugin/dcat-ap/formatter/xsl-view/view.xsl | 4 ++-- src/main/plugin/dcat-ap/index-fields/index.xsl | 7 +++---- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/src/main/plugin/dcat-ap/extract-relations.xsl b/src/main/plugin/dcat-ap/extract-relations.xsl index 09ab4b0..fb180da 100644 --- a/src/main/plugin/dcat-ap/extract-relations.xsl +++ b/src/main/plugin/dcat-ap/extract-relations.xsl @@ -35,21 +35,6 @@ - - - - - - - - - - @@ -61,7 +46,7 @@ - + diff --git a/src/main/plugin/dcat-ap/formatter/xsl-view/view.xsl b/src/main/plugin/dcat-ap/formatter/xsl-view/view.xsl index cfbda98..01a9e47 100644 --- a/src/main/plugin/dcat-ap/formatter/xsl-view/view.xsl +++ b/src/main/plugin/dcat-ap/formatter/xsl-view/view.xsl @@ -193,11 +193,11 @@ - + {$schemaStrings/overview} + src="{normalize-space(@rdf:about)}"/>
diff --git a/src/main/plugin/dcat-ap/index-fields/index.xsl b/src/main/plugin/dcat-ap/index-fields/index.xsl index a862da8..2994e95 100644 --- a/src/main/plugin/dcat-ap/index-fields/index.xsl +++ b/src/main/plugin/dcat-ap/index-fields/index.xsl @@ -252,7 +252,7 @@ + select="foaf:page/foaf:Document[matches(@rdf:about, '.*(.gif|.png|.jpeg|.jpg)$', 'i')]"/> @@ -621,7 +621,6 @@ - @@ -631,7 +630,7 @@ + select="concat(vcard:street-address[1], ', ', vcard:locality[1], ', ', vcard:postal-code[1], ', ', vcard:country-name[1])"/> @@ -655,7 +654,7 @@ "website":"", "individual":"", "phone":"", - "address":"" + "address":"" }