- From: Gregg Kellogg <gregg@kellogg-assoc.com>
- Date: Thu, 12 Apr 2012 13:59:14 -0400
- To: "public-rdf-comments@w3.org" <public-rdf-comments@w3.org>
I think this is interesting to this group, as it bears on your Named Graph use cases, and shows progress in JSON-LD for support of named graphs.
Gregg
Begin forwarded message:
> From: Gregg Kellogg <gregg@kellogg-assoc.com>
> Subject: JSON-LD Provenance use case
> Date: April 12, 2012 10:44:28 AM PDT
> To: "Wikidata-l@lists.wikimedia.org" <Wikidata-l@lists.wikimedia.org>
>
> I updated the JSON Talk page [1] with an example of using the JSON-LD named-graph syntax to express provenance information about some facts, based on a discussion of the use case in the W3C RDF Working Group [2] trying to express the following:
>
> ParisFact1 expresses "Paris locatedIn France ."
> ParisFact1 hasReference EncyclopediaBritannica, Wikipedia, Brockhaus.
> ParisFact2 Paris hasPopulation 7000000^^int
> ParisFact2 hasReference Wikipedia
>
> The JSON-LD looks like the following:
>
> {
> "@context": {
> "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
> "ex": "http://example.org/",
> "xsd": "http://www.w3.org/2001/XMLSchema#",
> "ex:locatedIn": {"@type": "@id"},
> "ex:hasPopulaton": {"@type": "xsd:integer"},
> "ex:hasReference": {"@type": "@id"}
> },
> "@graph": [
> {
> "@id": "http://example.org/ParisFact1",
> "@type": "rdf:Graph",
> "@graph": {
> "@id": "http://example.org/location/Paris#this",
> "ex:locatedIn": "http://example.org/location/France#this"
> },
> "ex:hasReference": ["http://www.britannica.com/", "http://www.wikipedia.org/", "http://www.brockhaus.de/"]
> },
> {
> "@id": "http://example.org/ParisFact2",
> "@type": "rdf:Graph",
> "@graph": {
> "@id": "http://example.org/location/Paris#this",
> "ex:hasPopulation": 7000000
> },
> "ex:hasReference": "http://www.wikipedia.org/"
> }
> ]
> }
>
> Which could be expressed in TriG as:
>
> @prefix ex: <http://example.org/> .
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
> {
> ex:ParisFact1 a rdf:Graph;
> ex:hasReference <http://www.britannica.com/>,
> <http://www.wikipedia.org/>,
> <http://www.brockhaus.de/> .
> ex:ParisFact2 a rdf:Graph;
> ex:hasReference <http://www.wikipedia.org/> .
> }
> ex:ParisFact1 {
> <http://example.org/location/Paris#this> ex:locatedIn <http://example.org/location/France#this> .
> }
> ex:ParisFact2 {
> <http://example.org/location/Paris#this> ex:hasPopulation 7000000 .
> }
>
> Note that JSON-LD recently added support for named graphs [3].
>
> Gregg
>
> [1] http://meta.wikimedia.org/wiki/Talk:Wikidata/Data_model/JSON
> [2] http://www.w3.org/2011/rdf-wg/wiki/TF-Graphs-UC#.28C_priority.29_Wikidata
> [3] http://json-ld.org/spec/latest/json-ld-syntax/#named-graphs
>
> Gregg
>
Received on Thursday, 12 April 2012 18:01:08 UTC