From f6807fe841dea73d46f4261fe14065452a0c5473 Mon Sep 17 00:00:00 2001 From: huyenngn Date: Mon, 25 Mar 2024 12:14:36 +0100 Subject: [PATCH] feat(model): Implement System/LogicalFunction.involved_in --- capellambse/model/layers/ctx.py | 7 +++++++ capellambse/model/layers/la.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/capellambse/model/layers/ctx.py b/capellambse/model/layers/ctx.py index 9f27e3f1b..9baf596bd 100644 --- a/capellambse/model/layers/ctx.py +++ b/capellambse/model/layers/ctx.py @@ -314,6 +314,13 @@ class SystemAnalysis(crosslayer.BaseArchitectureLayer): SystemFunction, "realized_operational_activities", aslist=c.ElementList ), ) +c.set_accessor( + SystemFunction, + "involved_in", + c.ReferenceSearchingAccessor( + Capability, "involved_functions", aslist=c.ElementList + ), +) c.set_self_references( (MissionPkg, "packages"), (SystemComponent, "components"), diff --git a/capellambse/model/layers/la.py b/capellambse/model/layers/la.py index 92b8c7348..eb71483f2 100644 --- a/capellambse/model/layers/la.py +++ b/capellambse/model/layers/la.py @@ -230,6 +230,13 @@ class LogicalArchitecture(crosslayer.BaseArchitectureLayer): aslist=c.ElementList, ), ) +c.set_accessor( + LogicalFunction, + "involved_in", + c.ReferenceSearchingAccessor( + CapabilityRealization, "involved_functions", aslist=c.ElementList + ), +) c.set_self_references( (LogicalComponent, "components"), (LogicalComponentPkg, "packages"),