Skip to content

Commit

Permalink
refactor(model): Use Accessor for OperationalActivity inputs/outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger authored and Wuestengecko committed Apr 18, 2024
1 parent 9c5bb6c commit c2fe605
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions capellambse/model/layers/oa.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ class OperationalActivity(fa.AbstractFunction):
exchanges = c.DirectProxyAccessor(
fa.FunctionalExchange, aslist=c.ElementList
)
owner: c.Accessor[Entity]

@property
def inputs(self) -> c.ElementList[fa.FunctionalExchange]:
return self._model.oa.all_activity_exchanges.by_target(self)
inputs = c.ReferenceSearchingAccessor(
fa.FunctionalExchange, "target", aslist=c.ElementList
)
outputs = c.ReferenceSearchingAccessor(
fa.FunctionalExchange, "source", aslist=c.ElementList
)

@property
def outputs(self) -> c.ElementList[fa.FunctionalExchange]:
return self._model.oa.all_activity_exchanges.by_source(self)
owner: c.Accessor[Entity]

@property
def related_exchanges(self) -> c.ElementList[fa.FunctionalExchange]:
Expand Down

0 comments on commit c2fe605

Please sign in to comment.