metanorma-plugin-lutaml 0.4.6 → 0.4.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +155 -74
  3. data/lib/metanorma/plugin/lutaml/liquid/custom_filters.rb +9 -0
  4. data/lib/metanorma/plugin/lutaml/liquid_templates/_diagrams_block.liquid +1 -1
  5. data/lib/metanorma/plugin/lutaml/liquid_templates/_packages.liquid +113 -7
  6. data/lib/metanorma/plugin/lutaml/liquid_templates/_packages_class.liquid +12 -12
  7. data/lib/metanorma/plugin/lutaml/liquid_templates/_packages_data_dictionary.liquid +235 -63
  8. data/lib/metanorma/plugin/lutaml/liquid_templates/_packages_data_dictionary_class.liquid +73 -0
  9. data/lib/metanorma/plugin/lutaml/liquid_templates/_packages_data_dictionary_classes.liquid +1 -41
  10. data/lib/metanorma/plugin/lutaml/liquid_templates/_packages_data_type.liquid +9 -10
  11. data/lib/metanorma/plugin/lutaml/liquid_templates/_packages_entity_list.liquid +134 -36
  12. data/lib/metanorma/plugin/lutaml/liquid_templates/_packages_entity_list_class.liquid +19 -0
  13. data/lib/metanorma/plugin/lutaml/liquid_templates/_packages_entity_list_classes.liquid +11 -0
  14. data/lib/metanorma/plugin/lutaml/liquid_templates/_packages_enum.liquid +11 -11
  15. data/lib/metanorma/plugin/lutaml/liquid_templates/test.rb +1 -0
  16. data/lib/metanorma/plugin/lutaml/lutaml_preprocessor.rb +1 -1
  17. data/lib/metanorma/plugin/lutaml/lutaml_table_inline_macro.rb +25 -0
  18. data/lib/metanorma/plugin/lutaml/lutaml_uml_attributes_table_preprocessor.rb +1 -1
  19. data/lib/metanorma/plugin/lutaml/lutaml_uml_datamodel_description_preprocessor.rb +93 -19
  20. data/lib/metanorma/plugin/lutaml/utils.rb +1 -1
  21. data/lib/metanorma/plugin/lutaml/version.rb +1 -1
  22. data/lib/metanorma-plugin-lutaml.rb +1 -0
  23. metadata +7 -2
