From 66a258a5b132e0f490c5e5510d1da0d8178ce7e8 Mon Sep 17 00:00:00 2001 From: Daniil Palagin Date: Thu, 3 Jul 2025 21:52:52 +0200 Subject: [PATCH] [kbss-cvut/23ava-distribution#165] Add construct comments implementation --- .../scripts/form-generation.sms.ttl | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/deploy/shared/s-pipes-engine/scripts/form-generation.sms.ttl b/deploy/shared/s-pipes-engine/scripts/form-generation.sms.ttl index b9e9b1e7..2a9e495b 100644 --- a/deploy/shared/s-pipes-engine/scripts/form-generation.sms.ttl +++ b/deploy/shared/s-pipes-engine/scripts/form-generation.sms.ttl @@ -319,6 +319,7 @@ ASK WHERE { }""" ; ] ; sm:next form-mod:construct-answers ; + sm:next form-mod:construct-comments; sm:next form-mod:filter-origin-path-id ; sml:constructQuery [ a sp:Construct ; @@ -353,6 +354,26 @@ WHERE { sml:replace true ; . +form-mod:construct-comments + a sml:ApplyConstruct ; + sm:next form-mod:rename-form-entities ; + sml:constructQuery [ + a sp:Construct ; + sp:text """CONSTRUCT { + ?sampleQ form:has-comment ?c . + ?c ?cp ?co . +} +WHERE { + ?dataQ form:is-cross-form-clone-of-question ?sampleQ . + ?dataQ form:has-comment ?c . + OPTIONAL { + ?c ?cp ?co . + } . +}""" ; + ] ; + sml:replace false ; +. + form-mod:construct-answers a sml:ApplyConstruct ;