Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update templates for guidance #213

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions .github/workflows/collection.yml

This file was deleted.

35 changes: 34 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,43 @@ jobs:
use-bundler: true

- name: Print Metanorma version
run: metanorma --version
run: metanorma --version

- name: Metanorma generate site
uses: actions-mn/build-and-publish@v2
with:
agree-to-terms: true
destination: artifact

build-collection:
runs-on: ubuntu-latest
container:
image: metanorma/metanorma:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Setup Flavor
uses: actions-mn/setup-flavors@v1
with:
extra-flavors: plateau
github-pakages-token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
use-bundler: true

- name: Print Metanorma version
run: metanorma --version

- name: Generate Metanorma collection
run: metanorma collection collection.yml --agree-to-terms

- name: Upload collection artifacts
uses: actions/upload-artifact@v4
with:
name: collection
path: |
index.html
*_index.html
document*.html
collection.presentation.xml
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ Gemfile.lock
/.vscode
/_backups
.DS_Store
.ruby-version
.ruby-version
_tmp_images*
1 change: 1 addition & 0 deletions sources/001-mds/lutaml_data_dictionary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ render_nested_packages: true
# ea_extension:
# - "ISO19103MDG v1.0.0-beta.xml"
template_path: "../../sources/liquid_templates"
guidance: "../../sources/guidance/guidance.yaml"
2 changes: 1 addition & 1 deletion sources/001-v4/sections/section-04/section-02.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1882,7 +1882,7 @@ image::images/040.svg[]

====== bldg:Building

lutaml_klass_table::../../sources/xmi/plateau_all_packages_export.xmi[name="Building",template="../../sources/liquid_templates/_klass_table.liquid"]
lutaml_klass_table::../../sources/xmi/plateau_all_packages_export.xmi[name="Building",template="../../sources/liquid_templates/_klass_table.liquid",guidance="../../sources/guidance/guidance.yaml"]

[cols="1a,1a,2a"]
|===
Expand Down
4 changes: 2 additions & 2 deletions sources/001-v4/sections/section-04/section-08.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ image::images/198.svg[]

====== luse:LandUse

lutaml_klass_table::../../sources/xmi/plateau_all_packages_export.xmi[name="LandUse",template="../../sources/liquid_templates/_klass_table.liquid"]
lutaml_klass_table::../../sources/xmi/plateau_all_packages_export.xmi[name="LandUse",template="../../sources/liquid_templates/_klass_table.liquid",guidance="../../sources/guidance/guidance.yaml"]

[cols="1a,1a,2a"]
|===
Expand Down Expand Up @@ -162,7 +162,7 @@ h| 関連役割名 h| 関連役割の型及び多重度 h| 定義

====== uro:LandUseDetailAttribute

lutaml_klass_table::../../sources/xmi/plateau_all_packages_export.xmi[name="LandUseDetailAttribute",template="../../sources/liquid_templates/_klass_table.liquid"]
lutaml_klass_table::../../sources/xmi/plateau_all_packages_export.xmi[name="LandUseDetailAttribute",template="../../sources/liquid_templates/_klass_table.liquid",guidance="../../sources/guidance/guidance.yaml"]

[cols="1a,1a,2a"]
|===
Expand Down
86 changes: 86 additions & 0 deletions sources/guidance/guidance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
classes:
- name: Building
attributes:
- name: gml:boundedBy
used: false
guidance: |
この属性は使用されていません。
- name: core:relativeToTerrain
used: false
guidance: |
この属性は使用されていません。
- name: core:relativeToWater
used: false
guidance: |
この属性は使用されていません。
- name: bldg:function
used: false
guidance: |
この属性は使用されていません。
- name: bldg:storeyHeightsAboveGround
used: false
guidance: |
この属性は使用されていません。
- name: bldg:storeyHeightsBelowGround
used: false
guidance: |
この属性は使用されていません。
- name: bldg:lod2MultiSurface
used: false
guidance: |
この関連役割は使用されていません。
- name: bldg:lod3MultiSurface
used: false
guidance: |
この関連役割は使用されていません。
- name: LandUse
attributes:
- name: gml:boundedBy
used: false
guidance: |
この属性は使用されていません。
- name: core:relativeToTerrain
used: false
guidance: |
この属性は使用されていません。
- name: core:relativeToWater
used: false
guidance: |
この属性は使用されていません。
- name: luse:function
used: false
guidance: |
この属性は使用されていません。
- name: luse:usage
used: false
guidance: |
この属性は使用されていません。
- name: gen:stringAttribute
used: false
guidance: |
この関連役割は使用されていません。
- name: gen:intAttribute
used: false
guidance: |
この関連役割は使用されていません。
- name: gen:doubleAttribute
used: false
guidance: |
この関連役割は使用されていません。
- name: gen:dateAttribute
used: false
guidance: |
この関連役割は使用されていません。
- name: gen:uriAttribute
used: false
guidance: |
この関連役割は使用されていません。
- name: gen:measureAttribute
used: false
guidance: |
この関連役割は使用されていません。
- name: gen:genericAttributeSet
used: false
guidance: |
この関連役割は使用されていません。
98 changes: 64 additions & 34 deletions sources/liquid_templates/_klass_table.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -11,75 +11,105 @@
{%- assign stereotype = " " -%}
{%- endif -%}

