metanorma-plugin-lutaml 0.4.13 → 0.4.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c49af8286acd4f5489eb2e05561f365cf6597d8b7f5322950e376bceb85c7738
4
- data.tar.gz: 5c8a70a95bec419773bb11a387529994197bb12fd9e4dd882110ae57e33dc0b5
3
+ metadata.gz: d32e2622337e811833b81c4a3be6ff720d5b062807cd1e11532a4178e75a7f50
4
+ data.tar.gz: d048df682f6c5cc77770d74585b87644cf43d27e4bad65cfad6829fe3c75c2ad
5
5
  SHA512:
6
- metadata.gz: f8bd4c3e9322bd693332f90b24130e2c685df40c0c073b6f145ed894980e965e91d3bdccd31e58b827b73d046589bd3b8e2ad23a6e6f3f68d3760403a019029c
7
- data.tar.gz: b94cb8be15a1da9111999bd7b85e97515f5677ec29b8165358c1232f49bb0c6c007db09eb6163423333e9087ff2ef593f1a9d259328b5136e587003bb6f72140
6
+ metadata.gz: 51972b3a3ca4fa2701813aefb8425cee81499725e8b488dd99098e446b1b37e8580cad84629e058ddab4ff8bd8db272558cd3f2666316623a9801407bd65ead6
7
+ data.tar.gz: 198d5703597a8c28a55e0d8c8845bc74738fbb3248fbc376d9c8488836c606f4d4e198bff24c24444d5c019455baa5f72ed970f51ef02f85845d1cc55c63f5a8
@@ -135,7 +135,7 @@ None.
135
135
  {% assign non_unions = package.data_types | where: "stereotype", "DataType" %}
136
136
  {% if non_unions.size > 0 %}
137
137
  {% for data_type in non_unions %}
138
- {% capture generalizations %}{% assign inheritance = klass.associations | where: "member_end_type", "inheritance" %}{% for assoc in inheritance %}{% capture ref_id %}{% if additional_context.external_classes[assoc.member_end] %}{{ additional_context.external_classes[assoc.member_end] }}{% else %}{{ assoc.member_end }}-section{% endif %}{% endcapture %}<<{{ ref_id }},{{ assoc.member_end }}>>{% endfor %}{% endcapture %}
138
+ {% capture generalizations %}{% assign inheritance = klass.associations | where: "member_end_type", "inheritance" %}{% for assoc in inheritance %}{% if additional_context.external_classes[assoc.member_end] %}<<{{ additional_context.external_classes[assoc.member_end] }},{{ assoc.member_end }}>>{% else %}<<section-{{ additional_context.external_classes[assoc.member_end] }},{{ assoc.member_end_xmi_id }}>>{% endif %}{% endfor %}{% endcapture %}
139
139
  [[section-{{ data_type.xmi_id }}]]
140
140
  {{equalsigns}}== {{ data_type.name }}
141
141
 
@@ -166,8 +166,7 @@ h| Constraint:
166
166
  {% if assoc.member_end_attribute_name.size > 0 %}
167
167
  {% 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 %}
168
168
  | {{ assoc.member_end_attribute_name }}
169
- {% capture ref_id %}{% if additional_context.external_classes[assoc.member_end] %}{{ additional_context.external_classes[assoc.member_end] }}{% else %}{{ assoc.member_end }}-section{% endif %}{% endcapture %}
170
- | <<{{ ref_id }},{{assoc.member_end}}>> {{ cardinality }}
169
+ {% if additional_context.external_classes[assoc.member_end] %}| <<{{ additional_context.external_classes[assoc.member_end] }},{{assoc.member_end}}>> {{ cardinality }}{% else %}| <<section-{{ assoc.member_end_xmi_id }},{{assoc.member_end}}>> {{ cardinality }}{% endif %}
171
170
  | {{ assoc.definition | replace: '|', '\|' }}
172
171
  {% endif %}
173
172
  {% endfor %}
@@ -196,8 +195,7 @@ h| Constraint:
196
195
  {% for attr in data_type.attributes %}
197
196
  {% capture cardinality %}&#91;{% case attr.cardinality.min %}{% when 'C' %}0{% when 'M' %}1{% else %}{{ attr.cardinality.min }}{% endcase %}..{{ attr.cardinality.max }}&#93;{% endcapture %}
198
197
  | {{ attr.name }}
199
- {% capture ref_id %}{% if additional_context.external_classes[attr.type] %}{{ additional_context.external_classes[attr.type] }}{% else %}{{ attr.type }}-section{% endif %}{% endcapture %}
200
- | <<{{ ref_id }},{{ attr.type }}>> {{ cardinality }}
198
+ {% if additional_context.external_classes[attr.type] %}| <<{{ additional_context.external_classes[attr.type] }},{{ attr.type }}>> {{ cardinality }}{% else %}| <<section-{{ attr.xmi_id }},{{ attr.type }}>> {{ cardinality }}{% endif %}
201
199
  | {{ attr.definition | replace: '|', '\|' }}
202
200
 
203
201
  {% endfor %}
