Skip to content

Commit

Permalink
Allow user to set absolute path in name in guidance when using with l…
Browse files Browse the repository at this point in the history
…utaml_ea_xmi
  • Loading branch information
kwkwan committed Nov 15, 2024
1 parent 4fc6295 commit 8be8261
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 3 deletions.
32 changes: 30 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,36 @@ packages:
guidance: "path/to/guidance.yaml"
-----

Please refer to `lutaml_klass_table` section for how to configure the guidance
yaml file.
The guidance file should be in the following format:

[source,yaml]
----
---
classes:
- name: "NameOfClass"
attributes:
- name: Name Of Attribute (e.g. gml:boundedBy)
used: false
guidance: |
Drop guidance message here.
...
----

If you want to define the guidance, you can define the `name` of the class
under `classes`. Then define which `attributes` you want to add guidance by the
`name`. Set `used` to show the attribute is used or not. Drop the message of
guidance in `guidance`.

The `name` of class can be defined in the following ways:

* `name: "NameOfClass"` specifies the name of the `class`.
(e.g. `name: "Building"`)
If there are multiple classes with the same name, it is recommended to
specify the class by absolute path.

* `name: "::NameOfPackage::NameOfClass"` specifies the name of the `class` in
`absolute` path.
(e.g. `name: "::EA_Model::Conceptual Models::CityGML2.0::bldg::Building"`)

== Documentation

Expand Down
58 changes: 58 additions & 0 deletions spec/fixtures/lutaml/guidance/guidance_absolute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
classes:
- name: "::EA_Model::Conceptual Models::CityGML2.0::bldg::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: BuildingPart
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: |
この関連役割は使用されていません。
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ea_extension:
- "ISO19103MDG v1.0.0-beta.xml"
- "CityGML_MDG_Technology.xml"
template_path: "spec/fixtures/lutaml/liquid_templates_guidance"
guidance: "spec/fixtures/lutaml/guidance/guidance.yaml"
guidance: "spec/fixtures/lutaml/guidance/guidance_absolute.yaml"

0 comments on commit 8be8261

Please sign in to comment.