Skip to content

Instantly share code, notes, and snippets.

@sgharms
Forked from stain/vocabulary-jsonld.json
Created October 3, 2018 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgharms/0e91486166632d2a356fb2a999874a63 to your computer and use it in GitHub Desktop.
Save sgharms/0e91486166632d2a356fb2a999874a63 to your computer and use it in GitHub Desktop.
Example of how a simple OWL ontology / RDFS vocabulary could be defined with JSON-LD, defining the meaning of properties and classes. The second file shows the RDF triples of the vocabulary by using the JSON-LD sandbox. As a visualization - see http://www.essepuntato.it/lode/owlapi/https://gist.github.com/stain/7690362/raw/114f836a64291a3f894c44…
{ "@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#",
"express": "http://example.com/express#",
"defines": {
"@reverse": "rdfs:isDefinedBy"
},
"propertyOf": {
"@id": "rdfs:domain",
"@type": "@id"
},
"propertyOn": {
"@id": "rdfs:range",
"@type": "@id"
}
},
"@id": "express:",
"@type": "owl:Ontology",
"defines": [
{ "@id": "express:send",
"@type": "owl:ObjectProperty",
"rdfs:label": "Send to",
"rdfs:comment": "Send very very fast to the specified company",
"propertyOf": "express:Product",
"propertyOn": "express:Company"
},
{ "@id": "express:receive",
"@type": "owl:ObjectProperty",
"rdfs:label": "Receive product",
"rdfs:comment": "Receive the specified product very very fast",
"propertyOf": "express:Company",
"propertyOn": "express:Product"
},
{ "@id": "express:Company",
"@type": "owl:Class",
"rdfs:label": "Company",
"rdfs:comment": "A company or organization that might order products"
},
{ "@id": "express:Product",
"@type": "owl:Class",
"rdfs:label": "Product",
"rdfs:comment": "A product that may be sent to a company"
}
]
}
<http://example.com/express#> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .
<http://example.com/express#Company> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
<http://example.com/express#Company> <http://www.w3.org/2000/01/rdf-schema#comment> "A company or organization that might order products" .
<http://example.com/express#Company> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://example.com/express#> .
<http://example.com/express#Company> <http://www.w3.org/2000/01/rdf-schema#label> "Company" .
<http://example.com/express#Product> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
<http://example.com/express#Product> <http://www.w3.org/2000/01/rdf-schema#comment> "A product that may be sent to a company" .
<http://example.com/express#Product> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://example.com/express#> .
<http://example.com/express#Product> <http://www.w3.org/2000/01/rdf-schema#label> "Product" .
<http://example.com/express#receive> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
<http://example.com/express#receive> <http://www.w3.org/2000/01/rdf-schema#comment> "Receive the specified product very very fast" .
<http://example.com/express#receive> <http://www.w3.org/2000/01/rdf-schema#domain> <http://example.com/express#Company> .
<http://example.com/express#receive> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://example.com/express#> .
<http://example.com/express#receive> <http://www.w3.org/2000/01/rdf-schema#label> "Receive product" .
<http://example.com/express#receive> <http://www.w3.org/2000/01/rdf-schema#range> <http://example.com/express#Product> .
<http://example.com/express#send> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#ObjectProperty> .
<http://example.com/express#send> <http://www.w3.org/2000/01/rdf-schema#comment> "Send very very fast to the specified company" .
<http://example.com/express#send> <http://www.w3.org/2000/01/rdf-schema#domain> <http://example.com/express#Product> .
<http://example.com/express#send> <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <http://example.com/express#> .
<http://example.com/express#send> <http://www.w3.org/2000/01/rdf-schema#label> "Send to" .
<http://example.com/express#send> <http://www.w3.org/2000/01/rdf-schema#range> <http://example.com/express#Company> .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment