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

Refactor identified refactoring options for the IDS information model #490

Closed JohannesLipp closed 2 years ago

JohannesLipp commented 3 years ago

General requirements from the Java lib:

JohannesLipp commented 3 years ago

refers to #461

JohannesLipp commented 3 years ago

Proposed solution to guarantee Java lib generation support:

BEFORE:

SHACL: [...] ids:Agent
Ontology: ids:Agent rdfs:subClassOf foaf:Agent; label ""; comment "";

AFTER:

SHACL: [...] foaf:Agent
IDS Ontology: -
New helper ontology file: foaf:Agent a owl:Class, label ""; comment "";

@maboeckmann please confirm if this approch (i.e., reading an additional helper file with ontology specification) is fine with you, thanks!

JohannesLipp commented 3 years ago

@maboeckmann PUSH

JohannesLipp commented 3 years ago

@changqin26 please invite Pascal to this repository and ask him about this issue - thank you!

JohannesLipp commented 3 years ago

@pnlinden

JohannesLipp commented 3 years ago

@pnlinden Could you please comment on our question above ASAP? Thank you.

pnlinden commented 3 years ago

I tested a minimal example for your proposal. When the "helper files" are added for the removed classes in the form you proposed above, we need to make a few adjustments in the CodeGen Tool, but then this should be fine.

JohannesLipp commented 2 years ago

Please create one central helper file, and create a new directory in utils for that.

See my comment above: For each class that we replaced with an external class, please add a minimal definition as follows:

JohannesLipp commented 2 years ago

@pnlinden Could you please verify that our freshly created helper file on this branch satisfies all your needs? As soon as the code generation works flawlessly, we can merge this PR. Thank you!

pnlinden commented 2 years ago

In general, this already looks good! But I have a few proposals for adjustment:

Please let me know if these changes can be realized and, if so, when they are ready to be tested again. Thank you!

JohannesLipp commented 2 years ago

Thank you very much for your review!

My comments in order to your four bullets:

@lcomet could you please update the branch as requested? Thank you in advance!

JohannesLipp commented 2 years ago

@pnlinden Please note that @lcomet implemented all requested changes. The clearance of ids:Constraint was done in 3aed17857f89358e709730a7b7470a7b377911be, time and skos:Concept in fe937511dc51115273af2837d545414e2ba334c2, and all domains/ranges were added in 43f638a666b04a574baeb0dd5b57e9a57d81cf99.

Please verify again and report to us, thank you!

pnlinden commented 2 years ago

Thank you for the changes! I just noticed one more thing while looking through the output of the CodeGen Tool: The classes in the helper file used to be ids-classes. As such, we sometimes had some hierarchical statements, e.g. ids:Rule rdfs:subClassOf ids:Described ;, ids:Duty rdfs:subClassOf ids:Rule ;, ... This kind of relation does not exist anymore in the helper file, such that e.g. the properties of odrl:Rule are not passed to odrl:Duty. But I would recommend that we keep this relations between the classes. That would mean, I would like to propose one more (this time small) change to you: This would include the following additions in the helper file:

I think, this should be all the "lost" subclass relation. But please check that I didn't miss anything.

lcomet commented 2 years ago

@pnlinden Please note that the requested changes regarding the missing subclass relations have been implemented under commit 78da3cd (cc @JohannesLipp)

pnlinden commented 2 years ago

Thank you! I tested the new version and it seems to be all good now! The branch for the CodeGen Tool is prepared and when the update to InfoModel 5.0.0 comes around, we can merge that branch accordingly.

riannella commented 2 years ago

As a note, SKOS allows an owl:objectProperty to also be an skos:Concept: https://www.w3.org/TR/2009/REC-skos-reference-20090818/#L896