@@ -1,5 +1,5 @@
1
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 %}{% capture ref_id %}{% if additional_context.external_classes[assoc.member_end] %}{{ additional_context.external_classes[assoc.member_end] }}{% else %}{{ assoc.member_end }}-section{% endif %}{% endcapture %}<<{{ ref_id }},{{ assoc.member_end }}>>{% endfor %}{% endcapture %}
2
+ {% capture generalizations %}{% assign inheritance = klass.associations | where: "member_end_type", "inheritance" %}{% for assoc in inheritance %}{% if additional_context.external_classes[assoc.member_end] %}<<{{ additional_context.external_classes[assoc.member_end] }},{{ assoc.member_end }}>>{% else %}<<section-{{ assoc.member_end_xmi_id }},{{ assoc.member_end }}>>{% endif %}{% endfor %}{% endcapture %}
3
3
  [[section-{{ klass.xmi_id }}]]
4
4
  {{equalsigns}} {{ klass.name }}
5
5
  {%comment%}(inside class: depth is {{ depth }}, equalsigns {{equalsigns}}){%endcomment%}
@@ -31,8 +31,7 @@ h| Constraint:
31
31
  {% if assoc.member_end_attribute_name.size > 0 %}
32
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
33
  | {{ assoc.member_end_attribute_name }}
34
- {% capture ref_id %}{% if additional_context.external_classes[assoc.member_end] %}{{ additional_context.external_classes[assoc.member_end] }}{% else %}{{ assoc.member_end }}-section{% endif %}{% endcapture %}
35
- | <<{{ ref_id }},{{assoc.member_end}}>> {{ cardinality }}
34
+ {% if additional_context.external_classes[assoc.member_end] %}| <<{{ additional_context.external_classes[assoc.member_end] }},{{assoc.member_end}}>> {{ cardinality }}{% else %}| <<section-{{ assoc.member_end_xmi_id }},{{ assoc.member_end }}>> {{ cardinality }}{% endif %}
36
35
  | {{ assoc.definition | replace: '|', '\|' }}
37
36
  {% endif %}
38
37
  {% endfor %}
@@ -60,8 +59,7 @@ h| Constraint:
60
59
  {% for attr in klass.attributes %}
61
60
  {% capture cardinality %}&#91;{% case attr.cardinality.min %}{% when 'C' %}0{% when 'M' %}1{% else %}{{ attr.cardinality.min }}{% endcase %}..{{ attr.cardinality.max }}&#93;{% endcapture %}
62
61
  | {{ attr.name }}
63
- {% capture ref_id %}{% if additional_context.external_classes[attr.type] %}{{ additional_context.external_classes[attr.type] }}{% else %}{{ attr.type }}-section{% endif %}{% endcapture %}
64
- | <<{{ ref_id }},{{ attr.type }}>> {{ cardinality }}
62
+ {% if additional_context.external_classes[attr.type] %}| <<{{ additional_context.external_classes[attr.type] }},{{ attr.type }}>> {{ cardinality }}{% else %}| <<section-{{ attr.xmi_id }},{{ attr.type }}>> {{ cardinality }}{% endif %}
65
63
  | {{ attr.definition | replace: '|', '\|' }}
66
64
 
67
65
  {% endfor %}
@@ -89,8 +89,11 @@
89
89
 
90
90
  {% for klass in package.classes %}
91
91
  {% unless not_classes_stereotypes contains klass.stereotype %}
92
- {% capture ref_id %}{% if additional_context.external_classes[klass.name] %}{{ additional_context.external_classes[klass.name] }}{% else %}{{ klass.name }}-section{% endif %}{% endcapture %}
93
- | <<{{ ref_id }},{{ klass.name }}>> «{{ klass.stereotype }}»
92
+ {% if additional_context.external_classes[klass.name] %}
93
+ | <<{{ additional_context.external_classes[klass.name] }},{{ klass.name }}>> «{{ klass.stereotype }}»
94
+ {% else %}
95
+ | | <<section-{{ klass.xmi_id }},{{ klass.name }}>> «{{ klass.stereotype }}»
96
+ {% endif %}
94
97
  | {{ klass.definition | replace: '|', '\|' }}
95
98
 
96
99
  {% endunless %}
@@ -9,7 +9,7 @@
9
9
  {% assign package_name = package.name %}
10
10
  {% unless package_entities and package_entities[package_name][klass_name] != true %}
11
11
  {% unless not_classes_stereotypes contains klass.stereotype %}
12
- | <<{{ klass.name }}-section,{{ klass.name }}>> «{{ klass.stereotype }}»
12
+ | <<section-{{ klass.xmi_id }},{{ klass.name }}>> «{{ klass.stereotype }}»
13
13
  | {{ klass.definition | replace: '|', '\|' }}
14
14
 
15
15
  {% endunless %}
@@ -4,7 +4,7 @@
4
4
  |Name |Description
5
5
 
6
6
  {% for klass in classes %}
7
- | <<{{ klass.name }}-section,{{ klass.name }}>> «{{ klass.stereotype | default: "Enumeration" }}»
7
+ | <<section-{{ klass.xmi_id }},{{ klass.name }}>> «{{ klass.stereotype | default: "Enumeration" }}»
8
8
  | {{ klass.definition | replace: '|', '\|' }}
9
9
 
10
10
  {% endfor %}
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.4.13".freeze
4
+ VERSION = "0.4.14".freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plugin-lutaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.13
4
+ version: 0.4.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-21 00:00:00.000000000 Z
11
+ date: 2021-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -301,7 +301,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
301
301
  - !ruby/object:Gem::Version
302
302
  version: '0'
303
303
  requirements: []
304
- rubygems_version: 3.1.6
304
+ rubygems_version: 3.2.22
305
305
  signing_key:
306
306
  specification_version: 4
307
307
  summary: Metanorma plugin for LutaML