From afea854055e55a1eea5b2316ebb3caa9dac08360 Mon Sep 17 00:00:00 2001 From: Cyril Pommier Date: Tue, 16 Mar 2021 09:42:10 +0100 Subject: [PATCH] If no @type, then defaulting to Phenotyping study. This is likely a temp workaround --- .../documents/datadiscovery_study.json | 1 + .../documents/study.json | 41 ++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/config/transform-elasticsearch/documents/datadiscovery_study.json b/config/transform-elasticsearch/documents/datadiscovery_study.json index 97080a9..1ea9dc7 100644 --- a/config/transform-elasticsearch/documents/datadiscovery_study.json +++ b/config/transform-elasticsearch/documents/datadiscovery_study.json @@ -21,6 +21,7 @@ { "{replace}":{ "possible_terms": [ + "", null, "Phenotypes", "Phenotyping", "Field Experiement", "Greenhouse (29\u00baC/20\u00baC)", "Green house", "Growth chamber", "Phenotyping Study", "Provenance trial", diff --git a/config/transform-elasticsearch/documents/study.json b/config/transform-elasticsearch/documents/study.json index 01436cc..5b253a9 100644 --- a/config/transform-elasticsearch/documents/study.json +++ b/config/transform-elasticsearch/documents/study.json @@ -2,6 +2,45 @@ "document-type": "study", "source-entity": "study", "document-transform": { + "@type": { + "{list}": [ + { + "{or}": [ + { + "{replace}":{ + "possible_terms": [ + "Genotyping", "Genotyping Study", + "allele size", "genotype" + ] + }, + "{with}": { + "replaced_by": "Genotyping Study" + } + }, + { + "{replace}":{ + "possible_terms": [ + "", null, + "Phenotypes", "Phenotyping", "Field Experiement", + "Greenhouse (29\u00baC/20\u00baC)", "Green house", + "Growth chamber", "Phenotyping Study", "Provenance trial", + "Half sibling progeny trial", "Clonal trial", "Progeny trial", + "Other", "Provenance and half sibling progeny trial", + "Species comparison", "Seed orchard", "Demonstration test", + "Full sibling progeny trial", "Juveniles comparison", + "Clonal archiva, clone bank", "Conservation plot", + "Biomasse test - sylvabiom", "Response study", "raw" + ] + }, + "{with}": { + "replaced_by": "Phenotyping Study" + } + }, + "Study" + ] + } + ] + }, "schema:url": "{.documentationURL}", "schema:includedInDataCatalog": "{.source}", "studyName": { @@ -34,4 +73,4 @@ } } } -} \ No newline at end of file +}