semanticarts / ontology-toolkit

Tools to update and export ontology RDF.
Apache License 2.0
34 stars 6 forks source link

rdfs:isDefinedBy not added when URI includes "data" rather than "ontologies" #36

Closed rjyounes closed 4 years ago

rjyounes commented 4 years ago

This seems odd but I don't see any other explanation of the behavior. The URI of the ontology is https://data.clientX.com/d/ontoName.

sa-bpelakh commented 4 years ago

I am not able to reproduce this issue. I used the following input

@prefix : <https://data.clientX.com/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

<https://data.clientX.com/d/ontoName> a owl:Ontology .

:MyClass a owl:Class; skos:prefLabel "My Class" .

and got

@prefix : <https://data.clientX.com/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

:MyClass a owl:Class ;
    rdfs:isDefinedBy <https://data.clientX.com/d/ontoName> ;
    skos:prefLabel "My Class" .

<https://data.clientX.com/d/ontoName> a owl:Ontology .

Were there any additional factors?

rjyounes commented 4 years ago

The problem is when the entity is and individual rather than an OWL class or property:

@prefix : <https://data.clientX.com/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix star: <https://ontologies.pwc.com/starchart/> .

:MyIndividual a star:Resource ;
    skos:prefLabel "Tom" .

<https://data.clientX.com/d/ontoName> a owl:Ontology .

No rdfs:isDefinedBy gets added.