Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
###
#
# Complete PROV-O primer example,
# as shown in http://www.w3.org/TR/prov-primer/images/everything.png
# (some prefixes are different)
#
# See Section 3.10 of http://www.w3.org/TR/prov-primer/
#
base_url "http://example.org"
dct = vocabulary "http://purl.org/dc/terms/"
prov = vocabulary "http://www.w3.org/ns/prov#"
###
# Entities
###
entity :dataSet1
entity :regionList
entity :composition1
entity :chart1 do
attributed_to :derek
has prov.generatedAtTime, "2012-03-02T10:30:00"
end
entity :dataSet2 do
has prov.wasRevisionOf, :dataSet1
end
entity :chart2 do
derived_from :dataSet2
has prov.wasRevisionOf, :chart1
end
entity :article do
has dct.title, "Crime rises in cities"
end
entity :articleV1 do
has prov.specializationOf, :article
end
entity :articleV2 do
has prov.specializationOf, :article
has prov.alternateOf, :articleV1
end
entity :quoteInBlogEntry20130326 do
subject "http://example.com/blog_entry"
has prov.wasQuotedFrom, :article
end
###
# Agents
###
agent :edith, type: "person"
organization :chartgen, name: "Chart Generators Inc"
agent :derek do
name "Derek"
on_behalf_of :chartgen
end
###
# Activities
###
activity :illustrate1 do
generated :chart1
associated_with :derek
used :composition1
end
activity :compose1 do
generated :composition1
associated_with do
agent :derek
role :analyst
end
used do
entity :regionList
role :regionsToAggregateBy
end
used do
entity :dataSet1
role :dataToCompose
end
end
activity :correct1 do
generated :dataSet2
used :dataSet1
associated_with do
agent :edith
plan :instructions
end
has prov.startedAtTime, "2012-03-31T09:21:00"
has prov.endedAtTime, "2012-04-01T15:21:00"
end
activity :compile1 do
generated :chart1
used :dataSet1
end
activity :compile2 do
generated :chart2
used :dataSet2
end
generate_n3 true
entity:dataSet1 a prov:Entity ;
rdfs:label "dataSet1" .
entity:regionList a prov:Entity ;
rdfs:label "regionList" .
entity:composition1 a prov:Entity ;
rdfs:label "composition1" .
entity:chart1 a prov:Entity ;
prov:wasAttributedTo agent:derek ;
prov:generatedAtTime "2012-03-02T10:30:00" ;
rdfs:label "chart1" .
entity:dataSet2 a prov:Entity ;
prov:wasRevisionOf entity:dataSet1 ;
rdfs:label "dataSet2" .
entity:chart2 a prov:Entity ;
prov:wasDerivedFrom entity:dataSet2 ;
prov:wasRevisionOf entity:chart1 ;
rdfs:label "chart2" .
entity:article a prov:Entity ;
<http://purl.org/dc/terms/title> "Crime rises in cities" ;
rdfs:label "article" .
entity:articleV1 a prov:Entity ;
prov:specializationOf entity:article ;
rdfs:label "articleV1" .
entity:articleV2 a prov:Entity ;
prov:specializationOf entity:article ;
prov:alternateOf entity:articleV1 ;
rdfs:label "articleV2" .
<http://example.com/blog_entry> a prov:Entity ;
prov:wasQuotedFrom entity:article ;
rdfs:label "quoteInBlogEntry20130326" .
agent:edith a prov:Person ;
rdfs:label "edith" .
agent:chartgen a prov:Organization ;
foaf:name "Chart Generators Inc" ;
rdfs:label "chartgen" .
agent:derek a prov:Agent ;
foaf:name "Derek" ;
prov:actedOnBehalfOf agent:chartgen ;
rdfs:label "derek" .
activity:illustrate1 a prov:Activity ;
prov:generated entity:chart1 ;
prov:used entity:composition1 ;
prov:wasAssociatedWith agent:derek ;
rdfs:label "illustrate1" .
activity:compose1 a prov:Activity ;
prov:generated entity:composition1 ;
prov:used entity:regionList ;
prov:qualifiedUsage usage:csjc7s ;
prov:used entity:dataSet1 ;
prov:qualifiedUsage usage:csk9vf ;
prov:wasAssociatedWith agent:derek ;
prov:qualifiedAssociation assoc:csl62l ;
rdfs:label "compose1" .
activity:correct1 a prov:Activity ;
prov:generated entity:dataSet2 ;
prov:used entity:dataSet1 ;
prov:wasAssociatedWith agent:edith ;
prov:qualifiedAssociation assoc:csmoqf ;
prov:startedAtTime "2012-03-31T09:21:00" ;
prov:endedAtTime "2012-04-01T15:21:00" ;
rdfs:label "correct1" .
activity:compile1 a prov:Activity ;
prov:generated entity:chart1 ;
prov:used entity:dataSet1 ;
rdfs:label "compile1" .
activity:compile2 a prov:Activity ;
prov:generated entity:chart2 ;
prov:used entity:dataSet2 ;
rdfs:label "compile2" .
plan:instructions a prov:Plan ;
rdfs:label "instructions" .
assoc:csmoqf a prov:Association ;
prov:agent agent:edith ;
prov:hadPlan plan:instructions .
usage:csk9vf a prov:Usage ;
prov:entity entity:dataSet1 ;
prov:hadRole role:dataToCompose .
role:analyst a prov:Role ;
rdfs:label "analyst" .
role:regionsToAggregateBy a prov:Role ;
rdfs:label "regionsToAggregateBy" .
role:dataToCompose a prov:Role ;
rdfs:label "dataToCompose" .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment