Primer edits from Ivan comments. Added separate files containing primer example data.
authorSimon Miles <simon.miles@kcl.ac.uk>
Sun, 28 Oct 2012 15:59:41 +0000
changeset 4575 d64d62d27cdf
parent 4574 2edbe20885c1
child 4576 af2d939b4df4
Primer edits from Ivan comments. Added separate files containing primer example data.
primer/Primer.html
primer/primer-provn-examples.txt
primer/primer-turtle-examples.txt
--- a/primer/Primer.html	Fri Oct 26 14:47:29 2012 -0400
+++ b/primer/Primer.html	Sun Oct 28 15:59:41 2012 +0000
@@ -679,6 +679,10 @@
   used(ex:compose, ex:regionList, -)
   wasGeneratedBy(ex:composition, ex:compose, -)
     </pre>
+    <p>Note that the - argument in the examples above denote unspecified optional
+     information. See the [[PROV-N]] specification for the details of what arguments
+     may be expressed in each PROV-N statement.
+    </p>
    </div>
    <p>
     Similarly, the chart graphic creation activity (<code>ex:illustrate</code>)
@@ -972,7 +976,8 @@
     Derek notices that there is a new dataset available and creates a new chart based on the revised data, 
     using another compilation activity. Betty checks the article again at a
     later point, and wants to know if it is based on the old or new GovData.
-    She sees a new description stating that the new chart is derived from the new dataset.
+    She sees a new description stating that the new chart is derived from the new dataset
+    (the same relation could be expressed between the old chart and old dataset).
    </p>
    <div class="turtle example">
     <div class="exampleheader">
@@ -1238,6 +1243,7 @@
   <ul>
    <li>Corrected mailing list address for public comments.</li>
    <li>Fixed the status to clarify this is a note, not a recommendation.</li>
+   <li>Added note explaining unspecified arguments in PROV-N statements.</li>
    <li>Fixed minor typos.</li>
   </ul>
  </section>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/primer/primer-provn-examples.txt	Sun Oct 28 15:59:41 2012 +0000
