SEMICeu / style-guide

SEMIC style guide to create reusable vocabularies and application profiles
https://semiceu.github.io/style-guide/
Creative Commons Attribution 4.0 International
9 stars 2 forks source link

Bad class inheritance example #64

Closed GeertThijs closed 1 year ago

GeertThijs commented 1 year ago

In § Class inheritance. The attributes and associations of PublicOrganization are all attributes of org:Organization. So they should be visualised in that class and not in the subclass. The association unitOf/hasUnit is incorrect also: it should be between Organization and OrganizationalUnit.

csnyulas commented 1 year ago

@bertvannuffelen , this seems to be a problem/bug in CPOV, which is depicted in the example that we provided for CMC-R8.

I suppose that it is not feasible to update CPOV, as a quick fix, to address the issues pointed out above.

Could we use another example, perhaps, to illustrate the application of the convention? Perhaps from DCAT? Here are some screen shots that @costezki kindly provided to me, where it can be seen that in DCAT the inherited attributes from superclasses are explicitly shown?

image (2)

image (3)

Would this, or some similar example, provide a good alternative to what we have @bertvannuffelen ? Of course nicer (cleaner/clearer) screen shots would be appreciated.

csnyulas commented 1 year ago

BTW, @bertvannuffelen, we (i.e. @costezki and myself) are using the feature/sem-70 branch to address the remaining GH issues before the version 1.0.0 release. You can use the same branch, or create a new one, in case you want to provide the fix directly to the code base.

EmielPwC commented 1 year ago

The issues identified by Geert will be resolved in the next iteration of CPOV where an effort to align with this style guide will be undertaken. Due to this fact it is indeed not a good example.

csnyulas commented 1 year ago

Thank you @EmielPwC! Could you, perhaps, provide a screen shot with how it will be, after alignment, if this work has already been done? Or should we better look for another example. Suggestions are welcome.

EmielPwC commented 1 year ago

you could use the inheritance from the upcoming Core Business Vocabulary release

bertvannuffelen commented 1 year ago

The example CMC-R9 abstract class could be in DCAT-AP: dcat:Resource (abstract) vs dcat:Dataset (concrete)

The example for CMC-R8 we can illustrate more with the following conformance statement:

The list of included properties contain a selection of the properties from the W3C DCAT 2.0 specification [vocab-dcat-2] on which DCAT-AP expresses additional constraints or on which DCAT-AP wants to emphasize their usage. Any property that is mentioned in DCAT applicable to a class but not explicitly is listed DCAT-AP is considered an optional field for DCAT-AP for that class. It means that for these properties DCAT-AP has no use cases that require additional usage considerations beyond ‘use the property as DCAT specifies.

Even though the comment of @GeertThijs is relevant, I think the example diagram is not that wrong in illustrating CMC-R8. The rule of CMC-R8 states that the editor should ensure that all superclass properties apply to the subclass, and that any specific properties on the subclass should not conflict with the ones of the superclass.

Maybe we should highlight that more.

csnyulas commented 1 year ago

I will close this issue, as I used the suggestion fromm @EmielPwC in https://github.com/SEMICeu/style-guide/issues/64#issuecomment-1538381184 , and added a cleaner example for the CMC-R8: Class Inheritance (see above commit).

Regrading your suggestion @bertvannuffelen, about adding an example from DCAT for CMC-R9: Abstract Classes, which is separate from this issue, I haven't added that, as I couldn't find a suggestive diagram illustrating it (DCAT does not rely much on visual presentation :) which is quite to the point made in #59). If you find a more illustrative/clear example for CMC-R9, @bertvannuffelen, please feel free to add it to the source ASAP, as the release of the first version is imminent.