[ckan-discuss] Linked Data and the DataHub (and CKAN generally) DataStore(s)
Rufus Pollock
rufus.pollock at okfn.org
Mon May 7 23:58:49 BST 2012
Just realized that somehow I failed to cc ckan-discuss on this when I
send this week before last!
---------- Forwarded message ----------
From: Rufus Pollock <rufus.pollock at okfn.org>
Date: 25 April 2012 02:26
Subject: Linked Data and the DataHub (and CKAN generally) DataStore(s)
I'm writing this especially for the attention of linked data folks :-)
With the new DataStore we are able to store JSON objects very easily.
I was wondering if combining this with JSON-LD would mean we could
store linked data in a decent manner.
You wouldn't be able to do SPARQL of course but you could still do
pretty useful qureying and you'd have native RESTful JSON which would
be good for people using linked data in web apps etc.
Below I give a concrete example ...
Rufus
### Example
The following n3 for a dcat:Dataset:
:dataset/001
a dcat:Dataset ;
dct:title "Imaginary dataset" ;
dcat:keyword "accountability","transparency" ,"payments" ;
dcat:theme :themes/accountability ;
dct:issued "2011-12-05"^^xsd:date ;
dct:publisher :agency/finance-ministry ;
dct:accrualPeriodicity "every six months" ;
dct:language "en"^^xsd:language ;
dcat:Distribution :dataset/001/csv ;
.
Would become:
{
# The context (RDF schema for this object)
# Would normally be stored on the web somewhere (cf
http://json-ld.org/spec/latest/json-ld-syntax/#external-contexts)
# Could be a separate Resource in the DataHub called e.g
"jsonld-context":
http://datahub.io/api/data/{resource-id-for-context}/{id}
"@context": url-to-somewhere-on-web-with-context
"@id": ".../dataset/001",
"@type": "dcat:Dataset",
"title": "Imaginary Dataset"
"keyword": ....
"theme": ....
}
We'd put this in a datastore table e.g.
curl -X PUT http://datahub.io/api/data/{resource-id}/{id-for-this-object}
-d {JSON-Object}
And the context would be ...
{
"@context":
{
"dcat": dcat-uri ..
"dc": dc-uri
"title": "dc:title"
"keyword": "dcat:keyword ..."
"theme": ...
"...."
}
--
Co-Founder, Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/
More information about the ckan-discuss
mailing list