lambdamusic / Ontospy

Python library and command-line interface for inspecting and visualizing RDF models aka ontologies.
http://lambdamusic.github.io/Ontospy/
MIT License
218 stars 52 forks source link

can you support schema:domain/rangeIncludes ? #69

Closed VladimirAlexiev closed 5 years ago

VladimirAlexiev commented 6 years ago

https://rawgit.com/euBusinessGraph/eubg-data/master/ontology/prop-ebgadminunitl6.html shows no meaningful domain and range. We define it as follows:

ebg:adminUnitL6 a owl:ObjectProperty ;
  schema:domainIncludes locn:Address ;
  schema:rangeIncludes ebg:LAURegion ;
  rdfs:label "Municipality/Commune/Settlement" ;
  rdfs:isDefinedBy ebg: ;
  skos:definition "LAU2 region of the address." .

We use schema:domain/rangeIncludes because they allow polymorphic properties, whereas rdfs:domain/range bind a property to a single class, so they restrict flexibility and don't promote reuse.

I selected Ontodocs because I saw your schema.org example http://www.michelepasin.org/support/ontospy-examples/schema_org_topbraidttl/prop-schemaaction.html so I assumed you support schema:domain/rangeIncludes. But I notice now this is "Schema.org (converted to OWL by TopQuadrant)", and it uses rdfs:domain/range:

schema:action a owl:DatatypeProperty ;
    rdfs:label "action"^^xsd:string ;
    schema:supersededBy schema:muscleAction ;
    rdfs:comment "The movement the muscle generates." ;
    rdfs:domain schema:Muscle ;
    rdfs:range xsd:string .

Unfortunately no doc generator supports schema:domain/rangeIncludes, except schema's own generator :-(. Is there a chance ontodoc will support it?

VladimirAlexiev commented 6 years ago

https://github.com/OnToology/OnToology/issues/383

VladimirAlexiev commented 6 years ago

Another symptom: https://rawgit.com/euBusinessGraph/eubg-data/master/ontology/class-schemageocoordinates.html "Instances of schema:GeoCoordinates can have the following properties.... From class owl:Thing" and then all props in the ontology. Since it assumes all domains/ranges are owk:Thing, it assumes all properties apply anywhere.

sumutcan commented 5 years ago

Hi @VladimirAlexiev ,

I adapted the Ontospy library that is used by ontodocs to schema.org. This version works ONLY with schema:domainIncludes and rangeIncludes. I am planning to adapt the library as a framework to generate external schema.org extensions.

Feel free to clone: https://github.com/STIInnsbruck/Ontospy. Once you include this module to your ontodocs tool, it should visualize any ontology using domainIncludes and rangeIncludes properties.

VladimirAlexiev commented 5 years ago

Please submit a PR to @lambdamusic

On Fri, Jul 27, 2018, 19:24 Umutcan Şimşek notifications@github.com wrote:

Hi @VladimirAlexiev https://github.com/VladimirAlexiev ,

I adapted the Ontospy library that is used by ontodocs to schema.org. This version works ONLY with schema:domainIncludes and rangeIncludes. I am planning to adapt the library as a framework to generate external schema.org extensions.

Feel free to clone: https://github.com/STIInnsbruck/Ontospy. Once you include this module to your ontodocs tool, it should visualize any ontology using domainIncludes and rangeIncludes properties.

Greetings Umut

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lambdamusic/Ontodocs/issues/16#issuecomment-408469617, or mute the thread https://github.com/notifications/unsubscribe-auth/AAguupJEXficPBAnAMQtQR-KvqsXm6XDks5uKz7DgaJpZM4T6NWO .

sumutcan commented 5 years ago

@VladimirAlexiev @lambdamusic PR #46

lambdamusic commented 5 years ago

Thanks @sumutcan and @VladimirAlexiev - this is a great addition.

VladimirAlexiev commented 1 year ago

https://github.com/eccenca/jod/issues/15 asks the same props to be handled in 3 namespaces: schema, dcam, dcid