oeg-upm / Chowlk

Tool to transform an ontology diagram into OWL code.
Apache License 2.0
22 stars 6 forks source link

Cardinality ranges #62

Closed jordanasalamon closed 4 months ago

jordanasalamon commented 7 months ago

Hi,

I recently started to use Chowlk to develop my ontologies, but for some reason the cardinalities are not being translated correctly in my case. If I have in the model the following relationship: Class1 has_x (1..N) Class2 The translated owl file only gives me the following axiom: Class1 has_x min 1 owl:Thing

This happens with arrows with domain and range and arrows without domain and range. Is there something that I am missing here? Or doing wrong? Screenshots were included to help understand the problem.

Screenshot 2023-11-28 173605 Screenshot 2023-11-28 173629

Thank you for your time and consideration.

Sergio-Carulli commented 7 months ago

Hi,

Currently only owl 1 cardinality constraints are allowed to be created in chowlk (https://www.w3.org/TR/owl-ref/#CardinalityRestriction). I think you are trying to declared owl 2 qualified cardinalities (https://www.w3.org/TR/owl2-syntax/#Object_Property_Cardinality_Restrictions). Qualified cardinalities are not yet in chowlk, but we are currently working on the notation to add them as soon as possible.

The style of the arrows (arrows with domain and range, arrows without domain and range, etc) . It only affects the declaration of the properties (in order to indicate if they must be declared with domain and/or range).

Thanks for using chowlk.

jordanasalamon commented 7 months ago

Hi,

Thank you for the answer!

Sergio-Carulli commented 4 months ago

Qualified Cardinalities have been implemented and added to the library which you can download from the Chowlk main page or https://chowlk.linkeddata.es/static/resources/chowlk-library-complete.xml

To see how to use them please see https://chowlk.linkeddata.es/notation.html#restriction-qualified-cardinality-constraint-identifier