[announce] OWL 2 JSON Schema converter

1,301 views
Skip to first unread message

Sebastian Lasse

unread,
Jan 16, 2015, 11:17:56 AM1/16/15
to json-...@googlegroups.com
Hey folks,


Comments and Commits are welcome.

Austin Wright

unread,
Jan 16, 2015, 5:26:08 PM1/16/15
to json-...@googlegroups.com
Can you explain a bit on what it means to "convert" OWL to JSON Schema?

OWL is an entirely different beast; it tells you what data means and what data you can infer from the data (e.g. if _:todd is a Ford and Ford is a kind of car, then _:todd is a car). In some cases, you can determine that data is internally inconsistent (e.g. if _:todd is female, and female is a kind of human, WAIT STOP that's impossible, something can't be both a car and a human), but this is different than JSON Schema which declares restrictions on the range of values for instances.

Unless we're talking about JSON Hyper-schema by extracting link relations from JSON instances, and using OWL to make assertions about what our JSON instance means from the declared link relations.

Also, I don't think I've ever actually seen OWL's XML syntax used in production (I know it's mandatory, but what does that actually mean to most systems...). I prefer a simple graph, serialize to Turtle if that's necessary.

Thoughts?

Austin Wright.

Sebastian Lasse

unread,
Jan 17, 2015, 6:24:09 AM1/17/15
to json-...@googlegroups.com
Preclaimer: I am always referring to JSON Hyper-schema here.
It is a part of the spec. and additionally owl2json-hyperschema.js seems tldr; ;)


Am Freitag, 16. Januar 2015 23:26:08 UTC+1 schrieb Austin Wright:
Can you explain a bit on what it means to "convert" OWL to JSON Schema?
It means "let us do the best we can" to create a canonical JSON representation of XML ontologies.
For example Heroku is building their APIs with JSON Schema (the engineer has an article).
It would be nice to just say that for instance the heroku account owner "person" is the same than a "dbpedia person" and to already know what properties "person" has 
because we are just referencing that JSON Schema...
 
OWL is an entirely different beast; it tells you what data means and what data you can infer from the data (e.g. if _:todd is a Ford and Ford is a kind of car, then _:todd is a car). In some cases, you can determine that data is internally inconsistent (e.g. if _:todd is female, and female is a kind of human, WAIT STOP that's impossible, something can't be both a car and a human), but this is different than JSON Schema which declares restrictions on the range of values for instances.
As I wrote in the github readme :
"It is planned to support several (yet inofficial) proposals for JSON Schema v5 draft which close gaps between OWL and XML Schema. For example 
  • translations (for xml:lang) 
  • $data (data 'dependent')
  • propertyLinks (description of parent-child relationship)

These proposals are linked in the readme.
If we look at the OWL specification (http://www.w3.org/TR/owl-ref/) and the XML Schema specification (http://www.w3.org/TR/xmlschema-1/ and http://www.w3.org/TR/xmlschema-2/) : 
Which chapters can't be mapped to hyperschema ?

 

Unless we're talking about JSON Hyper-schema by extracting link relations from JSON instances, and using OWL to make assertions about what our JSON instance means from the declared link relations.
see above 
 
Also, I don't think I've ever actually seen OWL's XML syntax used in production (I know it's mandatory, but what does that actually mean to most systems...). I prefer a simple graph, serialize to Turtle if that's necessary.
wikipedia foundation and some other big players are using it. However: We can convert e.g. Turtle to XML (?) 

Sebastian Lasse

unread,
Jan 18, 2015, 7:12:32 AM1/18/15
to json-...@googlegroups.com
Forgot to mention the "switch" proposal. Additionally added to readme:
So whenever the documentation refers to "JSON Schema" it means :
"JSON Schema and hyperschema - including the above mentioned inofficial proposals".

Sebastian Lasse

unread,
Feb 3, 2015, 6:08:07 AM2/3/15
to json-...@googlegroups.com
because there are a few constraints in OWL which can't be declared by the current JSON Schema spec., I think.
I pushed some updates to github ( https://github.com/redaktor/owl2jsonschema.js ).

Question:

Currently I am thinking about the "4. 4  Logical characteristics of properties" -
They describe special linking of properties and I thought the v5 proposal https://github.com/json-schema/json-schema/wiki/propertyLinks-(v5-proposal)
could fit: "allow description of parent-child relationship"

OWL:
http://www.w3.org/2002/07/owl#TransitiveProperty says a parent-child relationship is transitive (e.g. subregionOf) -
"that if a pair (x,y) is an instance of P, and the pair (y,z) is also instance of P, then we can infer the the pair (x,z) is also an instance of P"
and
http://www.w3.org/2002/07/owl#SymmetricProperty says it is symmetric (e.g. friendOf) -
"a property for which holds that if the pair (x,y) is an instance of P, then the pair (y,x) is also an instance of P"

In OWL theory a property link can be both, Transitive AND Symmetric. I found an example in 

        <rdf:type rdf:resource="owl:SymmetricProperty"/>
        <rdf:type rdf:resource="owl:TransitiveProperty"/>
        <rdfs:label>associatedWith</rdfs:label>
        <rdfs:comment rdf:datatype="xsd:string">A catch-all object property, useful for alignment and querying purposes.</rdfs:comment>
        <rdfs:isDefinedBy rdf:resource="http://www.ontologydesignpatterns.org/ont/dul/DUL.owl"/>
        <rdfs:range rdf:resource="owl:Thing"/>
        <rdfs:domain rdf:resource="owl:Thing"/>
    </owl:ObjectProperty>


JSON Schema:
The "propertyLinks" proposal allows only one ref per property.
So: How could we say that a property has both refs, ...#TransitiveProperty and ...#SymmetricProperty ?

Guilherme Baesso

unread,
Nov 21, 2017, 8:26:05 AM11/21/17
to JSON Schema
Hi Sebastian,

I want to build a new ontology based on an existing schema. Is there a way to convert a JSON schema to a basic OWL structure?

Thanks in advance!

Regards,
GB

Greg Trzeciak

unread,
Jul 9, 2018, 6:36:44 AM7/9/18
to JSON Schema
Hi Guilherme 

Have you found a way to do JSON Schema to OWL conversion?

Regards

Greg

Angelo Frozza

unread,
Oct 14, 2019, 10:03:51 AM10/14/19
to JSON Schema
Hi guys,

Does anyone have a solution to convert JSON Schema to OWL?

I am working on rules to convert a JSON Schema to OWL, but my difficulty currently is how to map an array to OWL.

Best regards,

Angelo
Reply all
Reply to author
Forward
0 new messages