International-Data-Spaces-Association / InformationModel

The Information Model of the International Data Spaces implements the IDS reference architecture as an extensible, machine readable and technology independent data model.
Apache License 2.0
64 stars 37 forks source link

Inconsistent cardinalities in metamodel vs. SHACL #171

Closed clange closed 4 years ago

clange commented 4 years ago

At the IDSA Plugfest we just talked about examples for validating infomodel instances and/or how to generate valid instances from Java.

I chose ResourceShape as an example. It says "contractOffer minCount 1" (https://github.com/IndustrialDataSpace/InformationModel/blob/4ceeb45e705d904867f715957a1b32ecb88e4d1d/testing/content/ResourceShape.ttl#L69)

The metamodel validation metadata in Resource do not say so, i.e., there is no "NotNull" information (https://github.com/IndustrialDataSpace/InformationModel/blob/41697b44d4cc76f0d5e7ebca224e23307a79de8c/model/content/Resource.ttl#L28)

Which of the two is correct? If this is a mistake, does it also occur in other places?

HaydarAk commented 4 years ago

This is definitely an inconsistency and a mistake. The possible fix for this depends on how we define a Resource in the IDS.

Is a Contract Offer mandatory for a ids:Resource ?

Both are plausible, but I'd say it should not be mandatory. One could publish a Resource without a Contract and update it afterwards.

sebbader commented 4 years ago

"Is a Contract Offer mandatory for a ids:Resource ?

if no: we should remove the sh:minCount 1 ; from teh ids:ResourceShape"

+1 from my part. There must be a possibility to publish resources without licenses/contracts.

HaydarAk commented 4 years ago

fixed: see commit 5f3732f9668abf661ab9ef5b982a4e6a470a4825