Skip to content

Commit

Permalink
[Fix kbss-cvut/record-manager-ui#185] Fix wrong format of field numbe…
Browse files Browse the repository at this point in the history
…rOfOverhaulsOfDefectiveEquipment in query fetching exported data

- relax FHA question origin in query to allow fetching records with old FHA classification
  • Loading branch information
kostobog committed Jul 17, 2024
1 parent ea21b59 commit 550152b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/resources/query/find-raw-records.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 550152b

Please sign in to comment.