From 0f226a5bc605054729532a3ca2cd02c850438f1b Mon Sep 17 00:00:00 2001 From: Jouni Tuominen Date: Thu, 19 Oct 2023 11:44:31 +0200 Subject: [PATCH] add biography texts for BNet person entities to biography retrieve endpoint --- .../sparql/bulk_retrieve_biographies_v2_1.sparql | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/intavia_backend/sparql/bulk_retrieve_biographies_v2_1.sparql b/intavia_backend/sparql/bulk_retrieve_biographies_v2_1.sparql index 4052841..b3baf8d 100644 --- a/intavia_backend/sparql/bulk_retrieve_biographies_v2_1.sparql +++ b/intavia_backend/sparql/bulk_retrieve_biographies_v2_1.sparql @@ -1,11 +1,16 @@ PREFIX idmcore: +PREFIX bgn: -SELECT ?bioText ?bioAbstract ?bioID +SELECT ?bioText ?bioAbstract ?biotext ?bioID {% include 'add_datasets_v2_1.sparql' %} WHERE { VALUES ?bioID { {% for id in ids %}<{{id}}> {% endfor %} } - ?bioID idmcore:full_bio_link ?bioText . - OPTIONAL {?bioID idmcore:short_bio_link ?bioAbstract .} + { ?bioID idmcore:full_bio_link ?bioText . + OPTIONAL {?bioID idmcore:short_bio_link ?bioAbstract .} } + UNION + { ?bioID bgn:hasBioParts ?bioparts . + ?bioparts bgn:text ?biotext . + FILTER NOT EXISTS { ?bioparts bgn:hasFigure ?fig . } } } \ No newline at end of file