From 3f1e9df73fc0f89ded3beb40ae3edfd697581c7c Mon Sep 17 00:00:00 2001 From: Bogdan Kostov Date: Wed, 8 May 2024 17:11:40 +0200 Subject: [PATCH] [Fix #189] Fix issues with FaultTreeSummary - sub system name set to ATA code + ATA label - FHA based failure rate retrieved from the generic ATA fault event type. --- .../cvut/kbss/analysis/dao/FaultTreeDao.java | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/java/cz/cvut/kbss/analysis/dao/FaultTreeDao.java b/src/main/java/cz/cvut/kbss/analysis/dao/FaultTreeDao.java index af19e6b9..3c390c37 100755 --- a/src/main/java/cz/cvut/kbss/analysis/dao/FaultTreeDao.java +++ b/src/main/java/cz/cvut/kbss/analysis/dao/FaultTreeDao.java @@ -97,20 +97,23 @@ public List findAllSummaries() { } OPTIONAL{ ?sup fta:has-failure-rate ?failureRate. - OPTIONAL{ - ?failureRate fta:has-prediction ?failureRatePrediction. - ?failureRatePrediction fta:value ?fhaBasedFailureRate. - } - - OPTIONAL{ - ?failureRate fta:has-requirement ?failureRateRequirement. - ?failureRateRequirement fta:to ?requiredFailureRate. - } + ?failureRate fta:has-requirement ?failureRateRequirement. + ?failureRateRequirement fta:to ?requiredFailureRate. } + OPTIONAL{ + ?sup fta:is-derived-from ?supsup. + ?supsup fta:has-failure-rate ?fhaFailureRateQ. + ?fhaFailureRateQ fta:has-estimate ?fhaFailureRateP. + ?fhaFailureRateP a fta:failure-rate-estimate; + fta:value ?fhaBasedFailureRate. + } OPTIONAL{ ?sup fta:is-manifestation-of ?behavior . ?behavior fta:has-component ?subsystemUri. - ?subsystemUri fta:name ?subsystemName. + ?subsystemUri fta:is-derived-from ?subsystemType. + ?subsystemType fta:name ?subsystemTypeLabel. + ?subsystemType fta:ata-code ?subsystemTypeCode. + BIND(CONCAT(str(?subsystemTypeCode), " - ", str(?subsystemTypeLabel)) as ?subsystemName) ?subsystemUri fta:is-part-of+ ?systemUri. FILTER NOT EXISTS{ ?systemUri fta:is-part-of ?system2. @@ -118,8 +121,6 @@ public List findAllSummaries() { ?systemUri fta:name ?systemName. } } - - {} }""", "FaultTreeSummary") .setParameter("type", typeUri) .setParameter("pName", P_HAS_NAME)