@@ -0,0 +1,73 @@
1
+ {% capture equalsigns %}{% for count in (1..depth) %}={% endfor %}{% endcapture %}
2
+ {% capture generalizations %}{% assign inheritance = klass.associations | where: "member_end_type", "inheritance" %}{% for assoc in inheritance %}<<{{ assoc.member_end }}-section,{{ assoc.member_end }}>>{% endfor %}{% endcapture %}
3
+ [[{{ klass.name }}-section]]
4
+ {{equalsigns}} {{ klass.name }}
5
+ {%comment%}(inside class: depth is {{ depth }}, equalsigns {{equalsigns}}){%endcomment%}
6
+
7
+ .Metadata of {{ klass.name }} ({{klass.stereotype}})
8
+ [cols="1a,4a"]
9
+ |===
10
+ h| Definition: | {{ klass.definition | replace: '|', '\|' }}
11
+ h| Subclass of: | {% if generalizations.size > 0 %}{{ generalizations }}{% else %}None{% endif %}
12
+ h| Stereotype: | «{{ klass.stereotype }}»
13
+
14
+ {% if klass.constraints.size > 0 %}
15
+ {% for constraint in klass.constraints %}
16
+ h| Constraint:
17
+ | `{{ constraint.body }}`:
18
+
19
+ [source,ocl,%unnumbered]
20
+ ------
21
+ {{ constraint.definition | replace: '|', '\|' }}
22
+ ------
23
+ {% endfor %}
24
+ {% endif %}
25
+
26
+ |===
27
+
28
+ {% if klass.associations.size > 0 %}
29
+ {% capture rendered_associations %}
30
+ {% for assoc in klass.associations %}
31
+ {% if assoc.member_end_attribute_name.size > 0 %}
32
+ {% capture cardinality %}&#91;{% case assoc.member_end_cardinality.min %}{% when "C" %}0{% when "M" %}1{% else %}{{assoc.member_end_cardinality.min}}{% endcase %}..{{ assoc.member_end_cardinality.max }}&#93;{% endcapture %}
33
+ | {{ assoc.member_end_attribute_name }}
34
+ | <<{{assoc.member_end}}-section,{{assoc.member_end}}>> {{ cardinality }}
35
+ | {{ assoc.definition | replace: '|', '\|' }}
36
+ {% endif %}
37
+ {% endfor %}
38
+ {% endcapture %}
39
+ {% assign associations_stripped = rendered_associations | strip_newlines | strip %}
40
+
41
+ {% if associations_stripped.size > 0 %}
42
+ .Associations of {{ klass.name }} ({{ klass.stereotype }})
43
+ [cols="15a,20a,60a",options="header"]
44
+ |===
45
+ | Role name | Target class and multiplicity | Definition
46
+
47
+ {{ rendered_associations }}
48
+
49
+ |===
50
+ {% endif %}
51
+ {% endif %}
52
+
53
+ {% if klass.attributes.size > 0 %}
54
+ .Attributes of {{ klass.name }} ({{klass.stereotype}})
55
+ [cols="15a,20a,60a",options="header"]
56
+ |===
57
+ | Attribute | Value type and multiplicity | Definition
58
+
59
+ {% for attr in klass.attributes %}
60
+ {% capture cardinality %}&#91;{% case attr.cardinality.min %}{% when 'C' %}0{% when 'M' %}1{% else %}{{ attr.cardinality.min }}{% endcase %}..{{ attr.cardinality.max }}&#93;{% endcapture %}
61
+ | {{ attr.name }}
62
+ | <<{{ attr.type }}-section,{{ attr.type }}>> {{ cardinality }}
63
+ | {{ attr.definition | replace: '|', '\|' }}
64
+
65
+ {% endfor %}
66
+ |===
67
+
68
+ [NOTE,keep-separate=true]
69
+ ====
70
+ Unless otherwise specified, all attributes and role names have the stereotype
71
+ «Property».
72
+ ====
73
+ {% endif %}
@@ -1,43 +1,3 @@
1
1
  {% for klass in classes %}