[cols="1a,1a,2a"]
[cols="1a,1a,2a,1a"]
|===
| AGT 型の定義
2+| {{ root.definition }}

h| 上位の型 2+| {{ upper_klass_name }}
h| ステレオタイプ 2+| {{ stereotype }}
| AGT 型の定義 3+| {{ root.definition }}
h| 上位の型 3+| {{ upper_klass_name }}
h| ステレオタイプ 3+| {{ stereotype }}

{% if root.inherited_props.size > 0 %}
3+h| 継承する属性
h| 属性名 h| 属性の型及び多重度 h| 定義
4+h| 継承する属性
h| 属性名 h| 属性の型及び多重度 h| 定義 h| 補導
{% endif %}
{% for attr in root.inherited_props %}
{%- if attr.has_association? == false -%}
{%- capture name_col -%}
{{ attr.name_ns }}:{{ attr.name }}
({{ attr.gen_name }})
{%- endcapture -%}
{%- if attr.used? == false -%}
{%- capture name_col -%}
({{ attr.name_ns }}:{{ attr.name }})
<{{ attr.gen_name }}>
{%- endcapture -%}
{%- else -%}
{%- capture name_col -%}
{{ attr.name_ns }}:{{ attr.name }}
<{{ attr.gen_name }}>
{%- endcapture -%}
{%- endif -%}
| {{ name_col | newline_to_br }}
| {{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.definition }}
| {{ attr.guidance }}
{%- endif -%}
{% endfor %}

{% if root.owned_props.size > 0 %}
3+h| 自身に定義された属性
h| 属性名 h| 属性の型及び多重度 h| 定義
4+h| 自身に定義された属性
h| 属性名 h| 属性の型及び多重度 h| 定義 h| 補導
{% endif %}
{% for attr in root.owned_props %}
{%- if attr.has_association? == false -%}
{%- capture name_col -%}
{{ attr.name_ns }}:{{ attr.name }}
({{ attr.gen_name }})
{%- endcapture -%}
{%- if attr.used? == false -%}
{%- capture name_col -%}
({{ attr.name_ns }}:{{ attr.name }})
<{{ attr.gen_name }}>
{%- endcapture -%}
{%- else -%}
{%- capture name_col -%}
{{ attr.name_ns }}:{{ attr.name }}
<{{ attr.gen_name }}>
{%- endcapture -%}
{%- endif -%}
| {{ name_col | newline_to_br }}
| {{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.definition }}
| {{ attr.guidance }}
{%- endif -%}
{% endfor %}

{% if root.inherited_assoc_props.size > 0 %}
3+h| 継承する関連役割
h| 関連役割名 h| 関連役割の型及び多重度 h| 定義
4+h| 継承する関連役割
h| 関連役割名 h| 関連役割の型及び多重度 h| 定義 h| 補導
{% endif %}
{% for attr in root.inherited_assoc_props %}
{%- if attr.has_association? == true -%}
{%- capture name_col -%}
{{ attr.name_ns }}:{{ attr.name }}
({{ attr.gen_name }})
{%- endcapture -%}
{%- if attr.used? == false -%}
{%- capture name_col -%}
({{ attr.name_ns }}:{{ attr.name }})
<{{ attr.gen_name }}>
{%- endcapture -%}
{%- else -%}
{%- capture name_col -%}
{{ attr.name_ns }}:{{ attr.name }}
<{{ attr.gen_name }}>
{%- endcapture -%}
{%- endif -%}
| {{ name_col | newline_to_br }}
| {{ attr.type_ns }}:{{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.type_ns }}:{{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.definition }}
| {{ attr.guidance }}
{%- endif -%}
{% endfor %}

{% if root.assoc_props.size > 0 %}
3+h| 自身に定義された関連役割
h| 関連役割名 h| 関連役割の型及び多重度 h| 定義
4+h| 自身に定義された関連役割
h| 関連役割名 h| 関連役割の型及び多重度 h| 定義 h| 補導
{% endif %}
{% for attr in root.assoc_props %}
{%- if attr.has_association? == true -%}
{%- capture name_col -%}
{{ attr.name_ns }}:{{ attr.name }}
({{ attr.gen_name }})
{%- endcapture -%}
{%- if attr.used? == false -%}
{%- capture name_col -%}
({{ attr.name_ns }}:{{ attr.name }})
<{{ attr.gen_name }}>
{%- endcapture -%}
{%- else -%}
{%- capture name_col -%}
{{ attr.name_ns }}:{{ attr.name }}
<{{ attr.gen_name }}>
{%- endcapture -%}
{%- endif -%}
| {{ name_col | newline_to_br }}
| {{ attr.type_ns }}:{{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.type_ns }}:{{ attr.type }} [{{ attr.cardinality.min }}..{{ attr.cardinality.max }}]
| {{ attr.definition }}
| {{ attr.guidance }}
{%- endif -%}
{% endfor %}
|===
Loading