default
Build an ELK diagram from collected capellambse context.
This submodule provides a collector that transforms capellambse data to an ELK- layouted diagram _elkjs.ELKInputData.
The data was collected with the functions from collectors.
DiagramBuilder 🔗
DiagramBuilder(diagram: ContextDiagram, params: dict[str, Any])
Collect the context for a ContextDiagram.
Source code in src/capellambse_context_diagrams/builders/default.py
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 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
builder 🔗
builder(
diagram: ContextDiagram,
params: dict[str, Any],
builder_type: type[DiagramBuilder] = DiagramBuilder,
) -> _elkjs.ELKInputData
High level builder function to build collected data for ELK.
| PARAMETER | DESCRIPTION |
|---|---|
diagram
|
The
TYPE:
|
params
|
Optional render params dictionary.
TYPE:
|
builder_type
|
The type of diagram builder to use.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
elkdata
|
The data that can be fed into elkjs. |
Source code in src/capellambse_context_diagrams/builders/default.py
737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 | |
get_top_uncommon_owner 🔗
get_top_uncommon_owner(
src: ModelElement, tgt_owners: list[str]
) -> m.ModelElement
Return the top-level owner of src not in tgt_owners.
Source code in src/capellambse_context_diagrams/builders/default.py
57 58 59 60 61 62 63 64 65 66 67 68 69 | |