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

Types' orders #149

Open pedropaulofb opened 1 year ago

pedropaulofb commented 1 year ago

In its current version (0.5.3), the plugin allows an user to create classes stereotyped with type that:

a) have an invalid order (e.g., the char 'x') b) have order 0 c) have order 1 d) have order >1 e) orderless

Each option has the following situation:

a) The JSON is generated with its order field with null value (which should not occur, considering that there is a default value for this and, hence, the order field should be non nullable) b) The syntactical evaluation falsely reports that no order was assigned. In fact, the order was incorrectly assigned and should be considered invalid. c) The syntactical evaluation does not report problems for a class with order 1. The correct behavior would be to report that "the class must have a unique OntoUML stereotype", it is a first-order type. To create a valid model the user must create classes stereotyped as types only for high-order types.

Cases d and e are the correct use of the type sterotype.

Also, if the user manually deletes the order Tagged Value, the syntactical validation reports no problem.

I propose forbidding the inclusion of values other than * and than integers lower than 2.

In addition, any type without a specialization relation should be considered incomplete (not syntactically wrong) and, hence, the user should be notified (e.g., via a warning).