Skip to content

Commit

Permalink
Merge pull request #124 from kbss-cvut/fix/fta-fmea-ui-425-fix-fetchi…
Browse files Browse the repository at this point in the history
…ng-reusable-sns-failures

[Fix] Fix fetching reusable events to be compatible with imported SNS partonomy
  • Loading branch information
kostobog authored Jun 19, 2024
2 parents c0bda91 + b00e106 commit e15e780
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions src/main/java/cz/cvut/kbss/analysis/dao/FaultEventTypeDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,16 @@ public List<FaultEventType> getTopFaultEvents(URI systemUri) {
SELECT ?uri ?name ?componentName ?eventType {
?uri a fta:fha-fault-event ;
fta:name ?name ;
fta:is-manifestation-of/fta:has-component/((^fta:has-part-component)+) ?system ;
fta:is-derived-from ?generalEvent .
fta:is-manifestation-of/fta:has-component ?c.
?system fta:has-part-component+ ?c.
?c fta:is-derived-from ?generalComponent .
FILTER NOT EXISTS{
?system1 fta:has-part-component ?system.
}
?generalEvent fta:is-manifestation-of ?fm .
?fm fta:has-component ?component .
?component fta:name ?componentLabel ;
?generalComponent fta:name ?componentLabel ;
fta:ata-code ?code .
BIND(CONCAT(str(?code), " - ", str(?componentLabel)) as ?componentName)
BIND("INTERMEDIATE" as ?eventType)
Expand All @@ -84,23 +83,22 @@ public List<FaultEventType> getAllFaultEvents(URI systemUri) {
SELECT ?uri ?name ?componentName ?eventType {
?uri a ?eventClass.
FILTER(?eventClass in (fta:fha-fault-event, fta:fault-event-type))
?uri fta:name ?name ;
fta:is-manifestation-of/fta:has-component/((^fta:has-part-component)+) ?system ;
fta:is-derived-from ?generalEvent .
fta:is-manifestation-of/fta:has-component ?c.
?system fta:has-part-component+ ?c.
?c fta:is-derived-from ?generalComponent .
FILTER NOT EXISTS{
?system1 fta:has-part-component ?system.
?system1 fta:has-part-component ?system.
}
?generalEvent fta:is-manifestation-of ?fm .
?fm fta:has-component ?component .
?component fta:name ?componentLabel ;
fta:ata-code ?code .
?generalComponent fta:name ?componentLabel ;
fta:ata-code ?code .
BIND(CONCAT(str(?code), " - ", str(?componentLabel)) as ?componentName)
BIND(IF(?eventClass = fta:fha-fault-event, "INTERMEDIATE", "BASIC") as ?eventType)
BIND(IF(?eventClass = fta:fha-fault-event, "INTERMEDIATE", "BASIC") as ?eventType)
}
""", "FaultEventSummary")
.setParameter("system", systemUri)
Expand Down

0 comments on commit e15e780

Please sign in to comment.