@@ -0,0 +1,84 @@
+prefix prov <http://www.w3.org/ns/prov#>
+prefix ex <http://www.example.org#>
+prefix dc <http://purl.org/dc/elements/1.1/>
+prefix foaf <http://xmlns.com/foaf/0.1/>
+
+// The examples below are taken from, and follow the same order
+// as in, the W3C PROV Primer, http://www.w3.org/TR/prov-primer/
+
+// Entities
+
+entity(ex:article, [dcterms:title='Crime rises in cities'])
+entity(ex:dataSet1)
+entity(ex:regionList)
+entity(ex:composition)
+entity(ex:chart1)
+    
+// Activities
+
+activity(ex:compile)
+activity(ex:compose)
+activity(ex:illustrate)
+    
+// Usage and Generation
+
+used(ex:compose, ex:dataSet1, -)
+used(ex:compose, ex:regionList, -)
+wasGeneratedBy(ex:composition, ex:compose, -)
+used(ex:illustrate, ex:composition, -)
+wasGeneratedBy(ex:chart1, ex:illustrate, -)
+    
+// Agents and Responsibility
+
+wasAssociatedWith(ex:compose, ex:derek, -)
+wasAssociatedWith(ex:illustrate, ex:derek, -)
+agent(ex:derek,
+      [prov:type='prov:Person', foaf:givenName='Derek', 
+       foaf:mbox='<mailto:derek@example.org>'])
+    
+agent(ex:chartgen,
+      [prov:type='prov:Organization',
+       foaf:name = 'Chart Generators Inc'])
+actedOnBehalfOf(ex:derek, ex:chartgen, ex:compose)
+    
+wasAttributedTo(ex:chart1, ex:derek)
+    
+// Roles
+
+used(ex:compose, ex:dataSet1, -, [prov:role='ex:dataToCompose'])
+used(ex:compose, ex:regionList, -, [prov:role='ex:regionsToAggregateBy'])
+wasAssociatedWith(ex:compose, ex:derek, -, [prov:role='ex:analyst'])
+wasGeneratedBy(ex:composition, ex:compose, -, [prov:role='ex:composedData'])
+
+// Derivation and Revision
+
+entity(ex:dataSet2)
+wasDerivedFrom(ex:dataSet2, ex:dataSet1, [prov:type='prov:Revision'])
+wasDerivedFrom(ex:chart2, ex:dataSet2)
+entity(ex:chart2)
+wasDerivedFrom(ex:chart2, ex:chart1, [prov:type='prov:Revision'])
+    
+// Plans
+
+activity(ex:correct)
+agent(ex:edith, [prov:type='prov:Person'])
+entity(ex:instructions)
+wasAssociatedWith(ex:correct, ex:edith, ex:instructions)
+wasGeneratedBy(ex:dataSet2, ex:correct, -)
+    
+// Time
+
+wasGeneratedBy(ex:chart1, ex:compile,  2012-03-02T10:30:00)
+wasGeneratedBy(ex:chart2, ex:compile2, 2012-04-01T15:21:00)
+activity(ex:correct, 2012-03-31T09:21:00, 2012-04-01T15:21:00)
+    
+// Alternate Entities and Specialization
+
+entity(ex:blogEntry)
+wasDerivedFrom(ex:blogEntry, ex:article, [prov:type='prov:Quotation'])
+    
+entity(ex:articleV1)
+specializationOf(ex:articleV1, ex:article)    
+specializationOf(ex:articleV2, ex:article)
+alternateOf(ex:articleV2, ex:articleV1)
+    
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/primer/primer-turtle-examples.txt	Sun Oct 28 15:59:41 2012 +0000
@@ -0,0 +1,113 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix ex: <http://www.example.org#> .
+@prefix dc: <http://purl.org/dc/elements/1.1/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+
+# The examples below are taken from, and follow the same order
+# as in the W3C PROV Primer, http://www.w3.org/TR/prov-primer/
+
+# Entities
+
+ex:article     a prov:Entity ;
+               dcterms:title "Crime rises in cities" .
+ex:dataset1    a prov:Entity .
+ex:regionList  a prov:Entity .
+ex:composition a prov:Entity .
+ex:chart1      a prov:Entity .
+
+# Activities
+
+ex:compile    a prov:Activity .
+ex:compose    a prov:Activity .
+ex:illustrate a prov:Activity .
+
+# Usage and Generation
+
+ex:compose      prov:used           ex:dataSet1 ;
+                prov:used           ex:regionList .
+ex:composition  prov:wasGeneratedBy ex:compose .
+ex:illustrate   prov:used           ex:composition .
+ex:chart1       prov:wasGeneratedBy ex:illustrate .
+
+# Agents and Responsibility
+
+ex:compose    prov:wasAssociatedWith ex:derek .
+ex:illustrate prov:wasAssociatedWith ex:derek .
+ex:derek a prov:Agent ;
+         a prov:Person ;
+         foaf:givenName "Derek"^^xsd:string ;
+         foaf:mbox      <mailto:derek@example.org> .
+ex:derek prov:actedOnBehalfOf ex:chartgen .
+ex:chartgen a prov:Agent ;
+            a prov:Organization ;
+            foaf:name "Chart Generators Inc" .
+ex:chart1 prov:wasAttributedTo ex:derek .
+
+# Roles
+    
+ex:dataToCompose        a prov:Role .
+ex:regionsToAggregateBy a prov:Role .
+ex:composedData         a prov:Role .
+ex:analyst              a prov:Role .
+ex:compose prov:qualifiedUsage [
+           a prov:Usage ;
+           prov:entity  ex:dataSet1 ;
+           prov:hadRole ex:dataToCompose 
+] .    
+ex:compose prov:qualifiedUsage [
+           a prov:Usage ;
+           prov:entity  ex:regionList ;
+           prov:hadRole ex:regionsToAggregateBy
+] .
+ex:compose prov:qualifiedAssociation [
+           a prov:Association ;
+           prov:agent    ex:derek ;
+           prov:hadRole  ex:analyst
+] .
+ex:composition prov:qualifiedGeneration [
+               a prov:Generation ;
+               prov:activity  ex:compose ;
+               prov:hadRole   ex:composedData
+] .
+
+# Revision and Derivation
+
+ex:dataSet2 a prov:Entity ;
+            prov:wasRevisionOf ex:dataSet1 .
+ex:chart2 a prov:Entity ;
+          prov:wasDerivedFrom ex:dataSet2 .
+ex:chart2 a prov:Entity ;
+          prov:wasRevisionOf ex:chart1 .
+    
+# Plans
+
+ex:correct      a prov:Activity .
+ex:edith        a prov:Agent, prov:Person .
+ex:instructions a prov:Plan .
+    
+ex:correct prov:qualifiedAssociation [
+           a Association ;
+           prov:agent   ex:edith ;
+           prov:hadPlan ex:instructions
+] .
+ex:dataSet2 prov:wasGeneratedBy ex:correct .
+    
+# Time
+
+ex:chart1 prov:generatedAtTime "2012-03-02T10:30:00"^^xsd:dateTime .
+ex:chart2 prov:generatedAtTime "2012-04-01T15:21:00"^^xsd:dateTime .
+    
+ex:correct prov:startedAtTime "2012-03-31T09:21:00"^^xsd:dateTime ;
+           prov:endedAtTime   "2012-04-01T15:21:00"^^xsd:dateTime .
+    
+# Alternate Entities and Specialization
+
+ex:blogEntry a prov:Entity ;
+             prov:wasQuotedFrom ex:article .
+
+ex:articleV1 a prov:Entity ;
+             prov:specializationOf ex:article .
+    
+ex:articleV2 prov:specializationOf ex:article .
+ex:articleV2 prov:alternateOf      ex:articleV1 .
\ No newline at end of file