-
Notifications
You must be signed in to change notification settings - Fork 159
Description
As discussed for #182, we split out the dataset examples, based on the decision to have the default graph be used for consumers expressing a graph. This implies that uses of datasets for describing provenance information would better store such information in a named graph, and assert information against the default graph, rather than the other way around. For example, Example 50 in the syntax spec includes the following:
{
"@context": {
"generatedAt": "http://www.w3.org/ns/prov#generatedAtTime",
"Person": "http://xmlns.com/foaf/0.1/Person",
"name": "http://xmlns.com/foaf/0.1/name",
"knows": "http://xmlns.com/foaf/0.1/knows",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@id": "http://example.org/graphs/73",
"generatedAt": { "@value": "2012-04-09", "@type": "xsd:date" },
"@graph":
[
{
"@id": "http://manu.sporny.org/i/public",
"@type": "Person",
"name": "Manu Sporny",
"knows": "http://greggkellogg.net/foaf#me"
},
{
"@id": "http://greggkellogg.net/foaf#me",
"@type": "Person",
"name": "Gregg Kellogg",
"knows": "http://manu.sporny.org/i/public"
}
]
}
As this asserts information in a named graph, and the describes how metadata about that (generatedAt) in the default graph, this would not be appropriate to use when expecting a graph rather than a dataset, as only the <http://example.org/graphs/73> generatedAt "2012-04-09"^^xsd:date
would result, when that's clearly not the intention.
It's not up to this group to describe how to use datasets to describe document provenance, but it makes sense that our examples are in line with the expected behavior. As an alternative, consider the following statement of this example:
{
"@context": {
"generatedAt": "http://www.w3.org/ns/prov#generatedAtTime",
"Person": "http://xmlns.com/foaf/0.1/Person",
"name": "http://xmlns.com/foaf/0.1/name",
"knows": "http://xmlns.com/foaf/0.1/knows",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@graph": [
{
"@id": "http://manu.sporny.org/i/public",
"@type": "Person",
"name": "Manu Sporny",
"knows": "http://greggkellogg.net/foaf#me"
},
{
"@id": "http://greggkellogg.net/foaf#me",
"@type": "Person",
"name": "Gregg Kellogg",
"knows": "http://manu.sporny.org/i/public"
},
{
"@id": "",
"@graph": {
"@id": "",
"generatedAt": { "@value": "2012-04-09", "@type": "xsd:date" }
}
}
]
}
This states the same information, but does so using the default graph for the data. The provenance information is in a graph named the same as the document location. Basically, in TriG, this would like like the following:
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
{
<http://greggkellogg.net/foaf#me> a foaf:Person:;
foaf:knows: "http://manu.sporny.org/i/public";
foaf:name: "Gregg Kellogg" .
<http://manu.sporny.org/i/public> a foaf:Person:;
foaf:knows: "http://greggkellogg.net/foaf#me";
foaf:name: "Manu Sporny" .
}
<> {
<> prov:generatedAt "2012-04-09"^^xsd:date .
}
It's likely that more triples would be needed to locate the provenance information, and type it as such, but that's consistent with the existing example.