--- a/dictionary/prov-dictionary.html Tue Jan 29 11:33:27 2013 +0100
+++ b/dictionary/prov-dictionary.html Tue Jan 29 13:00:11 2013 +0100
@@ -354,11 +354,11 @@
div[class="grammar"] span[class="name"]:before {
- content: "'";
+ content: '"';
}
div[class="grammar"] span[class="name"]:after {
- content: "'";
+ content: '"';
}
@@ -803,7 +803,7 @@
-->
-<p>Following the earlier definitions for generic collections, PROV-DM defines the following types related to dictionaries:</p>
+<p>Following the earlier definitions for generic collections, PROV-Dictionary defines the following types related to dictionaries:</p>
<ul>
<li> <span class="name">prov:Dictionary</span> is a subtype of <span class="name">prov:Collection</span>. It denotes an entity of type dictionary, i.e. an entity that can participate in relations that involve dictionaries and their member entities;</li>
@@ -811,11 +811,12 @@
<li><span class="name">prov:EmptyDictionary</span> is a subtype of both <span class="name">prov:EmptyCollection</span> and <span class="name">prov:Dictionary</span>. It denotes an empty dictionary.</li>
</ul>
+<p>Note that the complete content of a dictionary is unknown unless it can be traced back to an empty dictionary through a series of insertions and removals. If an asserter wants to explicitly state that a dictionary is empty, it is recommended that the <span class="name">prov:type</span> <span class="name">prov:EmptyCollection</span> is used.
<div class="anexample">
<pre class="codeexample">
entity(d0, [prov:type='prov:EmptyDictionary' ]) // d0 is an empty dictionary
-entity(d1, [prov:type='prov:Dictionary' ]) // d1 is a dictionary, with unknown content
+entity(d1, [prov:type='prov:Dictionary' ]) // d1 is a dictionary, with (so far) unknown content
</pre>
</div>
@@ -843,7 +844,7 @@
<div class="anexample">
<pre class="codeexample">
-entity(d, [prov:type='prov:Dictionary' ]) // d1 is a dictionary, with unknown content
+entity(d, [prov:type='prov:Dictionary' ]) // d1 is a dictionary, with (so far) unknown content
entity(e1)
entity(e2)
@@ -873,7 +874,7 @@
<li><span class='attribute' id="insertion.id">id</span>: an OPTIONAL identifier identifying the relation;</li>
<li><span class='attribute' id="insertion.after">after</span>: an identifier (<span class="name">d2</span>) for the dictionary <em>after</em> insertion; </li>
<li><span class='attribute' id="insertion.before">before</span>: an identifier (<span class="name">d1</span>) for the dictionary <em>before</em> insertion;</li>
-<li><span class='attribute' id="insertion.key-entity-set">key-entity-set</span>: the inserted key-entity pairs <span class="name">(key_1, e_1)</span>, ..., <span class="name">(key_n, e_n)</span> in which each <span class="name">key_i</span> is a <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#term-value">value</a>, and <span class="name">e_i</span> is an identifier for the entity that has been inserted with the key;
+<li><span class='attribute' id="insertion.key-entity-set">key-entity-set</span>: all inserted key-entity pairs <span class="name">(key_1, e_1)</span>, ..., <span class="name">(key_n, e_n)</span>. Here, each <span class="name">key_i</span> is a <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#term-value">value</a>, and <span class="name">e_i</span> is an identifier for the entity that has been inserted with the key;
each <span class="name">key_i</span> is expected to be unique for the key-entity-set, as formalized in <a href="#key-single-entity-inference">Inference 2</a>;
</li>
<li><span class='attribute' id="insertion.attributes">attributes</span>: an OPTIONAL set (<span class="name">attrs</span>) of attribute-value pairs representing additional information about this relation.</li>
@@ -882,7 +883,9 @@
<p>
An Insertion relation <span class="name">derivedByInsertionFrom(id; d2, d1, {(key_1, e_1), ..., (key_n, e_n)})</span> states that <span class="name">d2</span> is the dictionary
-following the insertion of pairs <span class="name">(key_1, e_1)</span>, ..., <span class="name">(key_n, e_n)</span> into dictionary <span class="name">d1</span>.</p>
+following the insertion of pairs <span class="name">(key_1, e_1)</span>, ..., <span class="name">(key_n, e_n)</span> into dictionary <span class="name">d1</span>.
+Note that insertion is considered to be complete. This means that we assume that no unknown keys were inserted in or removed from a dictionary after an insertion. This is formalized in <a href="#insertion-removal-membership-inference">Inference 7</a>.</p>
+
<div class="anexample">
@@ -895,17 +898,16 @@
entity(d2, [prov:type='prov:Dictionary' ])
derivedByInsertionFrom(d1, d0, {("k1", e1), ("k2", e2)})
-derivedByInsertionFrom(d2, d1, {("k3", e3)})
+derivedByInsertionFrom(d2, d1, {("k3", e3)}, [ dcterms:description ="A second insertion" ]) //an insertion with optional attribute dcterms:description
</pre>
From this set of descriptions, we conclude:
<ul>
-<li> <span class="name">d0</span> was the set <span class="name">{ }</span> </li>
-<li> <span class="name">d1</span> was the set <span class="name">{ ("k1", e1), ("k2", e2) }</span> </li>
-<li> <span class="name">d2</span> was the set <span class="name">{ ("k1", e1), ("k2", e2), ("k3", e3) }</span> </li>
+<li> <span class="name">d0</span> was the dictionary <span class="name">{ }</span> </li>
+<li> <span class="name">d1</span> was the dictionary <span class="name">{ ("k1", e1), ("k2", e2) }</span> </li>
+<li> <span class="name">d2</span> was the dictionary <span class="name">{ ("k1", e1), ("k2", e2), ("k3", e3) }</span> </li>
</ul>
</div>
-
-<p>Insertion provides an "update semantics" for the keys that are already present in a dictionary,
+<p>Futhermore, insertion provides an "update semantics" for the keys that are already present in a dictionary,
since a new pair replaces an existing pair with the same key in the new dictionary. This is illustrated by the following example.</p>
<div class="anexample">
@@ -918,14 +920,14 @@
entity(d2, [prov:type='prov:Dictionary' ])
derivedByInsertionFrom(d1, d0, {("k1", e1), ("k2", e2)})
-derivedByInsertionFrom(d2, d1, {("k1", e3)})
+derivedByInsertionFrom(d2, d1, {("k1", e3)})
</pre>
This is a case of <em>update</em> of <span class="name">e1</span> to <span class="name">e3</span> for the same key, <span class="name">"k1"</span>. <br/>
From this set of descriptions, we conclude:
<ul>
-<li> <span class="name">d0</span> was the set <span class="name">{ }</span> </li>
-<li> <span class="name">d1</span> was the set <span class="name">{ ("k1", e1), ("k2", e2) }</span> </li>
-<li> <span class="name">d2</span> was the set <span class="name">{ ("k1", e3), ("k2", e2) }</span> </li>
+<li> <span class="name">d0</span> was the dictionary <span class="name">{ }</span> </li>
+<li> <span class="name">d1</span> was the dictionary <span class="name">{ ("k1", e1), ("k2", e2) }</span> </li>
+<li> <span class="name">d2</span> was the dictionary <span class="name">{ ("k1", e3), ("k2", e2) }</span> </li>
</ul>
</div>
@@ -944,12 +946,13 @@
<li><span class='attribute' id="removal.id">id</span>: an OPTIONAL identifier identifying the relation;</li>
<li><span class='attribute' id="removal.after">after</span>: an identifier (<span class="name">d2</span>) for the dictionary <em>after</em> the deletion; </li>
<li><span class='attribute' id="removal.before">before</span>: an identifier (<span class="name">d1</span>) for the dictionary <em>before</em> the deletion;</li>
-<li><span class='attribute' id="removal.key-set">key-set</span>: a set of deleted keys <span class="name">key_1</span>, ..., <span class="name">key_n</span>, for which each <span class="name">key_i</span> is a <a>value</a>;</li>
+<li><span class='attribute' id="removal.key-set">key-set</span>: the set of deleted keys <span class="name">key_1</span>, ..., <span class="name">key_n</span>. Here, each <span class="name">key_i</span> is a <a href="http://www.w3.org/TR/2012/CR-prov-dm-20121211/#term-value">value</a>;</li>
<li><span class='attribute' id="removal.attributes">attributes</span>: an OPTIONAL set (<span class="name">attrs</span>) of attribute-value pairs representing additional information about this relation.</li>
</ul>
</div>
<p>A Removal relation <span class="name">derivedByRemovalFrom(id; d2,d1, {key_1, ..., key_n})</span> states that <span class="name">d2</span> is the dictionary following the removal of the set of pairs corresponding to keys <span class="name">key_1...key_n</span> from <span class="name">d1</span>. If a key that is not present in the dictionary is removed, the dictionary remains unchanged.
+ Note that removal is considered to be complete. This means that we assume that no unknown keys were inserted in or removed from a dictionary after a removal. This is formalized in <a href="#insertion-removal-membership-inference">Inference 7</a>.
</p>
<div class="anexample">
@@ -970,11 +973,11 @@
</pre>
From this set of descriptions, we conclude:
<ul>
-<li><span class="name">d0</span> was the set <span class="name">{ }</span> </li>
-<li><span class="name">d1</span> was the set <span class="name">{ ("k1", e1), ("k2", e2) }</span> </li>
-<li><span class="name">d2</span> was the set <span class="name">{ ("k1", e1), ("k2", e2), ("k3", e3) }</span> </li>
-<li><span class="name">d3</span> was the set <span class="name">{ ("k2", e2) }</span> </li>
-<li><span class="name">d4</span> was the set <span class="name">{ ("k2", e2) }</span> </li>
+<li><span class="name">d0</span> was the dictionary <span class="name">{ }</span> </li>
+<li><span class="name">d1</span> was the dictionary <span class="name">{ ("k1", e1), ("k2", e2) }</span> </li>
+<li><span class="name">d2</span> was the dictionary <span class="name">{ ("k1", e1), ("k2", e2), ("k3", e3) }</span> </li>
+<li><span class="name">d3</span> was the dictionary <span class="name">{ ("k2", e2) }</span> </li>
+<li><span class="name">d4</span> was the dictionary <span class="name">{ ("k2", e2) }</span> </li>
</ul>
Note that "k1" was not present in d3, and thus its removal to obtain d4 did not change the contents of the dictionary.
</div>
@@ -992,6 +995,22 @@
<section id="dictionary-notation">
<h2>PROV-N Notation of Dictionary Concepts</h2>
+The notation used for dictionaries in this document extends the standard PROV-N according to the principles described in <a href="http://www.w3.org/TR/prov-n/#extensibility">the PROV-N extensibility chapter</a>.
+However, because dictionaries are defined in the same namespace as the rest of PROV-N, the terms in this document do not have a non-empty prefix. For the remainder of this document, we will assume that the default namespace http://www.w3.org/ns/prov# is used, and thus, no prefix is specified for the terms associated with dictionaries.
+<section id="expression-dictionary">
+ <h3>Dictionary and EmptyDictionary Expression</h3>
+ PROV-Dictionary provides no dedicated syntax for Collection and EmptyCollection. Dictionaries are declared in <a href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#expression-collection">the same way</a> as Collections. A Dictionary or an EmptyDictionary MUST be expressed as an
+<code class="content"><a class="grammarRef" href="http://www.w3.org/TR/2012/CR-prov-n-20121211/#prod-entityExpression">entityExpression</a></code> with attribute
+<span id="provn-type-Dictionary"><code>prov:type='prov:Dictionary'</code></span>, or
+<span id="provn-type-EmptyDictionary"><code>prov:type='prov:EmptyDictionary'</code></span>, respectively.
+<div class="anexample">
+<p>The following two expressions are about a dictionary and an empty dictionary, respectively.
+<pre class="codeexample">
+ entity(ex:d1, [ prov:type='prov:Dictionary' ])
+ entity(ex:d2, [ prov:type='prov:EmptyDictionary' ])
+</pre>
+</div>
+</section>
<section id="expression-dictionary-membership">
<h3>Membership</h3>
@@ -1027,16 +1046,12 @@
<div class="anexample">
- <p>In this example, d is a dictionary known to have <span class="name">e0</span>, <span class="name">e1</span>, and <span class="name">e2</span> as members, and may have other members.</p>
+ <p>In this example, d is a dictionary known to have <span class="name">e0</span> as member, and may have other members.</p>
<pre class="codeexample">
entity(e0)
-entity(e1)
-entity(e2)
-
-entity(d, [prov:type='prov:Dictionary' ]) // d is a dictionary, with unknown content
+
+entity(d, [prov:type='prov:Dictionary' ])
hadDictionaryMember(d, e0, "k0")
-hadDictionaryMember(d, e1, "k1")
-hadDictionaryMember(d, e2, "k2")
</pre>
</div>
@@ -1047,8 +1062,8 @@
<span class="nonterminal">derivationByInsertionFromExpression</span> ::=
<span class="name">derivedByInsertionFrom</span>
<span class="name">(</span>
- <span class="optional"><span class="nonterminal">identifier</span>
- <span class="name">,</span></span>
+ <span class="optional"><span class="nonterminal">optionalIdentifier</span>
+ <span class="name">;</span></span>
<span class="nonterminal">dIdentifier</span>
<span class="name">,</span>
<span class="nonterminal">dIdentifier</span>
@@ -1056,12 +1071,12 @@
<span class="name">{</span>
<span class="nonterminal">keyValuePairs</span>
<span class="name">}</span>
-<span class="nonterminal">optional-attribute-values</span>
+<span class="nonterminal">optionalAttributeValuePairs</span>
<span class="name">)</span>
</div>
-<p>The following table summarizes how each constituent of a PROV-DM Insertion maps to a non-terminal.</p>
+<p>The following table summarizes how each constituent of a PROV-Dictionary Insertion maps to a non-terminal.</p>
<div style="text-align: left; ">
<table class="thinborder" style="margin-left: auto; margin-right: auto;">
<tr><td><b>Insertion</b></td><td><b>Non-Terminal</b></td></tr>
@@ -1109,8 +1124,8 @@
<span class="nonterminal">derivationByRemovalFromExpression</span> ::=
<span class="name">derivedByRemovalFrom</span>
<span class="name">(</span>
- <span class="optional"><span class="nonterminal">identifier</span>
- <span class="name">,</span></span>
+ <span class="optional"><span class="nonterminal">optionalIdentifier</span>
+ <span class="name">;</span></span>
<span class="nonterminal">dIdentifier</span>
<span class="name">,</span>
<span class="nonterminal">dIdentifier</span>
@@ -1118,12 +1133,12 @@
<span class="name">{</span>
<span class="nonterminal">keySet</span>
<span class="name">}</span>
-<span class="nonterminal">optional-attribute-values</span>
+<span class="nonterminal">optionalAttributeValuePairs</span>
<span class="name">)</span>
<br>
</div>
-<p>The following table summarizes how each constituent of a PROV-DM Removal maps to a non-terminal.</p>
+<p>The following table summarizes how each constituent of a PROV-Dictionary Removal maps to a non-terminal.</p>
<div style="text-align: left; ">
<table class="thinborder" style="margin-left: auto; margin-right: auto;">
<tr><td><b>Removal</b></td><td><b>Non-Terminal</b></td></tr>
@@ -1194,9 +1209,13 @@
</section>
<section id="dictionary-ontological-definition">
-<h2>Ontological Definition of Dictionary</h2>
+<h2>PROV-O Representation of Dictionary</h2>
<p>In this section, the ontological definition of <code>prov:Dictionary</code> is given, in order to extend [[PROV-O]] with dictionaries. For more information on the terminology, syntax and conventions used in this section, we refer to [[PROV-O]]</p>
- <p> A <code><a class="qname"
+<p>The classes and properties defined in this document will be included in the default namespace of PROV.
+ Users of the ontology have the option of importing <code><http://www.w3.org/ns/prov#></code>, which includes all extensions, including PROV-Dictionary, or if they wish to have only [[PROV-O]] terms, they can import <code><http://www.w3.org/ns/prov-o#></code>. Similarly, <code><http://www.w3.org/ns/prov-dictionary#></code> holds only the PROV-Dictionary terms.
+The owl-file of PROV-Dictionary is available for download <a href="https://dvcs.w3.org/hg/prov/raw-file/default/dictionary/prov-dictionary.owl">here</a>. (Note that this file is unfinished at the time of this working draft, and may be subject to change.)</p>
+
+ <p> A <code><a class="qname"
href='#Dictionary'>prov:Dictionary</a></code> is a <code
class="repeated">prov:Entity</code> that acts as a container to some members,
which are themselves entities.
@@ -1218,8 +1237,8 @@
:d1 a prov:Dictionary;
prov:hadDictionaryMember [
a prov:KeyValuePair;
- prov:pairKey "k1"^^xsd:string
- prov:pairValue :e1
+ prov:pairKey "k1"^^xsd:string;
+ prov:pairValue :e1
], [
a prov:KeyValuePair;
prov:pairKey "k2"^^xsd:string;
@@ -1235,16 +1254,16 @@
href='#EmptyDictionary'><code>prov:EmptyDictionary</code></a>.
</p>
- <p> To describe the provenance of a dictionary, PROV-O provides two
+ <p> To describe the provenance of a dictionary, PROV-Dictionary provides two
kinds of influence: <code><a class="qname"
href="#qualifiedInsertion">prov:qualifiedInsertion</a></code> is used to
describe that a dictionary was obtained from an existing dictionary by
-<em>inserting</em> a set of key-value pairs. <code><a class="qname"
+<a href="#term-dictionary-insertion">inserting</a> a set of key-value pairs. <code><a class="qname"
href="#qualifiedRemoval">prov:qualifiedRemoval</a></code> is used to specify
that a given dictionary was obtained from an existing dictionary by
-<em>removing</em> a set of key-value pairs. The example below specifies that
-the dictionary <code>:c1</code> was obtained from the empty dictionary
-<code>:c</code> by <em>inserting</em> the key-value pairs <code>("k1",
+ <a href="#term-dictionary-removal">removing</a> a set of key-value pairs. The example below specifies that
+the dictionary <code>:d1</code> was obtained from the empty dictionary
+<code>:d</code> by <em>inserting</em> the key-value pairs <code>("k1",
:e1)</code> and <code>("k2", :e2)</code>.
</p>
@@ -1257,13 +1276,13 @@
:e1 a prov:Entity .
:e2 a prov:Entity .
-:c a prov:EmptyDictionary .
-
-:c1 a prov:Dictionary;
- prov:derivedByInsertionFrom :c;
+:d a prov:EmptyDictionary .
+
+:d1 a prov:Dictionary;
+ prov:derivedByInsertionFrom :d;
prov:qualifiedInsertion [
a prov:Insertion;
- prov:dictionary :c;
+ prov:dictionary :d;
prov:inserted [
a prov:KeyValuePair;
prov:pairKey "k1"^^xsd:string;
@@ -1281,11 +1300,11 @@
<p>
Similarly, the example below specifies that the dictionary
- <code>:c3</code> was obtained by <em>removing</em> the key-value pairs associated with
+ <code>:d3</code> was obtained by <em>removing</em> the key-value pairs associated with
the keys <code>"k1"</code> and <code>"k2"</code> from the dictionary
- <code>:c2</code>. Thus, <code>:c3</code> does not contain the
+ <code>:d2</code>. Thus, <code>:d3</code> does not contain the
members <code>("k1", :e1)</code> and <code>("k2",
- :e2(</code> from <code>:c2</code>.
+ :e2(</code> from <code>:d2</code>.
</p>
<div about="#narrative-example-dictionaries-3" typeof="prov:Entity" class="exampleOuter" xmlns:prov="http://www.w3.org/ns/prov#">
@@ -1294,24 +1313,23 @@
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
-:c2 a prov:Dictionary .
-
-:c3 a prov:Dictionary;
- prov:derivedByRemovalFrom :c2;
+:d2 a prov:Dictionary .
+
+:d3 a prov:Dictionary;
+ prov:derivedByRemovalFrom :d2;
prov:qualifiedRemoval [
a prov:Removal;
- prov:dictionary :c2;
+ prov:dictionary :d2;
prov:removed "k1"^^xsd:string,
"k3"^^xsd:string;
];
.
</pre>
</div>
-
+<section id="prov-dictionary-owl-terms-at-a-glance">
+ <h3>Overview</h3>
<p>These terms are used to describe the provenance of collections of key-value pairs.</p>
-<div
- class="prov-collections owl-classes at-a-glance">
<ul class="hlist">
<li>
<a href="#Dictionary">prov:Dictionary</a>
@@ -1328,12 +1346,6 @@
<li>
<a href="#Removal">prov:Removal</a>
</li>
- </ul>
-</div>
-
-<div
- class="prov-collections owl-properties at-a-glance">
- <ul class="hlist">
<li class="object-property">
<a href="#derivedByInsertionFrom">prov:derivedByInsertionFrom</a>
</li>
@@ -1365,18 +1377,15 @@
<a href="#removedKey">prov:removedKey</a>
</li>
</ul>
-</div>
-
- <div
- class="prov-collections owl-classes crossreference"
- xmlns:dcterms="http://purl.org/dc/terms/"
- xmlns:prov="http://www.w3.org/ns/prov#">
-
+ </section>
+
+<section id="Classes">
+ <h3>Dictionary Classes</h3>
<div id="Dictionary" class="entity">
<h3>
Class: <a href="#Dictionary"><span class="dotted" title="http://www.w3.org/ns/prov#Dictionary">prov:Dictionary</span></a>
<span class="backlink">
- back to <a href="#prov-collections-owl-terms-at-a-glance">collections classes</a>
+ back to <a href="#prov-dictionary-owl-terms-at-a-glance">overview</a>
</span>
</h3>
<p><strong>IRI:</strong>http://www.w3.org/ns/prov#Dictionary</p>
@@ -1397,7 +1406,6 @@
a prov:Dictionary, prov:Collection, prov:Entity;
prov:derivedByInsertionFrom :studentRegister_2011;
:hasTotalStudents 45;
- :wasCreatedBy :bob;
.
</pre>
</div>
@@ -1415,6 +1423,7 @@
<dt>described with properties</dt>
<dd>
+ <a title="http://www.w3.org/ns/prov#hadDictionaryMember" href="#hadDictionaryMember">prov:hadDictionaryMember</a><sup class="type-op" title="object property">op</sup>
<a title="http://www.w3.org/ns/prov#derivedByInsertionFrom" href="#derivedByInsertionFrom">prov:derivedByInsertionFrom</a><sup class="type-op" title="object property">op</sup>
<a title="http://www.w3.org/ns/prov#qualifiedRemoval" href="#qualifiedRemoval">prov:qualifiedRemoval</a><sup class="type-op" title="object property">op</sup>
<a title="http://www.w3.org/ns/prov#qualifiedInsertion" href="#qualifiedInsertion">prov:qualifiedInsertion</a><sup class="type-op" title="object property">op</sup>
@@ -1439,7 +1448,7 @@
<h3>
Class: <a href="#DictionaryInvolvement"><span class="dotted" title="http://www.w3.org/ns/prov#DictionaryInvolvement">prov:DictionaryInvolvement</span></a>
<span class="backlink">
- back to <a href="#prov-collections-owl-terms-at-a-glance">collections classes</a>
+ back to <a href="#prov-dictionary-owl-terms-at-a-glance">overview</a>
</span>
</h3>
<p><strong>IRI:</strong>http://www.w3.org/ns/prov#DictionaryInvolvement</p>
@@ -1499,7 +1508,7 @@
<h3>
Class: <a href="#EmptyDictionary"><span class="dotted" title="http://www.w3.org/ns/prov#EmptyDictionary">prov:EmptyDictionary</span></a>
<span class="backlink">
- back to <a href="#prov-collections-owl-terms-at-a-glance">collections classes</a>
+ back to <a href="#prov-dictionary-owl-terms-at-a-glance">overview</a>
</span>
</h3>
<p><strong>IRI:</strong>http://www.w3.org/ns/prov#EmptyDictionary</p>
@@ -1515,28 +1524,11 @@
:e1 a prov:Entity .
:e2 a prov:Entity .
-:d a prov:EmptyDictionary .
-
-:d1 a prov:Dictionary;
- prov:derivedByInsertionFrom :d;
- prov:qualifiedInsertion [
- a prov:Insertion;
- prov:dictionary :d;
- prov:insertedKeyValuePair [
- a prov:KeyValuePair;
- prov:pairKey "k1"^^xsd:string;
- prov:pairValue :e1;
- ], [
- a prov:KeyValuePair;
- prov:pairKey "k2"^^xsd:string;
- prov:pairValue :e2;
- ];
- ];
-. </pre>
+:d a prov:EmptyDictionary</pre>
</div>
<dl class="description">
- <dd class="comment"><p>An empty dictionary.</p>
+ <dd class="comment"><p>An empty dictionary (i.e. has no members).</p>
</dd>
<dt>is subclass of</dt>
@@ -1551,7 +1543,7 @@
<h3>
Class: <a href="#Insertion"><span class="dotted" title="http://www.w3.org/ns/prov#Insertion">prov:Insertion</span></a>
<span class="backlink">
- back to <a href="#prov-collections-owl-terms-at-a-glance">collections classes</a>
+ back to <a href="#prov-dictionary-owl-terms-at-a-glance">overview</a>
</span>
</h3>
<p><strong>IRI:</strong>http://www.w3.org/ns/prov#Insertion</p>
@@ -1619,7 +1611,7 @@
<h3>
Class: <a href="#KeyValuePair"><span class="dotted" title="http://www.w3.org/ns/prov#KeyValuePair">prov:KeyValuePair</span></a>
<span class="backlink">
- back to <a href="#prov-collections-owl-terms-at-a-glance">collections classes</a>
+ back to <a href="#prov-dictionary-owl-terms-at-a-glance">overview</a>
</span>
</h3>
<p><strong>IRI:</strong>http://www.w3.org/ns/prov#KeyValuePair</p>
@@ -1677,7 +1669,7 @@
<h3>
Class: <a href="#Removal"><span class="dotted" title="http://www.w3.org/ns/prov#Removal">prov:Removal</span></a>
<span class="backlink">
- back to <a href="#prov-collections-owl-terms-at-a-glance">collections classes</a>
+ back to <a href="#prov-dictionary-owl-terms-at-a-glance">overview</a>
</span>
</h3>
<p><strong>IRI:</strong>http://www.w3.org/ns/prov#Removal</p>
@@ -1711,7 +1703,7 @@
</div>
<dl class="description">
- <dd class="comment"><p>Removal is a derivation that transforms a dictionary into another, by removing one or more key-value pairs.</p>
+ <dd class="comment"><p>Removal is a derivation that transforms a dictionary into another, by removing one or more key-value pairs specified by <a title="http://www.w3.org/ns/prov#removedKey" href="#removedKey">prov:removedKey</a>.</p>
</dd>
<dt>is subclass of</dt>
@@ -1737,6 +1729,9 @@
</dl>
</div>
</div>
+</section>
+<section id="Properties">
+ <h3>Dictionary Properties</h3>
<div
class="prov-collections owl-properties crossreference"
xmlns:prov="http://www.w3.org/ns/prov#">
@@ -1961,9 +1956,7 @@
<dd>
<ul>
<li>
- <a title="http://www.w3.org/ns/prov#Insertion" href="#Insertion" class="owlclass">prov:Insertion</a>
- </li>
- <li>
+ <a title="http://www.w3.org/ns/prov#Insertion" href="#Insertion" class="owlclass">prov:Insertion</a> or
<a title="http://www.w3.org/ns/prov#Removal" href="#Removal" class="owlclass">prov:Removal</a>
</li>
</ul>
@@ -2279,25 +2272,12 @@
:our-old-baseball-team-field-positions
a prov:Dictionary,
:FieldPositions;
- prov:hadDictionaryMember [
- a prov:KeyValuePair;
- prov:pairKey "first-baseman"^^xsd:string;
- prov:pairValue :george;
- ],
- prov:hadDictionaryMember [
- a prov:KeyValuePair;
- prov:pairKey "pitcher"^^xsd:string;
- prov:pairValue :carl;
- ];
-.
-
-:george a prov:Entity .
-:carl a prov:Entity .
+
</pre>
</div>
<div class="description">
- <div class="comment"><p>If this Dictionary prov:derivedByInsertionFrom another Dictionary :e, then it can qualify how it did perform the Insertion using prov:qualifiedInsertion [ a prov:Insertion; prov:dictionary :e; prov:inserted [a prov:KeyValuePair; prov:pairKey "k1"^^xsd:string; prov:pairValue :foo] ].</p>
+ <div class="comment"><p>The dictionary was derived from the other by insertion. prov:qualifiedInsertion shows details of the insertion, in particular the inserted key-value pairs.</p>
</div>
<dl>
@@ -2361,7 +2341,7 @@
</div>
<div class="description">
- <div class="comment"><p>If this Dictionary prov:derivedByRemovalFrom another Dictionary :e, then it can qualify how it did perform the Removal using prov:qualifiedRemoval [ a prov:Removal; prov:dictionary :c; prov:removed "k1"^^xsd:string ].</p>
+ <div class="comment"><p>The dictionary was derived from the other by removal. prov:qualifiedRemoval shows details of the removal, in particular the removed keys.</p>
</div>
<dl>
@@ -2452,13 +2432,14 @@
</div>
</div>
</div>
-
+</section>
</section>
<section id="dictionary-xml-schema">
-<h2>XML Schema Dictionary</h2>
-In this section, we provide the XML Schema to use dictionaries with the [[PROV-XML]] serialization.
+<h2>PROV-XML Representation of Dictionary</h2>
+This section details how to describe dictionaries with
+the [[PROV-XML]] serialization. The XML schema for PROV-Dictionary is available for download <a href="https://dvcs.w3.org/hg/prov/raw-file/default/dictionary/prov-dictionary.xsd">here</a>.
<section id="term-Dictionary">
<h3>Dictionary</h3>
<div class="glossary-ref" data-ref="glossary-dictionary"></div>
@@ -2476,7 +2457,7 @@
<prov:type xsi:type="xsd:QName">prov:EmptyDictionary</prov:type>
</prov:entity></b>
- <!-- d1 is a dictionary, with unknown content -->
+ <!-- d1 is a dictionary, with (so far) unknown content -->
<b><prov:entity prov:id="d1">
<prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type>
</prov:entity></b>
@@ -2493,7 +2474,7 @@
<pre class="schema-type">
<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="KeyValuePair" >
<xs:element name="entity" type="prov:EntityRef" />
- <xs:element name="key" type="xs:String" />
+ <xs:element name="key" type="xs:anySimpleType" />
</xs:complexType>
</pre>
<pre class="schema-usage">
@@ -2525,7 +2506,7 @@
<section id="term-DictionaryMembership">
<h3>Dictionary Membership</h3>
<div class="glossary-ref" data-ref="glossary-dictionarymembership"></div>
-<p>The members of a dictionary are specified by listing all the key-value pairs inside a <code>prov:DictionaryMembership</code> element</p>
+<p>The members of a dictionary are specified by listing key-value pairs inside a <code>prov:DictionaryMembership</code> element</p>
<pre class="schema-type">
<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="DictionaryMembership">
<xs:sequence>
@@ -2638,7 +2619,7 @@
<xs:sequence>
<xs:element name="newDictionary" type="prov:EntityRef"/>
<xs:element name="oldDictionary" type="prov:EntityRef"/>
- <xs:element name="key" type="xs:String" maxOccurs="unbounded" />
+ <xs:element name="key" type="xs:anySimpleType" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</pre>
@@ -2693,7 +2674,7 @@
<section id="dictionary-constraints">
<h2>Constraints Associated with Dictionary</h2>
-In this section, we specify some inferences and constraints associated with dictionaries. These inferences and constraints need to be applied to obtain valid provenance when using dictionaries.
+In this section, we specify some inferences and constraints associated with dictionaries. These inferences and constraints MAY be applied to obtain valid provenance when using dictionaries. For more information about valid provenance and its purpose, we refer to the <a href="http://www.w3.org/TR/2012/CR-prov-constraints-20121211/#purpose">disclaimer</a> in [[PROV-CONSTRAINTS]].
Whereas collections were deliberately left unconstrained in [[PROV-DM]] and [[PROV-CONSTRAINTS]] to remain as general as possible, dictionaries are intended to provide more structure, and thus, are constrained more strictly.
For more information on how to read this section, we refer to [[PROV-CONSTRAINTS]].
@@ -2721,7 +2702,7 @@
<span class='ruleTitle'><a class="internalDFN" href="#membership-insertion-membership-inference">Inference 3 (membership-insertion-membership)</a></span>
<p>
<span class="conditional">IF</span> <span class="name">hadDictionaryMember(d1, e, "k")</span>
- and <span class="name">derivedByInsertionFrom(d2, d1, {("k1", e1),...,("kn", en)})</span> and <span class="name">k</span> ∉ <span class="name">{k1,...,kn}</span>
+ and <span class="name">derivedByInsertionFrom(d2, d1, {("k1", e1),...,("kn", en)})</span> and <span class="name">k</span> ∉ <span class="name">{"k1",...,"kn"}</span>
<span class='conditional'>THEN</span> <span class="name">hadDictionaryMember(d2, e, "k")</span>
</p></div>
<!--REMOVED CONSTRAINT <p id="membership-update-membership-inference_text">Insertion provides an "update semantics" for the keys that are already present in a dictionary. A new pair replaces an existing pair with the same key in the new dictionary. </p>
@@ -2805,14 +2786,15 @@
<p id="impossible-removal-insertion_text">A dictionary must not be derived through multiple insertion or removal relations.</p>
<div class='constraint' id='impossible-removal-insertion-constraint'>
<span class='ruleTitle'><a class="internalDFN" href="#impossible-removal-insertion-constraint">Constraint 9 (impossible-removal-insertion)</a></span>
+ <p>Here, <span class="name">KV1</span> and <span class="name">KV2</span> are sets of key-entity pairs.</p>
<p>
-<span class="conditional">IF</span> <span class="name">derivedByRemovalFrom(d2, d1, {"k1",...,"kn"})</span> and
- <span class="name">derivedByInsertionFrom(d2, d1, {("k1", e1),...,("km",em)})</span><span class='conditional'>THEN</span> <span
+<span class="conditional">IF</span> <span class="name">derivedByRemovalFrom(d2, d1, KV1)</span> and
+ <span class="name">derivedByInsertionFrom(d2, d1, KV2)</span><span class='conditional'>THEN</span> <span
class="conditional">INVALID</span>
</p></div>
<div class='constraint' id='impossible-insertion-insertion-constraint'>
<span class='ruleTitle'><a class="internalDFN" href="#impossible-insertion-insertion-constraint">Constraint 10 (impossible-insertion-insertion)</a></span>
-<p>Here, <span class="name">KV1</span> and <span class="name">KV2</span> are sets of key-entity pairs.</o>
+<p>Here, <span class="name">KV1</span> and <span class="name">KV2</span> are sets of key-entity pairs.</p>
<p>
<span class="conditional">IF</span> <span class="name">derivedByInsertionFrom(d2, d1, KV1)</span> and
<span class="name">derivedByInsertionFrom(d2, d1, KV2)</span><span class='conditional'>THEN</span> <span
@@ -2846,30 +2828,34 @@
<p>
<span class="conditional">IF</span> <span class="name">entity(d, [prov:type='prov:Dictionary'])</span> <span class='conditional'>THEN</span>
<span class="name">'prov:Dictionary' ∈ typeOf(d)</span> and <span class="name">'prov:Collection' ∈ typeOf(d)</span>
+ and <span class="name">'entity' ∈ typeOf(d)</span>
</p>
</li>
<li>
<p>
<span class="conditional">IF</span> <span class="name">entity(d, [prov:type='prov:EmptyDictionary'])</span> <span class='conditional'>THEN</span>
<span class="name">'prov:EmptyDictionary' ∈ typeOf(d)</span> and <span class="name">'prov:Dictionary' ∈ typeOf(d)</span>
+ and <span class="name">'prov:Collection' ∈ typeOf(d)</span>
+ and <span class="name">'prov:EmptyCollection' ∈ typeOf(d)</span>
+ and <span class="name">'entity' ∈ typeOf(d)</span>
</p>
</li>
<li>
<p>
<span class="conditional">IF</span> <span class="name">hadDictionaryMember(d, e, "k")</span> <span class='conditional'>THEN</span>
- <span class="name">'prov:Dictionary' ∈ typeOf(d)</span> and <span class="name">'entity' ∈ typeOf(e)</span>
+ <span class="name">'prov:Dictionary' ∈ typeOf(d)</span> and <span class="name">'prov:Collection' ∈ typeOf(d)</span> and <span class="name">'entity' ∈ typeOf(d)</span> and <span class="name">'entity' ∈ typeOf(e)</span>
</p>
</li>
<li>
<p>
<span class="conditional">IF</span> <span class="name">derivedByInsertionFrom(d2, d1, {("k1", e1)})</span> <span class='conditional'>THEN</span>
- <span class="name">'prov:Dictionary' ∈ typeOf(d1)</span> and <span class="name">'prov:Dictionary' ∈ typeOf(d2)</span> and <span class="name">'entity' ∈ typeOf(e1)</span>
+ <span class="name">'prov:Dictionary' ∈ typeOf(d1)</span> and <span class="name">'prov:Dictionary' ∈ typeOf(d2)</span> and <span class="name">'prov:Collection' ∈ typeOf(d1)</span> and <span class="name">'entity' ∈ typeOf(d1)</span> and <span class="name">'prov:Collection' ∈ typeOf(d2)</span> and <span class="name">'entity' ∈ typeOf(d2)</span> and <span class="name">'entity' ∈ typeOf(e1)</span>
</p>
</li>
<li>
<p>
<span class="conditional">IF</span> <span class="name">derivedByRemovalFrom(d2, d1, {"k1"})</span> <span class='conditional'>THEN</span>
- <span class="name">'prov:Dictionary' ∈ typeOf(d1)</span> and <span class="name">'prov:Dictionary' ∈ typeOf(d2)</span>
+ <span class="name">'prov:Dictionary' ∈ typeOf(d1)</span> and <span class="name">'prov:Dictionary' ∈ typeOf(d2)</span> and <span class="name">'prov:Collection' ∈ typeOf(d1)</span> and <span class="name">'entity' ∈ typeOf(d1)</span> and <span class="name">'prov:Collection' ∈ typeOf(d2)</span> and <span class="name">'entity' ∈ typeOf(d2)</span>
</p>
</li>
</ol>