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

owl:imports #374

Closed spetrac closed 3 years ago

spetrac commented 3 years ago

To understand better the importing of multiple ttl-files, like the Ontology suggests, I found that the current way of using owl:imports might not be allright and in practise introduces some errors for rdf-stores:

  1. The owl ontology states that owl:imports is "The property that is used for importing other ontologies into a given ontology." and that the domain and range of this property are owl:Ontologys as well. The files that are imported in the IDS-ontology are no ontologies by themselfes, which is a semantic error.
  2. The terms of an rdf-tripel are one of: NamedNode, BlankNode or Literal. The object for the owl:import tripels in the ids-ontology is denoted like a NamedNode, which must be an absolute URI. RDF-Stores are very likely to reject that files because of relative URIs.
  3. Their are enough discussion on the internet about owl:imports (e.g. w3c on owl:imports or usage with rdf:about and rdf:ID), how to use them and whether they should be used as named imports or location imports, although both cases exclude the use as file-import with relative location. That makes it also unclear, if the imported file must be an ontology with same ID as the import-URI (case: named imports) or if the ontology can be found at that URI (case: location imports).

I would suggest using named imports in the main ontology and defining sub-ontologies with their own unique id. Obviously that way it is definitly harder to get the actual file for the sub-ontology, which is another problem. I understand that the owl:imports are currently very useful to merge all necessary ttl-files to one infomodel, but alternatively at least I would like to see something like file-URLs as location imports to indicate a relative file to the current one, e.g. ids: owl:imports <file:./model/infrastructure/Connector.ttl> (I know, technically relative file-URL does not exist either). At least for me it would be a quick-fix, so that the common js-rdf-stores do not through errors like "NamedNode IRI "model/infrastructure/Connector.ttl" must be absolute.". (Although this would not resolve any semantic issues with sub-ontologies.)

clange commented 3 years ago

Thanks for pointing this out; however, we might actually not have a problem at all. The reason for our relative-file imports such as

https://github.com/International-Data-Spaces-Association/InformationModel/blob/1e6029c0a575381017c75280b69143822fa49e4a/Ontology.ttl#L109-L110

is our internal maintenance process. We would like to keep the ontology modular by splitting it into many files. However, to generate the publishable, one-file ontology, we need to feed all these modules to the Widoco tool, which generates a one-file version of the ontology and also the HTML documentation. I just confirmed that the published ontology (source, published version) does not contain imports.

HaydarAk commented 3 years ago

Thanks for the clarification @clange . If there are still questions or need for discussion, feel free to reopen the issue.