OntoUML / ontouml-vp-plugin

A plugin for Visual Paradigm to add support for OntoUML modeling and model intelligence services
Apache License 2.0
35 stars 15 forks source link

Incorrect treatment of inverse properties in gUFO transformation (in an association with unlabelled ends) #112

Open jpalmeida opened 2 years ago

jpalmeida commented 2 years ago

Plugin v0.5.2

Creation of inverse properties fails when association ends are not explicitly named by the modeler.

Here is a snippet of Turtle generated from a simple model with a kind Person and a charaterization with Belief. Note the error in beliefInheresInPerson.

<http://example.com> rdf:type owl:Ontology;
    owl:imports gufo:.
:Person rdf:type owl:Class, gufo:Kind, owl:NamedIndividual;
    rdfs:subClassOf gufo:FunctionalComplex;
    rdfs:label "Person"@en.
:Belief rdf:type owl:Class, gufo:Kind, owl:NamedIndividual;
    rdfs:subClassOf gufo:IntrinsicMode;
    rdfs:label "Belief"@en.
:beliefInheresInPerson rdf:type owl:ObjectProperty;
    rdfs:domain :Belief;
    rdfs:range :Person;
    rdfs:subPropertyOf gufo:inheresIn;
    rdf:type owl:ObjectProperty;
    rdfs:range :Belief;
    rdfs:domain :Person;
    rdfs:subPropertyOf <gufoi:bears>.
:Person rdfs:subClassOf [
  rdf:type owl:Restriction;
  owl:onProperty :beliefInheresInPerson;
  owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger;
  owl:onClass :Belief
].
:Belief rdfs:subClassOf [
  rdf:type owl:Restriction;
  owl:onProperty :beliefInheresInPerson;
  owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger;
  owl:onClass :Person
].
claudenirmf commented 2 years ago

So, just to be precise, the error is the declaration of :beliefInheresInPerson as both a rdfs:subPropertyOf gufo:inheresIn and gufoi:bears, right?

Also, gufoi:bears isn't define or, at least, it is not imported in this case.

Anyway, this seems to be an issue on the ontouml-js project. I will open one there. Do we need an issue to add inverse relations on gUFO as well?