Diagrams
This program generates diagrams from IMD16. The following section gives an overview about what formats are supported and the limitations.
Info
Be aware, this project is not meant to be used to create UML-Diagrams you can graphically edit later. It trys to produce the best automatic diagram with the different solutions instead. The approach is positioned more towards automation and forced regeneration of diagrams in a developer friendly way. Change the source (ili file) and regenerate. Never beautify by hand.
Associations
Every flavour draws an association with its role names and multiplicities. Two cases need more than a simple line between two classes:
- Role with
OR(e.g.UpperLevelUnit -- CHCanton OR CHDistrict): the association is still binary, the role just points to more than one class. Each of these classes gets its own line, all lines carry the same role name and multiplicity. This is how the UML editor shows such roles too. - Association with more than two roles (n-ary, e.g.
ToGeoCartesian3DofCoordSyswithFrom2,FromHeightandTo3): there is no single line between two classes. As UML does it, the association becomes a node of its own, a diamond in PlantUML and dot, with one line to each class. The line carries the role name and the multiplicity.
When the diagram is restricted to some models (--models), a line to a class outside them is left out. A binary
association with a class outside is not drawn at all, an n-ary one is drawn as long as at least two of its classes
are inside.
Mermaid
Mermaid is well known and widely used. Its strength is the wide support in many development tools (Ide's, github, gitlab, ...).
The format is a markdown code snippet. See mermaid documentation for details.
Note
The mermaid class diagram capabilities are limited. In addition, they depend heavily on the renderer you use to generate the diagram out of the markdown. That may be the plugin of your Ide, your browser or something else.
Limitations
Currently, known limitations are:
- Nesting of namespaces is not supported by mermaid.
- Potentially broken self references (awkward rendering of Cardinalities, strange positioning of connectors).
- routing of connectors between classes is a bit flaky especially when it comes to larger diagrams
- Some renderers do not allow '.' in names of namespaces!
- Mermaid has no diamond node, an association with more than two roles is drawn as a class box marked with
<<association>>and named like the association.
PlantUML
PlantUML is a non-interactive tool which renders a specific syntax text file into the desired output. The aim is automation here too. We want to transform the understanding of imd16 into an uml diagram without any further tuning. This is, what PlantUML is good for. It renders quickly and produces nice outputs even on larger diagrams with a lot of content. Especially the routing of the connectors is looking better than with mermaid.
PlantUML Role Members
This is a variant of the standard plantuml above. It tries to keep things clean by adding the information of roles and their multiplicity in the frame of the class. Even if this is not pure UML anymore it improves readability on messy and complex diagrams.
