OP-TED / model2owl

Transform UML into a formal OWL ontology and SHACL shapes
https://meaningfy-ws.github.io/model2owl-docs
European Union Public License 1.2
22 stars 4 forks source link

cross-module class connectors ( inheritance, association, dependency) #142

Open costezki opened 1 year ago

costezki commented 1 year ago

Generalisation relation example epo:ResultNotice (in eNotice module) inherits from epo:Notice (in Core module) in the UML model. However, when OWL is generated, the connectors across modules are lost (i.e. are not included in the transformation output). We need to generate such ingeritance relations in the eNotice OWL module.

The same principle applies to other connector types (generalisation, association, dependency, ). The general rule is: if a class in module A has a relation to a class in module B, then that relation needs to be reflected when the module A is transformed.

cristianvasquez commented 4 months ago

We are facing this problem for e-Access (https://github.com/OP-TED/ePO/pull/586). The generated artifacts don't have all relations. Is this related to the XMI exports? (related #146)

Towards fixing the issue, I saw there is a merge-xmi operation in the repository, is it used for that purpose?

cristianvasquez commented 1 month ago

More information:

See the XMI for one module:

https://raw.githubusercontent.com/OP-TED/ePO/develop/implementation/eSubmission/xmi_conceptual_model/eSubmission.xml

Take one of he inter-module relations in the file: refersToNotice

<ownedElement xmi:type="umldi:UMLAssociationEndLabel" xmi:id="EAID_TEL000000_3004_48e5_963A_7FE0F57DA5D8" text="+epo-acc:refersToNotice" modelElement="EAID_dstDD6F7E_CC4D_4861_963A_7FE0F57DA5D8">
    <bounds xmi:type="dc:bounds" xmi:id="EAID_DBTEL000000_3004_48e5_963A_7FE0F57DA5D8" x="295" y="417" width="98" height="14"/>
</ownedElement>
<ownedElement xmi:type="umldi:UMLAssociationEndLabel" xmi:id="EAID_TEL000000_3004_48e5_BE52_91F3F7270840" text="+epo:refersToNotice 0..1" modelElement="EAID_dstE70932_F57C_4861_BE52_91F3F7270840">
    <bounds xmi:type="dc:bounds" xmi:id="EAID_DBTEL000000_3004_48e5_BE52_91F3F7270840" x="81" y="529" width="100" height="14"/>
</ownedElement>

They refer to the modelElement id: EAID_dstDD6F7E_CC4D_4861_963A_7FE0F57DA5D8 and EAID_dstE70932_F57C_4861_BE52_91F3F7270840 respectively. These elements are not contained in the XMI. edit: targets are contained but not exported