aboutsummaryrefslogtreecommitdiff
path: root/umlgen/src/main/resources/graph.ftl
diff options
context:
space:
mode:
Diffstat (limited to 'umlgen/src/main/resources/graph.ftl')
-rw-r--r--umlgen/src/main/resources/graph.ftl37
1 files changed, 37 insertions, 0 deletions
diff --git a/umlgen/src/main/resources/graph.ftl b/umlgen/src/main/resources/graph.ftl
new file mode 100644
index 0000000..759fc44
--- /dev/null
+++ b/umlgen/src/main/resources/graph.ftl
@@ -0,0 +1,37 @@
+digraph {
+ node [
+ shape=record
+ style=filled
+ fillcolor=gray95
+ ]
+
+ <#list classes as cls>
+ <#if cls.tag()??>
+ ${cls.name()} [label = <{<b>«${cls.tag()}»</b><br />${cls.name()}}>]
+ <#else>
+ ${cls.name()} [label = "${cls.name()}"]
+ </#if>
+ </#list>
+
+ <#if extends??>
+ <#list extends as relation>
+ <#if relation.impl()>
+ edge [dir=forward arrowtail=empty arrowhead=empty style="dashed"]
+ <#else>
+ edge [dir=forward arrowtail=empty arrowhead=empty style=""]
+ </#if>
+ ${relation.from()} -> ${relation.to()}
+ </#list>
+ </#if>
+
+ <#if assocs??>
+ <#list assocs as assoc>
+ <#if assoc.partOf()>
+ edge [dir=both arrowtail=odiamond arrowhead=vee style="" headlabel="${assoc.head()}"]
+ <#else>
+ edge [dir=forward arrowtail=empty arrowhead=vee style="" headlabel="${assoc.head()}"]
+ </#if>
+ ${assoc.from()} -> ${assoc.to()}
+ </#list>
+ </#if>
+} \ No newline at end of file