realization_view
This submodule defines the collector for the RealizationView diagram.
COLLECTORS
module-attribute
🔗
COLLECTORS: dict[str, Collector] = {'ALL': collect_all, 'ABOVE': collect_realized, 'BELOW': collect_realizing}
The functions to receive the diagram elements for every layer.
collect_all 🔗
collect_all(start: m.ModelElement, depth: int) -> dict[LayerLiteral, list[dict[str, t.Any]]]
Collect all elements in both ABOVE and BELOW directions.
Source code in capellambse_context_diagrams/collectors/realization_view.py
132 133 134 135 136 137 138 |
|
collect_elements 🔗
collect_elements(start: m.ModelElement, depth: int, direction: str, attribute_prefix: str, origin: m.ModelElement | None = None) -> dict[LayerLiteral, list[dict[str, t.Any]]]
Collect elements based on the specified direction and attribute name.
Source code in capellambse_context_diagrams/collectors/realization_view.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
collect_realized 🔗
collect_realized(start: m.ModelElement, depth: int) -> dict[LayerLiteral, list[dict[str, t.Any]]]
Collect all elements from realized_
attributes up to depth.
Source code in capellambse_context_diagrams/collectors/realization_view.py
118 119 120 121 122 |
|
collect_realizing 🔗
collect_realizing(start: m.ModelElement, depth: int) -> dict[LayerLiteral, list[dict[str, t.Any]]]
Collect all elements from realizing_
attributes down to depth.
Source code in capellambse_context_diagrams/collectors/realization_view.py
125 126 127 128 129 |
|
collector 🔗
collector(diagram: context.ContextDiagram, params: dict[str, t.Any]) -> tuple[_elkjs.ELKInputData, list[_elkjs.ELKInputEdge]]
Return the class tree data for ELK.
Source code in capellambse_context_diagrams/collectors/realization_view.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
find_layer 🔗
find_layer(obj: m.ModelElement) -> tuple[cs.ComponentArchitecture, LayerLiteral]
Return the layer object and its literal.
Return either one of the following:
* Operational
* System
* Logical
* Physical
Source code in capellambse_context_diagrams/collectors/realization_view.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
|