From 0e4696bb3c052dfdf893fb07015e6afcd4b61dcd Mon Sep 17 00:00:00 2001 From: Fabian Steeg Date: Thu, 28 Nov 2024 11:12:53 +0100 Subject: [PATCH] Transform `alternativeSpelling` to `titleKeyword` (RPB-114) To hide field in details view, but keep it searchable --- conf/output/test-output-5.json | 2 +- conf/rpb-titel-to-lobid.fix | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/conf/output/test-output-5.json b/conf/output/test-output-5.json index 42a149a..de7c828 100644 --- a/conf/output/test-output-5.json +++ b/conf/output/test-output-5.json @@ -10,7 +10,7 @@ "label" : "Rheinland-Pfälzische Bibliographie" } ], "title" : "Sagas légendes des bords du Rhin [Elektronische Ressource] : orné de 8 gravures sur acier", - "alternativeTitle" : [ "Düsseldorf" ], + "titleKeyword" : [ "Düsseldorf" ], "extent" : "[1] Bl., VIII, 299 S., [7] Bl. : Ill.", "note" : [ "HT003558438 Dt. Ausg. u.d.T.: Rheinlands Sagen, Geschichten und Legenden" ], "responsibilityStatement" : [ "[Alfred von Reumont]. D'après les dessins des peintres de l' Ecole de Dusseldorf [Kretschmer del. ; Plüddemann del. ; Alfred Rethel del. ; Sonderland del.]" ], diff --git a/conf/rpb-titel-to-lobid.fix b/conf/rpb-titel-to-lobid.fix index b4a41cc..dadd200 100644 --- a/conf/rpb-titel-to-lobid.fix +++ b/conf/rpb-titel-to-lobid.fix @@ -111,9 +111,11 @@ copy_field("parallelTitle[].*.value", "otherTitleInformation[].$append") # ------- "alternativeTitle" ------- move_field("alternativeTitle[]", "alternativeTitleObjects[]") -set_array("alternativeTitle[]") -copy_field("alternativeSpelling", "alternativeTitle[].$append") -copy_field("alternativeTitleObjects[].*.value", "alternativeTitle[].$append") +copy_field("alternativeTitleObjects[].*.value", "alternativeTitle[]") + +# ------- "titleKeyword" ------- +set_array("titleKeyword[]") +copy_field("alternativeSpelling", "titleKeyword[].$append") # ------- "extent" ------- @@ -374,6 +376,6 @@ end move_field("edition", "edition[]") -retain( "type[]", "contribution[]", "edition[]", "extent", "hasItem[]", "responsibilityStatement[]", "language[]", "medium[]", "subject[]", "title", "hbzId", "oclcNumber[]", "otherTitleInformation[]", "alternativeTitle[]", "natureOfContent[]", "publication[]", "sameAs[]", "describedBy", "@context", "id", "zdbId", "spatial[]", "inCollection[]", "rpbId", "schoeneNummer", "bibliographicCitation", "isPartOf[]", "note[]", "fulltextOnline[]", "description[]", "isbn[]", "containedIn[]") +retain( "type[]", "contribution[]", "edition[]", "extent", "hasItem[]", "responsibilityStatement[]", "language[]", "medium[]", "subject[]", "title", "hbzId", "oclcNumber[]", "otherTitleInformation[]", "alternativeTitle[]", "titleKeyword[]", "natureOfContent[]", "publication[]", "sameAs[]", "describedBy", "@context", "id", "zdbId", "spatial[]", "inCollection[]", "rpbId", "schoeneNummer", "bibliographicCitation", "isPartOf[]", "note[]", "fulltextOnline[]", "description[]", "isbn[]", "containedIn[]") vacuum()