2
- {% capture generalizations %}{% for assoc in klass.associations | where: "member_end_type", "generalization" %}{{ assoc.member_end }} {% endfor %}{% endcapture %}
3
- [[{{ klass.name }}-section]]
4
- [cols="1a"]
5
- |===
6
- |*{{ klass.name }}*
7
- |[cols="1,4",frame=none,grid=none]
8
- !===
9
- !{nbsp}{nbsp}{nbsp}{nbsp}Definition: ! {{ klass.definition }}
10
- !{nbsp}{nbsp}{nbsp}{nbsp}Subclass of: ! {{ generalizations }}
11
- !{nbsp}{nbsp}{nbsp}{nbsp}Stereotype: ! «{{ klass.stereotype }}»
12
- !===
13
- {% if klass.associations.size > 0 %}
14
- {% capture rendered_associations %}
15
- {% for assoc in klass.associations %}
16
- {% if assoc.member_end_attribute_name.size > 0 %}
17
- {% capture cardinality %}{% if assoc.member_end_cardinality.min == 'C' %}[0..{{ assoc.member_end_cardinality.max }}]{% elsif assoc.member_end_cardinality.min == 'M' and assoc.member_end_cardinality.max == '1' %}[1..1]{% else %}[{{ assoc.member_end_cardinality.max }}]{% endif %}{% endcapture %}
18
- !{set:cellbgcolor:#FFFFFF} {{ assoc.member_end_attribute_name }} !<<{{assoc.member_end}}-section,{{assoc.member_end}}>> {{ cardinality }} ! {{ assoc.definition }}
19
- {% endif %}
20
- {% endfor %}
21
- {% endcapture %}
22
- {% if rendered_associations.size > 0 %}
23
- |[cols="15,20,60",frame=none,grid=none,options="header"]
24
- !===
25
- !{set:cellbgcolor:#DDDDDD} *Role name* !*Target class and multiplicity* !*Definition*
26
- {{ rendered_associations }}
27
- !===
28
- {% endif %}
29
- {% endif %}
30
- {% if klass.attributes.size > 0 %}
31
- |[cols="15,20,60",frame=none,grid=none,options="header"]
32
- !===
33
- !{set:cellbgcolor:#DDDDDD} *Attribute* !*Value type and multiplicity* !*Definition*
34
- {% for attr in klass.attributes %}
35
- {% capture cardinality %}{% if attr.cardinality.min == 'C' %}[0..{{ attr.cardinality.max }}]{% elsif assoc.member_end_cardinality.min == 'M' and assoc.member_end_cardinality.max == '1' %}[1..1]{% else %}[{{ attr.cardinality.max }}]{% endif %}{% endcapture %}
36
- !{set:cellbgcolor:#FFFFFF} {{ attr.name }} !<<{{ attr.type }}-section,{{ attr.name }}>> {{ cardinality }} !{{ attr.definition }}
37
- {% endfor %}
38
- !===
39
- |{set:cellbgcolor:#FFFFFF} Note: Unless otherwise specified, all attributes and role names have the stereotype «Property».
40
- {% endif %}
41
- |===
42
-
2
+ {% include "packages_data_dictionary_class", depth: depth %}
43
3
  {% endfor %}
@@ -3,8 +3,8 @@
3
3
  {% elsif is_klass_spare == 'Spare' %}{% continue %}
4
4
  {% endif %}
5
5
  {% assign klass_name = klass.name | downcase | replace: ':', '' | replace: ' ', '_' %}
6
- [[tab-P-{{ package_name }}-DT-{{ klass_name }}]]
7
- .Elements of {{ package.name }}::{{ klass.name }}
6
+ [[section-{{ klass.xmi_id }}]]
7
+ .Definition table of &#8220;{{ package.name }}::{{ klass.name }}&#8221; ({{ klass.stereotype }})
8
8
  [width="100%",cols="a,a,a,a,a,a,a,a"]
9
9
  |===
10
10
 
@@ -24,14 +24,14 @@ h|Inheritance from: 7+| {{ inherited | map: 'member_end' | join: ", " }}
24
24
  h|Generalization of: 7+| {{ generalizations | map: 'member_end' | join: ", " }}
25
25
  {% endif %}
26
26
 
27
- h|Abstract: 7+| {{ klass.is_abstract }}
27
+ h|Abstract: 7+| {% if klass.is_abstract %}True{% else %}False{% endif %}
28
28
  {% assign aggregations = klass.associations | where: "member_end_type", "aggregation" %}
29
29
  {% if aggregations.size > 0 %}
30
30
  .{{aggregations.size | plus: 1}}+h|Associations:
31
- 4+|_Association with:_
32
- |_Obligation_
31
+ 4+| _Association with_
32
+ | _Obligation_
33
33
  | _Maximum occurrence_
34
- |_Provides:_
34
+ | _Provides_
35
35
 
36
36
  {% for assoc in aggregations %}
37
37
  4+| {{assoc.member_end}}
@@ -41,12 +41,11 @@ h|Abstract: 7+| {{ klass.is_abstract }}
41
41
 
42
42
  {% endfor %}
43
43
  {% else %}
44
-
45
- .1+h|Associations: 7+| (none)
44
+ h| Associations: 7+| (none)
46
45
  {% endif %}
47
46
 
48
47
  {% if klass.attributes.size > 0 %}
49
- .{{klass.attributes.size | plus: 1}}+h|Values:
48
+ .{{klass.attributes.size | plus: 1}}+h| Values:
50
49
  | _Name_
51
50
  6+| _Definition_
52
51
 
@@ -56,7 +55,7 @@ h|Abstract: 7+| {{ klass.is_abstract }}
56
55
 
57
56
  {% endfor %}
58
57
  {% else %}
59
- .1+h|Values:
58
+ h| Values:
60
59
  7+| (none)
61
60
  {% endif %}
62
61
 
@@ -2,77 +2,133 @@
2
2
  {% assign package_name = package.name | downcase | replace: ":", "" | replace: " ", "_" %}
3
3
  {% if additional_context.before and additional_context.before.size > 0 %}
4
4
  {% for before in additional_context.before %}
5
+ {% if before.liquid %}
6
+ {{ before.text | interpolate }}
7
+ {% else %}
5
8
  {{ before.text }}
9
+ {% endif %}
6
10
  {% endfor %}
7
11
  {% endif %}
8
- {% capture equalsigns %}{% for count in (1..depth) %}={% endfor %}{% endcapture %}{{equalsigns}} {{ package.name }}
9
- [[rc_{{ package_name }}-model_section]]
10
- {{equalsigns}}= {{ package.name }}
11
-
12
12
  {% assign before_package_key = 'before;' | append: package.name %}
13
- {% if additional_context[before_package_key] and additional_context[before_package_key].size > 0 %}
13
+ {% if additional_context[before_package_key] %}
14
14
  {% for before in additional_context[before_package_key] %}
15
+ {% if before.liquid %}
16
+ {{ before.text | interpolate }}
17
+ {% else %}
15
18
  {{ before.text }}
16
- {% endfor %}
17
19
  {% endif %}
18
- {% if additional_context.diagram_include_block %}
19
- {% for diagram_include_block in additional_context.diagram_include_block %}
20
- {% include "diagrams_block", package_name: package_name, image_base_path: diagram_include_block.base_path, text: diagram_include_block.text %}
21
20
  {% endfor %}
22
21
  {% endif %}
22
+ {% if depth %}
23
+ {% assign nested_depth = depth | plus: 1 %}
24
+ {% capture equalsigns %}{% for count in (1..depth) %}={% endfor %}{% endcapture %}
25
+ [[rc_{{ package_name }}-model_section]]
26
+ {{equalsigns}} {{ package.name }}
27
+ {% endif %}
23
28
 
24
- {% if additional_context.include_block and additional_context.include_block.size > 0 %}
25
- {% for block in additional_context.include_block %}
29
+ {% if additional_context.all_macros.size > 0 %}
30
+ {% assign sorted_all_macros = additional_context.all_macros | where: "position", "before" | sort: 'index' %}
31
+ {% for block in sorted_all_macros %}
32
+ {% case block.type %}
33
+ {% when 'include_block' %}
34
+ {% unless block.package and block.package != package.name %}
26
35
  {% capture block_filename %}{{ block.base_path }}{{ package_name }}{% endcapture %}
27
36
  {% capture block_content %}{% include block_filename %}{% endcapture %}
28
37
  {% unless block_content contains "Liquid error" %}
29
38
  {% if block.text %}
39
+
40
+ {% if block.liquid %}
41
+ {{ block.text | interpolate }}
42
+ {% else %}
30
43
  {{ block.text }}
31
44
  {% endif %}
45
+ {% endif %}
46
+
32
47
  {{ block_content }}
33
48
  {% endunless %}
34
- {% endfor %}
35
- {% endif %}
49
+ {% endunless %}
50
+ {% when 'package_text' %}
51
+ {% unless block.package and block.package != package.name %}
36
52
 
37
- {% assign include_block_package_key = 'include_block;' | append: package.name %}
38
- {% if additional_context[include_block_package_key] and additional_context[include_block_package_key].size > 0 %}
39
- {% for block in additional_context[include_block_package_key] %}
40
- {% capture block_filename %}{{ block.base_path }}{{ package_name }}{% endcapture %}
41
- {% capture block_content %}{% include block_filename %}{% endcapture %}
42
- {% unless block_content contains "Liquid error" %}
43
- {% if block.text %}
53
+ {% if block.liquid %}
54
+ {{ block.text | interpolate }}
55
+ {% else %}
44
56
  {{ block.text }}
45
57
  {% endif %}
46
- {{ block_content }}
47
58
  {% endunless %}
59
+ {% else %}
60
+ {% endcase %}
61
+ {% endfor %}
62
+ {% endif %}
63
+
64
+ {% comment %} // TODO: move to all_macros block {% endcomment %}
65
+ {% if additional_context.diagram_include_block %}
66
+ {% for diagram_include_block in additional_context.diagram_include_block %}
67
+ {% include "diagrams_block", package_name: package_name, image_base_path: diagram_include_block.base_path, text: diagram_include_block.text %}
48
68
  {% endfor %}
49
69
  {% endif %}
50
70
 
51
- {{equalsigns}}= Class Definitions
52
71
  {% if package.classes.size > 0 %}
53
- .Classes used in {{ package.name }}
72
+ {% unless package_skip_sections[package.name]['classes'] %}
73
+ {{equalsigns}}= Class definitions
74
+
75
+ {% endunless %}
76
+ {% comment %} {% assign data_types = package.classes | where: "stereotype", "DataType" %} {% endcomment %}
77
+ {% assign basic_types = package.classes | where: "stereotype", "BasicType" %}
78
+ {% comment %} {% assign enumerations = package.classes | where: "stereotype", "Enumeration" %} {% endcomment %}
79
+ {% assign code_lists = package.classes | where: "stereotype", "CodeList" %}
80
+ {% assign unions = package.data_types | where: "stereotype", "Union" %}
81
+
82
+ {% assign not_classes_length = plus: basic_types.size | plus: code_lists.size %}
83
+ {% assign not_classes_stereotypes = 'DataType,BasicType,Enumeration,CodeList' | split: ','%}
84
+ {% unless not_classes_length == package.classes.size or package_skip_sections[package.name]['classes'] %}
85
+ .Classes defined in {{ package.name }} ({{ package.stereotype }})
54
86
  [cols="2a,6a",options="header"]
55
87
  |===
56
- |Class |Description
88
+ |Name |Description
57
89
 
58
90
  {% for klass in package.classes %}
59
- |<<{{ klass.name }}-section,{{ klass.name }}>>
60
- «{{ klass.stereotype }}»
61
- |{{ klass.definition }}
91
+ {% unless not_classes_stereotypes contains klass.stereotype %}
92
+ | <<{{ klass.name }}-section,{{ klass.name }}>> «{{ klass.stereotype }}»
93
+ | {{ klass.definition | replace: '|', '\|' }}
62
94
 
95
+ {% endunless %}
63
96
  {% endfor %}
64
97
  |===
98
+ {% endunless %}
99
+
100
+ {% assign non_unions = package.data_types | where: "stereotype", "DataType" %}
101
+ {% if non_unions.size > 0 %}
102
+ {% include "packages_entity_list_classes", classes: non_unions, type: "Data types", depth: nested_depth %}
65
103
  {% endif %}
66
104
 
67
- {% if package.data_types.size > 0 %}
68
- .Data Types used in {{ package.name }}
69
- [cols="2,6",options="header"]
105
+ {% if basic_types.size > 0 %}
106
+ {% include "packages_entity_list_classes", classes: basic_types, type: "Primitive data types", depth: nested_depth %}
107
+ {% endif %}
108
+
109
+ {% if package.enums.size > 0 %}
110
+ {% include "packages_entity_list_classes", classes: package.enums, type: "Enumerated classes", depth: nested_depth %}
111
+ {% endif %}
112
+
113
+ {% if unions.size > 0 %}
114
+ {% include "packages_entity_list_classes", classes: unions, type: "Union types", depth: nested_depth %}
115
+ {% endif %}
116
+
117
+ {% if code_lists.size > 0 %}
118
+ {% include "packages_entity_list_classes", classes: code_lists, type: "Code list classes", depth: nested_depth %}
119
+ {% endif %}
120
+
121
+ {% endif %}
122
+
123
+ {% comment %} {% if package.data_types.size > 0 %}
124
+ .Data types used in {{ package.name }}
125
+ [cols="2a,6a",options="header"]
70
126
  |===
71
127
  |Name |Description
72
128
 
73
129
  {% for klass in package.data_types %}
74
- |<<{{ klass.name }}-section,{{ klass.name }}>>
75
- |{{ klass.definition }}
130
+ |<<{{ klass.name }}-section,{{ klass.name }}>> «{{ klass.stereotype }}»
131
+ |{{ klass.definition | replace: '|', '\|' }}
76
132
 
77
133
  {% endfor %}
78
134
 
@@ -86,28 +142,70 @@
86
142
  |Name |Description
87
143
 
88
144
  {% for klass in package.enums %}
89
- |<<{{ klass.name }}-section,{{ klass.name }}>>
90
- |{{ klass.definition }}
145
+ |<<{{ klass.name }}-section,{{ klass.name }}>> «{{ klass.stereotype }}»
146
+ |{{ klass.definition | replace: '|', '\|' }}
91
147
 
92
148
  {% endfor %}
93
149
 
94
150
  |===
151
+ {% endif %} {% endcomment %}
152
+
153
+ {% if additional_context.all_macros.size > 0 %}
154
+ {% assign sorted_all_macros = additional_context.all_macros | where: "position", "after" | sort: 'index' %}
155
+ {% for block in sorted_all_macros %}
156
+ {% case block.type %}
157
+ {% when 'include_block' %}
158
+ {% unless block.package and block.package != package.name %}
159
+ {% capture block_filename %}{{ block.base_path }}{{ package_name }}{% endcapture %}
160
+ {% capture block_content %}{% include block_filename %}{% endcapture %}
161
+ {% unless block_content contains "Liquid error" %}
162
+ {% if block.text %}
163
+
164
+ {% if block.liquid %}
165
+ {{ block.text | interpolate }}
166
+ {% else %}
167
+ {{ block.text }}
168
+ {% endif %}
169
+ {% endif %}
170
+
171
+ {{ block_content }}
172
+ {% endunless %}
173
+ {% endunless %}
174
+ {% when 'package_text' %}
175
+ {% unless block.package and block.package != package.name %}
176
+
177
+ {% if block.liquid %}
178
+ {{ block.text | interpolate }}
179
+ {% else %}
180
+ {{ block.text }}
181
+ {% endif %}
182
+ {% endunless %}
183
+ {% else %}
184
+ {% endcase %}
185
+ {% endfor %}
95
186
  {% endif %}
96
187
 
97
188
  {% assign after_package_key = 'after;' | append: package.name %}
98
189
  {% if additional_context[after_package_key] %}
99
- {{equalsigns}}= Additional Information
100
190
  {% for after in additional_context[after_package_key] %}
191
+ {% if after.liquid %}
192
+ {{ after.text | interpolate }}
193
+ {% else %}
101
194
  {{ after.text }}
195
+ {% endif %}
102
196
  {% endfor %}
103
197
  {% endif %}
104
198
  {% if package.packages.size > 0 and render_nested_packages %}
105
- {% assign nested_depth = depth | plus: 1 %}{% include "packages_entity_list", depth: nested_depth, context: package %}
199
+ {% include "packages_entity_list", depth: nested_depth, context: package %}
106
200
  {% endif %}
107
201
  {% endfor %}
108
202
 
109
203
  {% if additional_context.after and additional_context.after.size > 0 %}
110
204
  {% for after in additional_context.after %}
205
+ {% if after.liquid %}
206
+ {{ after.text | interpolate }}
207
+ {% else %}
111
208
  {{ after.text }}
209
+ {% endif %}
112
210
  {% endfor %}
113
211
  {% endif %}
@@ -0,0 +1,19 @@
1
+ {% for package in context.packages %}
2
+ {% assign not_classes_stereotypes = 'DataType,BasicType,Enumeration,CodeList' | split: ','%}
3
+ [cols="2a,6a",options="header"]
4
+ |===
5
+ |Class |Description
6
+
7
+ {% for klass in package.classes %}
8
+ {% assign klass_name = klass.name %}
9
+ {% assign package_name = package.name %}
10
+ {% unless package_entities and package_entities[package_name][klass_name] != true %}
11
+ {% unless not_classes_stereotypes contains klass.stereotype %}
12
+ | <<{{ klass.name }}-section,{{ klass.name }}>> «{{ klass.stereotype }}»
13
+ | {{ klass.definition | replace: '|', '\|' }}
14
+
15
+ {% endunless %}
16
+ {% endunless %}
17
+ {% endfor %}
18
+ |===
19
+ {% endfor %}
@@ -0,0 +1,11 @@
1
+ .{{ type }} defined in {{ package.name }} ({{ package.stereotype }})
2
+ [cols="2a,6a",options="header"]
3
+ |===
4
+ |Name |Description
5
+
6
+ {% for klass in classes %}
7
+ | <<{{ klass.name }}-section,{{ klass.name }}>> «{{ klass.stereotype | default: "Enumeration" }}»
8
+ | {{ klass.definition | replace: '|', '\|' }}
9
+
10
+ {% endfor %}
11
+ |===
@@ -3,8 +3,9 @@
3
3
  {% elsif is_klass_spare == 'Spare' %}{% continue %}
4
4
  {% endif %}
5
5
  {% assign klass_name = klass.name | downcase | replace: ':', '' | replace: ' ', '_' %}
6
- [[tab-P-{{ package_name }}-E-{{ klass_name }}]]
7
- .Elements of {{ package.name }}::{{ klass.name }}
6
+
7
+ [[section-{{ klass.xmi_id }}]]
8
+ .Definition table of &#8220;{{ package.name }}::{{ klass.name }}&#8221; ({{ klass.stereotype }})
8
9
  [width="100%",cols="a,a,a,a,a,a,a,a"]
9
10
  |===
10
11
 
@@ -24,14 +25,14 @@ h|Inheritance from: 7+| {{ inherited | map: 'member_end' | join: ", " }}
24
25
  h|Generalization of: 7+| {{ generalizations | map: 'member_end' | join: ", " }}
25
26
  {% endif %}
26
27
 
27
- h|Abstract: 7+| {{ klass.is_abstract }}
28
+ h|Abstract: 7+| {% if klass.is_abstract %}True{% else %}False{% endif %}
28
29
  {% assign aggregations = klass.associations | where: "member_end_type", "aggregation" %}
29
30
  {% if aggregations.size > 0 %}
30
31
  .{{aggregations.size | plus: 1}}+h|Associations:
31
- 4+|_Association with:_
32
- |_Obligation_
32
+ 4+| _Association with_
33
+ | _Obligation_
33
34
  | _Maximum occurrence_
34
- |_Provides:_
35
+ | _Provides_
35
36
 
36
37
  {% for assoc in aggregations %}
37
38
  4+| {{assoc.member_end}}
@@ -41,11 +42,11 @@ h|Abstract: 7+| {{ klass.is_abstract }}
41
42
 
42
43
  {% endfor %}
43
44
  {% else %}
44
-
45
- .1+h|Associations: 7+| (none)
45
+ h| Associations: 7+| (none)
46
46
  {% endif %}
47
+
47
48
  {% if klass.values.size > 0 %}
48
- .{{klass.values.size | plus: 1}}+h|Values:
49
+ .{{klass.values.size | plus: 1}}+h| Values:
49
50
  | _Name_
50
51
  6+| _Definition_
51
52
 
@@ -55,9 +56,8 @@ h|Abstract: 7+| {{ klass.is_abstract }}
55
56
 
56
57
  {% endfor %}
57
58
  {% else %}
58
- .1+h|Values:
59
+ h| Values:
59
60
  7+| (none)
60
61
  {% endif %}
61
62
 
62
-
63
63
  |===