OntoUML / ontouml-js

Javascript library for manipulating OntoUML models.
Apache License 2.0
11 stars 8 forks source link

Incorrect transformation of <<derivation>> relations #23

Closed tgoprince closed 4 years ago

tgoprince commented 4 years ago

The transformation from OntoUML to gUFO is not transforming <<derivation>> relations correctly.

It is creating sub properties of gufo:isDerivedFrom instead of using it.

Let's use the following model as a reference:

derivation

The currently output regarding derivations is:

:isDerivedFromKg9rei6gaqaccwic rdf:type owl:ObjectProperty;
    rdfs:comment "Relation URI was automatically generated.".
:isDerivedFromMotbei6gaqaccwn2 rdf:type owl:ObjectProperty;
    rdfs:comment "Relation URI was automatically generated.".
:Person_EoyrEI6GAqACCWes rdf:type owl:Class, owl:NamedIndividual;
    rdfs:label "Person".
:isDerivedFromGek7ei6gaqaccwqr rdf:type owl:ObjectProperty;
    rdfs:comment "Relation URI was automatically generated.".generated." .

(These weird character sequences at the end of the properties URIs are the ids of the original derivations).

Instead, it should generate the following statements:

:WorksAt gufo:isDerivedFrom :EmploymentContract .
:Loves gufo:isDerivedFrom :Love .
:HeavierThan gufo:isDerivedFrom :Weight .

No object properties should be created!

PS: This example highlights another small bug: relation URIs should be generated in lowerCamelCase not CamelCase. In our example, we should generate :worksAt, :loves and :heavierThan