--- a/primer/Primer.html Fri Nov 02 16:44:17 2012 +0000
+++ b/primer/Primer.html Sat Nov 03 12:29:08 2012 +0000
@@ -535,6 +535,19 @@
set_display_by_class('div','provn example','');
set_display_by_id('hide-provn-examples','');
set_display_by_id('show-provn-examples','none');" />
+ <input id="hide-provxml-examples" type="button" value="Hide XML Examples"
+ onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');" />
+ <input id="show-provxml-examples" type="button" value="Show XML Examples"
+ style="display:none"
+ onclick="
+ set_display_by_class('pre','provxml example','');
+ set_display_by_class('div','provxml example','');
+ set_display_by_id('hide-provxml-examples','');
+ set_display_by_id('show-provxml-examples','none');" />
</p>
</form>
@@ -587,6 +600,25 @@
entity(ex:chart1)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:entity prov:id="ex:article">
+ <dct:title>Crime rises in cities</dct:title>
+ </prov:entity>
+ <prov:entity prov:id="ex:dataSet1"/>
+ <prov:entity prov:id="ex:regionList"/>
+ <prov:entity prov:id="ex:composition"/>
+ <prov:entity prov:id="ex:chart1"/>
+ </pre>
+ </div>
<p>
These statements, in order, refer to the article (<code>ex:article</code>),
an original data set (<code>ex:dataSet1</code>),
@@ -638,16 +670,26 @@
activity(ex:compile)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:activity prov:id="ex:compile"/>
+ <prov:activity prov:id="ex:compose"/>
+ <prov:activity prov:id="ex:illustrate"/>
+ </pre>
+ </div>
<p>
The provenance also includes reference to the more specific steps involved in this compilation,
which are first composing the data by region (<code>ex:compose</code>) and then generating the
chart graphic (<code>ex:illustrate</code>).
</p>
- <!--p>
- Further, the provenance describes the activities involved in generating chart from the data,
- first composing the data by region (<code>ex:compose</code>) and then generating the
- chart graphic (<code>ex:illustrate</code>).
- </p -->
<div class="turtle example">
<div class="exampleheader">
<span class="exampleheader"><b>Turtle Example</b>
@@ -676,6 +718,38 @@
activity(ex:illustrate)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:used>
+ <prov:activity prov:ref="ex:compose"/>
+ <prov:entity prov:ref="ex:dataset1"/>
+ </prov:used>
+ <prov:used>
+ <prov:activity prov:ref="ex:compose"/>
+ <prov:entity prov:ref="ex:regionList"/>
+ </prov:used>
+ <prov:wasGeneratedBy>
+ <prov:entity prov:ref="ex:composition"/>
+ <prov:activity prov:ref="ex:compose"/>
+ </prov:wasGeneratedBy>
+ <prov:used>
+ <prov:activity prov:ref="ex:illustrate"/>
+ <prov:entity prov:ref="ex:composition"/>
+ </prov:used>
+ <prov:wasGeneratedBy>
+ <prov:entity prov:ref="ex:chart1"/>
+ <prov:activity prov:ref="ex:illustrate"/>
+ </prov:wasGeneratedBy>
+ </pre>
+ </div>
<p>
In visualizations of the PROV data, activities are depicted as rectangles, as below.
</p>
@@ -730,6 +804,30 @@
may be expressed in each PROV-N statement.
</p>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:used>
+ <prov:activity prov:ref="ex:compose"/>
+ <prov:entity prov:ref="ex:dataset1"/>
+ </prov:used>
+ <prov:used>
+ <prov:activity prov:ref="ex:compose"/>
+ <prov:entity prov:ref="ex:regionList"/>
+ </prov:used>
+ <prov:wasGeneratedBy>
+ <prov:entity prov:ref="ex:composition"/>
+ <prov:activity prov:ref="ex:compose"/>
+ </prov:wasGeneratedBy>
+ </pre>
+ </div>
<p>
Similarly, the chart graphic creation activity (<code>ex:illustrate</code>)
used the composed data, and the chart was generated by this activity.
@@ -762,6 +860,26 @@
wasGeneratedBy(ex:chart1, ex:illustrate, -)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:used>
+ <prov:activity prov:ref="ex:illustrate"/>
+ <prov:entity prov:ref="ex:composition"/>
+ </prov:used>
+ <prov:wasGeneratedBy>
+ <prov:entity prov:ref="ex:chart1"/>
+ <prov:activity prov:ref="ex:illustrate"/>
+ </prov:wasGeneratedBy>
+ </pre>
+ </div>
<p>
In visualizing the PROV data, usage and generation are connections between
entities and activities. The arrows point from the future to the past.
@@ -805,6 +923,26 @@
wasAssociatedWith(ex:illustrate, ex:derek, -)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:wasAssociatedWith>
+ <prov:activity prov:ref="ex:compose"/>
+ <prov:agent prov:ref="ex:derek"/>
+ </prov:wasAssociatedWith>
+ <prov:wasAssociatedWith>
+ <prov:activity prov:ref="ex:illustrate"/>
+ <prov:agent prov:ref="ex:derek"/>
+ </prov:wasAssociatedWith>
+ </pre>
+ </div>
<p>
The record for Derek provides the
following description that
@@ -842,6 +980,23 @@
foaf:mbox="<mailto:derek@example.org>"])
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:agent prov:id="ex:derek">
+ <prov:type>prov:Person</prov:type>
+ <foaf:givenName>Derek</foaf:givenName>
+ <foaf:mbox>mailto:derek@example.org</foaf:mbox>
+ </prov:agent>
+ </pre>
+ </div>
<p>
Derek works as part of an organization, Chart Generators Inc, and so the provenance
declares that he acts on their behalf. Note that the organization is itself
@@ -879,6 +1034,27 @@
actedOnBehalfOf(ex:derek, ex:chartgen, ex:compose)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:agent prov:id="ex:chartgen">
+ <prov:type>prov:Organization</prov:type>
+ <foaf:name>Chart Generators Inc</foaf:name>
+ </prov:agent>
+ <prov:actedOnBehalfOf>
+ <prov:delegate prov:ref="ex:derek"/>
+ <prov:responsible prov:ref="ex:chartgen"/>
+ <prov:activity prov:ref="ex:compose"/>
+ </prov:actedOnBehalfOf>
+ </pre>
+ </div>
<p>
Finally, there is an explicit statement in the provenance that the chart was
attributed to Derek.
@@ -909,6 +1085,22 @@
wasAttributedTo(ex:chart1, ex:derek)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:wasAttributedTo>
+ <prov:entity prov:ref="ex:chart1"/>
+ <prov:agent prov:ref="ex:derek"/>
+ </prov:wasAttributedTo>
+ </pre>
+ </div>
<p>
We can extend our graphical depiction to show the agents, association and attribution links.
@@ -1015,6 +1207,23 @@
used(ex:compose, ex:dataSet1, -, [prov:role='ex:dataToCompose'])
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:used>
+ <prov:activity prov:ref="ex:compose"/>
+ <prov:entity prov:ref="ex:dataSet1"/>
+ <prov:role>ex:dataToCompose</prov:role>
+ </prov:used>
+ </pre>
+ </div>
<p>
This can then be distinguished from the same activity's usage of the list of
regions because the roles played are different.
@@ -1049,6 +1258,23 @@
used(ex:compose, ex:regionList, -, [prov:role='ex:regionsToAggregateBy'])
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:used>
+ <prov:activity prov:ref="ex:compose"/>
+ <prov:entity prov:ref="ex:regionList"/>
+ <prov:role>ex:regionsToAggregateBy</prov:role>
+ </prov:used>
+ </pre>
+ </div>
<p>
Similarly, the provenance includes descriptions that the same activity was
enacted in a particular way by Derek, so it indicates that he had the role of
@@ -1091,6 +1317,28 @@
wasGeneratedBy(ex:composition, ex:compose, -, [prov:role='ex:composedData'])
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:wasAssociatedWith>
+ <prov:activity prov:ref="ex:compose"/>
+ <prov:agent prov:ref="ex:derek"/>
+ <prov:role>ex:analyst</prov:role>
+ </prov:wasAssociatedWith>
+ <prov:wasGeneratedBy>
+ <prov:entity prov:ref="ex:composition"/>
+ <prov:activity prov:ref="ex:compose"/>
+ <prov:role>ex:composedData</prov:role>
+ </prov:wasGeneratedBy>
+ </pre>
+ </div>
<p>
Depicting the above visually, we have the following.
</p>
@@ -1138,6 +1386,24 @@
wasDerivedFrom(ex:dataSet2, ex:dataSet1, [prov:type='prov:Revision'])
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <entity prov:id="dataSet2"/>
+ <prov:wasDerivedFrom>
+ <prov:generatedEntity prov:ref="ex:dataSet2"/>
+ <prov:usedEntity prov:ref="ex:dataSet1"/>
+ <prov:type>prov:Revision</prov:type>
+ </prov:wasDerivedFrom>
+ </pre>
+ </div>
<p>
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
@@ -1172,6 +1438,22 @@
wasDerivedFrom(ex:chart2, ex:dataSet2)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:wasDerivedFrom>
+ <prov:generatedEntity prov:ref="ex:chart2"/>
+ <prov:usedEntity prov:ref="ex:dataSet2"/>
+ </prov:wasDerivedFrom>
+ </pre>
+ </div>
<p>and that the new chart is a revision of the original one:
</p>
<div class="turtle example">
@@ -1202,6 +1484,24 @@
wasDerivedFrom(ex:chart2, ex:chart1, [prov:type='prov:Revision'])
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <entity prov:id="chart2"/>
+ <prov:wasDerivedFrom>
+ <prov:generatedEntity prov:ref="ex:chart2"/>
+ <prov:usedEntity prov:ref="ex:chart1"/>
+ <prov:type>prov:Revision</prov:type>
+ </prov:wasDerivedFrom>
+ </pre>
+ </div>
<p>
Derivation and revision are connections between entities, and so depicted
with arrows in our visualization.
@@ -1250,6 +1550,22 @@
entity(ex:instructions)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:activity prov:id="ex:correct"/>
+ <prov:agent prov:id="ex:edith">
+ <prov:type>prov:Person</prov:type>
+ </prov:agent>
+ </pre>
+ </div>
<div class="turtle example">
<p>
The connection between them is expressed in PROV-O using a qualified association giving details of
@@ -1290,6 +1606,27 @@
wasGeneratedBy(ex:dataSet2, ex:correct, -)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:wasAssociatedWith>
+ <prov:activity prov:ref="ex:correct"/>
+ <prov:agent prov:ref="ex:edith"/>
+ <prov:plan>ex:instructions</prov:plan>
+ </prov:wasAssociatedWith>
+ <prov:wasGeneratedBy>
+ <prov:entity prov:ref="ex:dataSet2"/>
+ <prov:activity prov:ref="ex:correct"/>
+ </prov:wasGeneratedBy>
+ </pre>
+ </div>
<p>
Plans are additional information about the connection from an activity to
an agent, and so, in our visualization, connect to the link between them.
@@ -1335,6 +1672,26 @@
wasGeneratedBy(ex:chart2, ex:compile2, 2012-04-01T15:21:00)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:wasGeneratedBy>
+ <prov:entity prov:ref="ex:chart1"/>
+ <prov:time>2012-03-02T10:30:00</prov:time>
+ </prov:wasGeneratedBy>
+ <prov:wasGeneratedBy>
+ <prov:entity prov:ref="ex:chart2"/>
+ <prov:time>2012-04-01T15:21:00</prov:time>
+ </prov:wasGeneratedBy>
+ </pre>
+ </div>
<p>
To ensure their procedures are efficient, the agency also wish to know how long the
@@ -1370,6 +1727,22 @@
activity(ex:correct, 2012-03-31T09:21:00, 2012-04-01T15:21:00)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:activity prov:id="ex:correct">
+ <prov:startTime>2012-03-31T09:21:00</prov:startTime>
+ <prov:endTime>2012-04-01T15:21:00</prov:endTime>
+ </prov:activity>
+ </pre>
+ </div>
<p>
Time is visualized as additional information regarding activities or the
links between activities and entities or agents.
@@ -1413,6 +1786,24 @@
wasDerivedFrom(ex:blogEntry, ex:article, [prov:type='prov:Quotation'])
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:entity prov:id="ex:blogEntry"/>
+ <prov:wasDerivedFrom>
+ <prov:generatedEntity prov:ref="ex:blogEntry"/>
+ <prov:usedEntity prov:ref="ex:article"/>
+ <prov:type>prov:Quotation</prov:type>
+ </prov:wasDerivedFrom>
+ </pre>
+ </div>
<p>
The newspaper, from past experience, anticipated that there could be revisions
to the article, and so created identifiers for both the article in general
@@ -1449,6 +1840,23 @@
specializationOf(ex:articleV1, ex:article)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:entity prov:id="ex:articleV1"/>
+ <prov:specializationOf>
+ <prov:specificEntity prov:ref="ex:articleV1"/>
+ <prov:generalEntity prov:ref="ex:article"/>
+ </prov:specializationOf>
+ </pre>
+ </div>
<p>
Later, after the data set is corrected and the new chart generated, a new version
of the article is created, <code>ex:articleV2</code>, with its own URI where the article
@@ -1485,6 +1893,26 @@
alternateOf(ex:articleV2, ex:articleV1)
</pre>
</div>
+ <div class="provxml example">
+ <div class="exampleheader">
+ <span class="exampleheader"><b>XML Example</b>
+ <a onclick="
+ set_display_by_class('pre','provxml example','none');
+ set_display_by_class('div','provxml example','none');
+ set_display_by_id('hide-provxml-examples','none');
+ set_display_by_id('show-provxml-examples','');"><u><i>(hide all)</i></u></a>
+ </span></div>
+ <pre>
+ <prov:specializationOf>
+ <prov:specificEntity prov:ref="ex:articleV2"/>
+ <prov:generalEntity prov:ref="ex:article"/>
+ </prov:specializationOf>
+ <prov:alternateOf>
+ <prov:alternate1 prov:ref="ex:articleV1"/>
+ <prov:alternate2 prov:ref="ex:articleV2"/>
+ </prov:alternateOf>
+ </pre>
+ </div>
<p>
Note that above we could have also
stated that <code>ex:articleV2</code> was a revision of <code>ex:articleV1</code>,
@@ -1500,7 +1928,7 @@
<h3>Complete PROV data</h3>
<p>
The full set of examples shown above are available in <a href="primer-turtle-examples.txt">PROV-O Turtle format</a>
- or <a href="primer-provn-examples.txt">PROV-N format</a>.
+ or <a href="primer-provn-examples.txt">PROV-N format</a> or <a href="primer-prov-xml-examples.xml">PROV-XML format</a>.
We visualize the whole example below.
</p>
<img src="images/everything.png" alt="Provenance graph for whole example" width="95%"/>