From 0af6926bff8b8c6ab4ce08f050d2b3c0d9c5f63d Mon Sep 17 00:00:00 2001 From: GeoNetwork opensource <59019313+geonetworkbuild@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:26:34 +0200 Subject: [PATCH] Standard / ISO19115-3 / Only search for associated record with UUID (#8418) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sources or feature catalogue reference may be described using description or uuidref. Do not consider text description while searching for associated records. eg. ```xml Le référentiel utilisé comme trait de côte est celui de Ifremer-Shom au 1/25 000 (date de révision 1995). ``` This is not really visible but avoid to do search with an empty id in `MetadataUtils#getAssociated` Co-authored-by: François Prunayre --- .../schema/iso19115_3_2018/ISO19115_3_2018SchemaPlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/iso19115-3.2018/src/main/java/org/fao/geonet/schema/iso19115_3_2018/ISO19115_3_2018SchemaPlugin.java b/schemas/iso19115-3.2018/src/main/java/org/fao/geonet/schema/iso19115_3_2018/ISO19115_3_2018SchemaPlugin.java index 5eadc0f62ca..f441859f0f9 100644 --- a/schemas/iso19115-3.2018/src/main/java/org/fao/geonet/schema/iso19115_3_2018/ISO19115_3_2018SchemaPlugin.java +++ b/schemas/iso19115-3.2018/src/main/java/org/fao/geonet/schema/iso19115_3_2018/ISO19115_3_2018SchemaPlugin.java @@ -179,7 +179,7 @@ public Set getAssociatedFeatureCatalogueUUIDs(Element metadata) { @Override public Set getAssociatedFeatureCatalogues(Element metadata) { - return collectAssociatedResources(metadata, "*//mrc:featureCatalogueCitation[@uuidref]"); + return collectAssociatedResources(metadata, "*//mrc:featureCatalogueCitation[@uuidref != '']"); } public Set getAssociatedSourceUUIDs(Element metadata) { @@ -191,7 +191,7 @@ public Set getAssociatedSourceUUIDs(Element metadata) { @Override public Set getAssociatedSources(Element metadata) { - return collectAssociatedResources(metadata, "*//mrl:source"); + return collectAssociatedResources(metadata, "*//mrl:source[@uuidref != '']"); } private Set collectAssociatedResources(Element metadata, String xpath) {