--- a/primer/Primer.html Thu Nov 17 12:46:26 2011 +0000
+++ b/primer/Primer.html Thu Nov 17 13:44:17 2011 +0000
@@ -836,6 +836,110 @@
<section class="appendix">
<h2>Abstract Syntax Notation for Examples</h2>
+ <p>
+ Below we give translations of the working example snippets into the PROV-DM
+ abstract syntax notation (ASN).
+ </p>
+ <section>
+ <h3>Entities</h3>
+ <pre class="example asn">
+ entity(ex1:dataSet1).
+ entity(ex1:regionList1).
+ entity(ex1:aggregate1).
+ entity(ex1:chart1).
+ </pre>
+ </section>
+
+ <section>
+ <h3>Activities</h3>
+ <pre class="example asn">
+ processExecution(ex1:compiled,compilation_step).
+ processExecution(ex1:aggregated).
+ processExecution(ex1:illustrated).
+ </pre>
+ <p>
+ In the first assertion above, 'compilation_step' is an optional reference to the 'recipe' that describes
+ what the 'compiled' activity did. The interpretation of its name,
+ 'compilation_step', is left to applications (it is not further resolved within PROV-DM).
+ </p>
+ <p>
+ In the second assertion, optional 'recipe' has been omitted.
+ </p>
+ <!--PM comment: here readers will be confused by the processExecutiion / activity disconnect!
+ also this does not show start/end times, optional attributes. At least one example would be useful-->
+ </section>
+
+ <section>
+ <h3>Use and Generation</h3>
+ <pre class="example asn">
+ used(ex1:aggregated, ex1:dataSet1).
+ used(ex1:aggregated, ex1:regionList1).
+ wasGeneratedBy(ex1:aggregate1, ex1:aggregated).
+
+ used(ex1:illustrated, ex1:aggregate1).
+ wasGeneratedBy(ex1:chart1, ex1:illustrated).
+ </pre>
+ </section>
+
+ <section>
+ <h3>Agents</h3>
+ <pre class="example asn">
+ entity(ex1:derek, [ type="foaf:Person", foaf:givenName = "Derek",
+ foaf:mbox= "<mailto:derek@example.org>"]).
+ agent(ex1:derek).
+
+ wasControlledBy(ex1:aggregated, ex1:derek).
+ wasControlledBy(ex1:illustrated, ex1:derek).
+ </pre>
+ </section>
+
+ <section>
+ <h3>Roles</h3>
+ <p>
+ Roles are not declared directly in PROV-DM, rather they are attributes of
+ relations. Thus, the entire Turtle example in sec. 3.5 is rendered as follows:
+ </p>
+ <pre class="example asn">
+ used(ex1:aggregated, ex1:dataSet1, [ prov:role = "dataToAggregate"]).
+ used(ex1:aggregated, ex1:regionList1, [ prov:role = "regionsToAggregteBy"]).
+ </pre>
+ <p>
+ In the first assertion above, note that this adds a "role" attribute to the first 'used' assertion of Ex. 3.
+ Similarly in the second assertion, we have added a "role" attribute to the second 'used' assertion of Ex. 3.
+ </p>
+ </section>
+
+ <section>
+ <h3>Revision</h3>
+ <pre class="example asn">
+ wasRevisionOf(ex1:dataSet2, ex1:dataSet1).
+ </pre>
+ </section>
+
+ <section>
+ <h3>Complementarity</h3>
+ <pre class="example asn">
+ entity(ex1:dataSet, [ type="ex1:DataSet", ex1:regions ="(ex1:North, ex1:NorthWest, ex1:East)",
+ dc:creator="ex1:DataGov", dc:title="Regional incidence dataset 2011" ]).
+
+ wasComplementOf(dataSet1, dataSet).
+ wasComplementOf(dataSet2, dataSet).
+
+ entity(ex1:dataSet1, [ type="ex1:DataSet", ex1:postCodes="( 'N1', 'N2', 'NW1', 'E1', 'E2' ) ",
+ ex1:totalIncidents = "141", dc:creator = " ex1:DataGov",
+ dc:title = "Regional incidence dataset 2011" ]).
+ </pre>
+ </section>
+
+ <section>
+ <h3>Derivation</h3>
+ <pre class="example asn">
+ dependedOn(ex1:chart2, ex1:dataSet2).
+ wasEventuallyDerivedFrom(ex1:chart2, ex1:dataSet2).
+ wasDerivedFrom(ex1:chart2, ex1:dataSet2).
+ wasGeneratedBy(ex1:chart2, ex1:compiled2).
+ </pre>
+ </section>
</section>
<section class="appendix">