- From: Lucas de Oliveira Teixeira <lucasxteixeira@gmail.com>
- Date: Mon, 1 Sep 2014 10:00:10 -0300
- To: Niklas Lindström <lindstream@gmail.com>
- Cc: Philippe Duchesne <pduchesne@gmail.com>, Vinicius Maran <viniciusmaran@gmail.com>, "public-linked-json@w3.org" <public-linked-json@w3.org>
- Message-ID: <CAHEJaJmZWbf01J+stFCG0xrSNO5QAC1w6jFTe-J2KJgPzaCTLg@mail.gmail.com>
Hi,
Serialization of OWL to JSON-LD is straightforward given that they can
represent the same things. It is just a matter of changing the pattern.
Below is a very simple example of pizza.owl in JSON-LD format. Note that, I
have just created three classes and the property disjoint.
{
"@context":
{
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"owl": "http://www.w3.org/2002/07/owl#",
"@base": "http://www.co-ode.org/ontologies/pizza/2005/10/18/pizza.owl"
},
"@graph":
[
{
"@id": "",
"rdfs:comment": "An example ontology that contains all constructs required
for the various versions of the Pizza Tutorial run by Manchester University
(see http://www.co-ode.org/resources/tutorials/)",
"owl:versionInfo": "version 1.3",
"@type": "owl:Ontology"
},
{
"@id": "#Pizza",
"owl:disjointWith":
[
{
"@id": "#PizzaBase"
},
{
"@id": "#PizzaTopping"
}
],
"rdfs:label": "Pizza",
"@type": "owl:Class"
},
{
"@id": "#PizzaBase",
"owl:disjointWith":
[
{
"@id": "#Pizza"
},
{
"@id": "#PizzaTopping"
}
],
"rdfs:label": "Pizza Base",
"@type": "owl:Class"
},
{
"@id": "#PizzaTopping",
"owl:disjointWith":
[
{
"@id": "#Pizza"
},
{
"@id": "#PizzaBase"
}
],
"rdfs:label": "Pizza Topping",
"@type": "owl:Class"
}
]
}
On Fri, Aug 29, 2014 at 6:14 AM, Niklas Lindström <lindstream@gmail.com>
wrote:
> owl:info is not a defined OWL property. You should use "@value" instead of
> "info" in your data (or alias "info" to "@value").
>
> Also, you have spaces after the prefixes in some cases (e.g. "owl:
> Ontology", "owl: versionInfo"), you should remove those. Furthermore, you
> should use "@id" instead of "rdf:about". Finally, you don't seem to use the
> defined "pizza" term – it seems that IRI should be the value of the
> Ontology "@id".
>
> Cheers,
> Niklas
>
>
>
> On Fri, Aug 29, 2014 at 9:54 AM, Philippe Duchesne <pduchesne@gmail.com>
> wrote:
>
>> You lack a definition for the info element (here assuming it is part of
>> the owl namespace) :
>> http://tinyurl.com/oswqx5n
>>
>> --p.
>>
>>
>> On Thu, Aug 28, 2014 at 4:54 PM, Vinicius Maran <viniciusmaran@gmail.com>
>> wrote:
>>
>>> Hello all,
>>> i`m starting to develop using JSON-ld, and i have a question.
>>> I`m trying to serialize owl-dl files in json-ld (i saw a related project
>>> but i want to do this for my own :P)
>>>
>>> *For example, i'm trying to serialize pizza owl ontology (only the
>>> owl-dl description of ontology, without axioms)* (
>>> http://pastebin.com/Y1hyZaJj ) :
>>>
>>> {
>>> "@context": {
>>> "pizza": {
>>> "@id": "
>>> http://130.88.198.11/co-ode-files/ontologies/pizza.owl",
>>> "@type": "@id"
>>> },
>>> "rdf": "http: //www.w3.org/1999/02/22-rdf-syntax-ns#",
>>> "xsd": "http: //www.w3.org/2001/XMLSchema#",
>>> "rdfs": "http: //www.w3.org/2000/01/rdf-schema#",
>>> "owl": "http: //www.w3.org/2002/07/owl#"
>>> },
>>> "owl: Ontology": {
>>> "rdf: about": "",
>>> "owl: versionInfo": [
>>> {
>>> "info":
>>> "v.1.4.AddedFoodclass(usedindomain/rangeofhasIngredient
>>> AddedseveralhasCountryOfOriginrestrictionsonpizzas
>>> MadehasToppinginversfunctional",
>>> "@language": "en"
>>> },
>>> {
>>> "info":
>>> "v.1.5.Removedprotege.owlimportandreferences.MadeontologyURIdate-independent",
>>> "@language": "en"
>>> }
>>> ],
>>> "rdfs:comment": {
>>> "info":
>>> "AnexampleontologythatcontainsallconstructsrequiredforthevariousversionsofthePizzaTutorialrunbyManchesterUniversity(seehttp:
>>> //www.co-ode.org/resources/tutorials/)",
>>> "@language": "en"
>>> }
>>> }
>>> }
>>>
>>> *This is valid to JSON validators, but i've tested in json-ld
>>> playground, and i got this (expanded):*
>>> [
>>> {
>>> "http: //www.w3.org/2002/07/owl# Ontology": [
>>> {
>>> "http: //www.w3.org/2002/07/owl# versionInfo": [],
>>> "http: //www.w3.org/1999/02/22-rdf-syntax-ns# about": [
>>> {
>>> "@value": ""
>>> }
>>> ]
>>> }
>>> ]
>>> }
>>> ]
>>>
>>> Anyone can help me to find why it don't show info and language
>>> information about info and language in comment and version info ?
>>>
>>> Thanks,
>>> Vinícius Maran
>>>
>>
>>
>
--
Att.
*Lucas de Oliveira Teixeira*
Received on Monday, 1 September 2014 13:45:08 UTC