From 550152bf544bdc0e92a73ff5ea3a3271b558d97b Mon Sep 17 00:00:00 2001 From: Bogdan Kostov Date: Wed, 17 Jul 2024 11:07:33 +0200 Subject: [PATCH] [Fix kbss-cvut/record-manager-ui#185] Fix wrong format of field numberOfOverhaulsOfDefectiveEquipment in query fetching exported data - relax FHA question origin in query to allow fetching records with old FHA classification --- src/main/resources/query/find-raw-records.sparql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/resources/query/find-raw-records.sparql b/src/main/resources/query/find-raw-records.sparql index 1b6eb52f..88fe392c 100644 --- a/src/main/resources/query/find-raw-records.sparql +++ b/src/main/resources/query/find-raw-records.sparql @@ -28,7 +28,7 @@ SELECT ?r (?r as ?uri) 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-")) + 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. @@ -181,8 +181,9 @@ SELECT ?r (?r as ?uri) OPTIONAL { #avamod:number-of-overhauls-of-defective-equipment ?numberOfOverhaulsOfDefectiveEquipmentQ doc:has_answer ?numberOfOverhaulsOfDefectiveEquipmentA. - ?numberOfOverhaulsOfDefectiveEquipmentA doc:has_data_value ?numberOfOverhaulsOfDefectiveEquipment.# TODO - transform to more suitable datatype - FILTER(str(spif:trim(?numberOfOverhaulsOfDefectiveEquipment)) != "" ) + ?numberOfOverhaulsOfDefectiveEquipmentA doc:has_data_value ?numberOfOverhaulsOfDefectiveEquipmentStr.# TODO - transform to more suitable datatype + FILTER(str(spif:trim(?numberOfOverhaulsOfDefectiveEquipmentStr)) != "" ) + BIND(xsd:integer(str(spif:trim(?numberOfOverhaulsOfDefectiveEquipmentStr))) as ?numberOfOverhaulsOfDefectiveEquipment) # } # OPTIONAL{ # #avamod:serial-no-of