{% assign is_klass_spare = klass.name | slice: 0,5 %} {% if is_klass_spare == 'old: ' %}{% continue %} {% elsif is_klass_spare == 'Spare' %}{% continue %} {% endif %} {% assign klass_name = klass.name | downcase | replace: ':', '' | replace: ' ', '_' %}

[section-{{ klass.xmi_id }}]

.Elements of “{{ package.name }}::{{ klass.name }}” (class)

width=“100%”,cols=“a,a,a,a,a,a,a,a”

|===

h|Name: 7+| {{ klass.name }}

h|Definition: 7+| {{ klass.definition | html2adoc }}

h|Stereotype: 7+| {{ klass.stereotype | default: 'interface' }}

{% assign inherited = klass.associations | where: “member_end_type”, “inheritance” %} {% if inherited.size > 0 %} h|Inheritance from: 7+| {{ inherited | map: 'member_end' | join: “, ” }} {% endif %}

{% assign generalizations = klass.associations | where: “member_end_type”, “generalization” %} {% if generalizations.size > 0 %} h|Generalization of: 7+| {{ generalizations | map: 'member_end' | join: “, ” }} {% endif %}

h|Abstract: 7+| {% if klass.is_abstract %}True{% else %}False{% endif %} {% assign aggregations = klass.associations | where: “member_end_type”, “aggregation” %} {% if aggregations.size > 0 %} .{{aggregations.size | plus: 1}}+h|Associations: 4+| _Association with_ | Obligation | _Maximum occurrence_ | Provides

{% for assoc in aggregations %} 4+| {{assoc.member_end}} | {% if assoc.member_end_cardinality %}{{ assoc.member_end_cardinality.min }}{% endif %} | {% if assoc.member_end_cardinality %}{{ assoc.member_end_cardinality.max }}{% endif %} | {{ assoc.member_end_attribute_name }}

{% endfor %} {% else %} h| Associations: 7+| (none) {% endif %}

{% if klass.attributes.size > 0 %} .{{klass.attributes.size | plus: 1}}+h|Public attributes: | Name 2+| Definition | Derived | Obligation | _Maximum occurrence_ | _Data type_

{% for attr in klass.attributes %} | {{attr.name}} 2+| {{ attr.definition | html2adoc }} | {{ attr.is_derived }} | {{attr.cardinality.min}} | {{attr.cardinality.max}} | {{attr.type}}

{% endfor %} {% else %} h| Public attributes: 7+| (none) {% endif %}

{% if klass.constraints.size > 0 %} .{{ klass.constraints.size }}+h| Constraints: {% for constr in klass.constraints %} 7+| `{{ constr.body }}`

{% endfor %} {% else %}

h|Constraints: 7+| (none) {% endif %}

|===