realization_view
Collector for the realization view 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: ModelElement, depth: int
) -> dict[LayerLiteral, list[dict[str, t.Any]]]
Collect all elements in both ABOVE and BELOW directions.
Source code in src/capellambse_context_diagrams/collectors/realization_view.py
135 136 137 138 139 140 141 | |
collect_elements 🔗
collect_elements(
start: ModelElement,
depth: int,
direction: str,
attribute_prefix: str,
origin: ModelElement | None = None,
) -> dict[LayerLiteral, list[dict[str, t.Any]]]
Collect elements based on the specified direction and attribute name.
Source code in src/capellambse_context_diagrams/collectors/realization_view.py
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 189 190 191 | |
collect_realized 🔗
collect_realized(
start: ModelElement, depth: int
) -> dict[LayerLiteral, list[dict[str, t.Any]]]
Collect all elements from realized_ attributes up to depth.
Source code in src/capellambse_context_diagrams/collectors/realization_view.py
121 122 123 124 125 | |
collect_realizing 🔗
collect_realizing(
start: ModelElement, depth: int
) -> dict[LayerLiteral, list[dict[str, t.Any]]]
Collect all elements from realizing_ attributes down to depth.
Source code in src/capellambse_context_diagrams/collectors/realization_view.py
128 129 130 131 132 | |
collector 🔗
collector(
diagram: RealizationViewDiagram, params: dict[str, Any]
) -> tuple[_elkjs.ELKInputData, list[_elkjs.ELKInputEdge]]
Return the class tree data for ELK.
Source code in src/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 116 117 118 | |
find_layer 🔗
find_layer(obj: 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 src/capellambse_context_diagrams/collectors/realization_view.py
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |