From ec8c0127a185e8ac379d84c87b144159f7bc0ebc Mon Sep 17 00:00:00 2001 From: Bogdan Kostov Date: Wed, 17 Jul 2024 11:46:58 +0200 Subject: [PATCH] [Fix kbss-cvut/record-manager-ui#185] Fix exported excel is empty in operator - make fha question and section optional --- src/main/resources/query/find-raw-records.sparql | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/resources/query/find-raw-records.sparql b/src/main/resources/query/find-raw-records.sparql index 88fe392c..a66971f2 100644 --- a/src/main/resources/query/find-raw-records.sparql +++ b/src/main/resources/query/find-raw-records.sparql @@ -24,11 +24,14 @@ SELECT ?r (?r as ?uri) GRAPH ?r { ?r rm:has-question ?f. ?f doc:has_related_question ?s1. - ?f doc:has_related_question ?s2. - FILTER(?s2 != ?s1) - ?s2 doc:has_related_question ?fhaEventQ. - ?fhaEventQ form:has-question-origin ?fhaEventQuestionOrigin. - FILTER(contains(str(?fhaEventQuestionOrigin), "http://vfn.cz/ontologies/ava-study/model/fha-event")) + + OPTIONAL{ + ?f doc:has_related_question ?s2. + FILTER(?s2 != ?s1) + ?s2 doc:has_related_question ?fhaEventQ. + ?fhaEventQ form:has-question-origin ?fhaEventQuestionOrigin. + FILTER(contains(str(?fhaEventQuestionOrigin), "http://vfn.cz/ontologies/ava-study/model/fha-event")) + } ?s1 doc:has_related_question ?FUSq. ?FUSq form:has-question-origin avamod:fuselage-no.