Changes to PROV-Dictionary after Luc's review
authorTom De Nies <tom.denies@ugent.be>
Wed, 10 Apr 2013 16:26:05 +0200
changeset 6122 442965fcfcf6
parent 6121 754fef62676b
child 6123 ec3e5cb7a037
Changes to PROV-Dictionary after Luc's review
dictionary/Overview.html
xml/schema/prov-dictionary.xsd
--- a/dictionary/Overview.html	Wed Apr 10 12:14:56 2013 +0200
+++ b/dictionary/Overview.html	Wed Apr 10 16:26:05 2013 +0200
@@ -641,7 +641,7 @@
           previousMaturity:  "FPWD",
  
           // if there a publicly available Editor's Draft, this is the link
-          edDraftURI:           "http://dvcs.w3.org/hg/prov/raw-file/default/dictionary/Overview.html",
+          //edDraftURI:           "http://dvcs.w3.org/hg/prov/raw-file/default/dictionary/Overview.html",
  
           // if this is a LCWD, uncomment and set the end of its review period
           //lcEnd: "2012-09-18",
@@ -770,7 +770,7 @@
 
 <section id="dictionary-conceptual-definition"> 
 <h2>Conceptual Definition of Dictionary</h2>
-<p>In this section a specific type of collection, as specified in [[PROV-DM]], is introduced. This new type of collection, Dictionary, is specified as follows.</p>
+<p>In this section a specific type of <a href="http://www.w3.org/TR/2013/PR-prov-dm-20130312/#component6">collection</a>, as specified in [[PROV-DM]], is introduced. This new type of collection, Dictionary, is specified as follows.</p>
 
 
 <span class="glossary-ref" data-ref="glossary-dictionary"></span>
@@ -786,7 +786,7 @@
 -->
 
 
-<p>Following the earlier definitions for generic collections,  PROV-Dictionary defines the following types related to dictionaries:</p>
+<p>Following the <a href="http://www.w3.org/TR/2013/PR-prov-dm-20130312/#term-collection">definition of prov:Collection</a>,  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>
@@ -932,8 +932,8 @@
 </ul>
 </div>
 
-<p>A Removal relation <span class="name">prov: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.
-  In other words, the key-set <span class="name">{key_1,...,key_n}</span> is to be seen as the difference in keys and corresponding entities between <span class="name">d1</span> and <span class="name">d2</span>. Note that this key-set is considered to be complete. This means that we assume that no unknown keys were inserted in or removed from a dictionary derived by a removal relation. This is formalized in <a href="#insertion-removal-membership-inference">Inference D8</a>.
+<p>A Removal relation <span class="name">prov: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>. 
+  In other words, the key-set <span class="name">{key_1,...,key_n}</span> is to be seen as the difference in keys and corresponding entities between <span class="name">d1</span> and <span class="name">d2</span>. Note that this key-set is considered to be complete. This means that we assume that no unknown keys were inserted in or removed from a dictionary derived by a removal relation. This is formalized in <a href="#insertion-removal-membership-inference">Inference D8</a>. 
 </p>
 
 <div class="anexample">
@@ -960,7 +960,7 @@
 <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.
+Note that there is no constraint stating that removed keys had to be present in the original dictionary. For example, "k1" was not present in d3, and thus its removal to obtain d4 did not change the contents of the dictionary.
 </div>
 
 </section>  <!-- end removal -->
@@ -1188,9 +1188,8 @@
 <section id="dictionary-ontological-definition"> 
 <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>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>&lt;http://www.w3.org/ns/prov#&gt;</code>, which includes all extensions, including PROV-Dictionary, or if they wish to have only [[PROV-O]] terms, they can import <code>&lt;http://www.w3.org/ns/prov-o#&gt;</code>. Similarly, <code>&lt;http://www.w3.org/ns/prov-dictionary#&gt;</code> holds only the PROV-Dictionary terms.
-The [<a href="prov-dictionary.owl">OWL file for PROV-Dictionary</a>] is available for download.</p>
+<p>The classes and properties defined in this document are included in the default namespace of PROV.
+  Users of the ontology have the option of importing <code>&lt;http://www.w3.org/ns/prov#&gt;</code>, which includes all extensions, including PROV-Dictionary. Additionally, the [<a href="prov-dictionary.owl">OWL file for PROV-Dictionary</a>] is available for download.</p>
   
   <p> A <code><a class="qname"
 	href='#Dictionary'>prov:Dictionary</a></code> is a <code
@@ -2371,7 +2370,7 @@
 <section id="term-Dictionary">
 <h3>Dictionary</h3>
 <div class="glossary-ref" data-ref="glossary-dictionary"></div>
-<p>To specialize an Entity as a Dictionary, include a <code>prov:type</code> with the value "prov:Dictionary".</p>
+<p>To specialize an Entity as a prov:Dictionary or prov:EmptyDictionary, the element <code>&lt;prov:dictionary&gt;</code> or <code>&lt;prov:emptyDictionary&gt;</code> is used, respectively.<p>
 <pre class="schema-type">
 &lt;xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Dictionary"  &gt;
   &lt;xs:complexContent&gt;
@@ -2379,6 +2378,7 @@
   &lt;/xs:complexContent&gt;
 &lt;/xs:complexType&gt;
 </pre>
+<p>Usage in XML:<p>
 <pre class="schema-usage">
 &lt;xs:element name="dictionary" type="prov:Dictionary" substitutionGroup="prov:internalElement" /&gt;
 </pre>
@@ -2390,9 +2390,11 @@
   &lt;/xs:complexContent&gt;
 &lt;/xs:complexType&gt;
 </pre>
+<p>Usage in XML:<p>
 <pre class="schema-usage">
 &lt;xs:element name="emptyDictionary" type="prov:EmptyDictionary" substitutionGroup="prov:internalElement" /&gt;
 </pre>
+  
 <pre class="example">
 &lt;prov:document
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -2401,14 +2403,10 @@
     xmlns:ex="http://example.com/ns/ex#"&gt;
 
   &lt;!-- d0 is an empty dictionary --&gt;
-  <b>&lt;prov:entity prov:id="d0"&gt;
-    &lt;prov:type xsi:type="xsd:QName"&gt;prov:EmptyDictionary&lt;/prov:type&gt;
-  &lt;/prov:entity&gt;</b>
+  <b>&lt;prov:emptyDictionary prov:id="d0" /&gt;</b>
 
   &lt;!-- d1 is a dictionary, with (so far) unknown content --&gt;
-  <b>&lt;prov:entity prov:id="d1"&gt;
-    &lt;prov:type xsi:type="xsd:QName"&gt;prov:Dictionary&lt;/prov:type&gt;
-  &lt;/prov:entity&gt;</b>
+  <b>&lt;prov:dictionary prov:id="d1" /&gt;</b>
 
 &lt;/prov:document&gt;
 </pre>
@@ -2422,8 +2420,8 @@
 <pre class="schema-type">
 &lt;xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="KeyEntityPair"  &gt;
   &lt;xs:sequence&gt;
+    &lt;xs:element name="key" type="xs:anySimpleType" /&gt;
     &lt;xs:element name="entity" type="prov:IDRef" /&gt;
-    &lt;xs:element name="key" type="xs:anySimpleType" /&gt;
   &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
 </pre>
@@ -2441,13 +2439,13 @@
   &lt;prov:entity prov:id="e1"/&gt;
   
   <b>&lt;prov:keyEntityPair&gt;
+    &lt;prov:key&gt;k0&lt;/prov:key&gt;
     &lt;prov:entity prov:ref="e0"/&gt;
-    &lt;prov:key&gt;k0&lt;/prov:key&gt;
   &lt;/prov:keyEntityPair&gt;
   
   &lt;prov:keyEntityPair&gt;
+    &lt;prov:key&gt;k1&lt;/prov:key&gt;
     &lt;prov:entity prov:ref="e1"/&gt;
-    &lt;prov:key&gt;k1&lt;/prov:key&gt;
   &lt;/prov:keyEntityPair&gt;</b>
 &lt;/prov:document&gt;
 </pre>
@@ -2461,7 +2459,7 @@
 &lt;xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="DictionaryMembership"&gt;
   &lt;xs:sequence&gt;
     &lt;xs:element name="dictionary" type="prov:IDRef"/&gt;
-    &lt;xs:element name="keyEntityPair type="prov:KeyEntityPair" maxOccurs="unbounded"/&gt;
+    &lt;xs:element name="keyEntityPair type="prov:KeyEntityPair" minOccurs=1 maxOccurs="unbounded"/&gt;
   &lt;/xs:sequence&gt;
 &lt;/xs:complexType&gt;
 </pre>
@@ -2511,7 +2509,7 @@
   &lt;xs:sequence&gt;
     &lt;xs:element name="newDictionary" type="prov:IDRef"/&gt;
     &lt;xs:element name="oldDictionary" type="prov:IDRef"/&gt;
-    &lt;xs:element name="keyEntityPair type="prov:KeyEntityPair" maxOccurs="unbounded"/&gt;
+    &lt;xs:element name="keyEntityPair type="prov:KeyEntityPair" minOccurs=1 maxOccurs="unbounded"/&gt;
     &lt;xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/&gt;
     &lt;xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/&gt;
     &lt;xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/&gt;
@@ -2573,7 +2571,7 @@
   &lt;xs:sequence&gt;
     &lt;xs:element name="newDictionary" type="prov:IDRef"/&gt;
     &lt;xs:element name="oldDictionary" type="prov:IDRef"/&gt;
-    &lt;xs:element name="key" type="xs:anySimpleType" maxOccurs="unbounded" /&gt;
+    &lt;xs:element name="key" type="xs:anySimpleType" minOccurs=1 maxOccurs="unbounded" /&gt;
     &lt;xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/&gt;
     &lt;xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/&gt;
     &lt;xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/&gt;
@@ -2671,15 +2669,20 @@
    <span class='conditional'>THEN</span> <span class="name">e1 = e2</span>
 </p></div>
 
-<p id="membership-insertion-membership-inference_text">If a dictionary was derived from another dictionary by an insertion, then the former holds all key-entity pairs of the latter, except those updated by the insertion.</p>
+<p id="membership-insertion-membership-inference_text">If a dictionary was derived from another dictionary by an insertion, then the former holds all key-entity pairs of the latter, except those updated by the insertion. 
+  Similarly, all members of a dictionary that was derived from another dictionary by an insertion were also members of the latter dictionary, except those added or updated by the insertion.</p>
 	 <div class='inference' id='membership-insertion-membership-inference'>
 	<span class='ruleTitle'><a class="internalDFN" href="#membership-insertion-membership-inference">Inference D4 (membership-insertion-membership)</a></span>
 <p>Here, KV1 is a set of key-entity pairs and K1 is the key-set of KV1.</p>
-  <p>
-<span class="conditional">IF</span>  <span class="name">prov:hadDictionaryMember(d1, e, k)</span>
+  <ol>
+<li><span class="conditional">IF</span>  <span class="name">prov:hadDictionaryMember(d1, e, k)</span>
    and <span class="name">prov:derivedByInsertionFrom(d2, d1, KV1)</span> and <span class="name">k</span> &notin; <span class="name">K1</span>
-   <span class='conditional'>THEN</span> <span class="name">prov:hadDictionaryMember(d2, e, k)</span>
-</p></div>
+   <span class='conditional'>THEN</span> <span class="name">prov:hadDictionaryMember(d2, e, k)</span></li>
+   
+<li><span class="conditional">IF</span>  <span class="name">prov:hadDictionaryMember(d2, e, k)</span>
+   and <span class="name">prov:derivedByInsertionFrom(d2, d1, KV1)</span> and <span class="name">k</span> &notin; <span class="name">K1</span>
+   <span class='conditional'>THEN</span> <span class="name">prov:hadDictionaryMember(d1, e, k)</span></li>
+  </ol></div>
 
 <p id="insertion-membership-inference_text">A dictionary that was derived by an insertion of key-entity pairs, holds all these specified key-entity pairs. This inference also means that Insertion provides an "update semantics" for the keys that are already present in a dictionary.</p>
 	 <div class='inference' id='insertion-membership-inference'>
@@ -2687,7 +2690,7 @@
  <p>Here, KV1 is a set of key-entity pairs.</p>
   <p>
 <span class="conditional">IF</span> <span class="name">prov:derivedByInsertionFrom(d2, d1, KV1)</span> 
-   <span class='conditional'>THEN</span> <span class="name">prov:hadDictionaryMember(d2, e, k) for each (e, k) &in; KV1</span>
+   <span class='conditional'>THEN</span> <span class="name">prov:hadDictionaryMember(d2, e, k) for each (k, e) &in; KV1</span>
 </p></div>
 
 <p id="insertion-derivation-inference_text">Insertion and removal are special cases of derivation.</p>
@@ -2724,7 +2727,7 @@
 </ol>
 </div>
   <div class="remark">
-  Note that this inference, together with constraints <a class="internalDFN" href="#impossible-removal-insertion-constraint">D9</a>, <a class="internalDFN" href="#impossible-insertion-insertion-constraint">D10</a> and <a class="internalDFN" href="#impossible-removal-removal-constraint">D11</a>, and the fact that an EmptyDictionary does not contain any key-entity pairs, guarantees <b>completeness</b> of a dictionary, if it can be traced back to an EmptyDictionary through insertions and removals.
+  Note that this inference, together with constraints <a class="internalDFN" href="#impossible-removal-insertion-constraint">D9</a>, <a class="internalDFN" href="#unique-insertion-constraint">D10</a> and <a class="internalDFN" href="#unique-removal-constraint">D11</a>, and the fact that an EmptyDictionary does not contain any key-entity pairs, guarantees <b>completeness</b> of a dictionary, if it can be traced back to an EmptyDictionary through insertions and removals.
   Here, completeness means that all key-entity pairs of the dictionary are known through a hadDictionaryMember statement.
 	  </div>
 
@@ -2747,26 +2750,28 @@
 	<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 D10 (impossible-removal-insertion)</a></span>
-  <p>Here, <span class="name">K1</span> is a set of keys and <span class="name">KV2</span> is a set of key-entity pairs.</p>
+  <p>Here, <span class="name">K0</span> is a set of keys and <span class="name">KV1</span> is a set of key-entity pairs.</p>
 <p>
-<span class="conditional">IF</span> <span class="name">prov:derivedByRemovalFrom(d2, d1, K1)</span> and 
-    <span class="name">prov:derivedByInsertionFrom(d2, d1, KV2)</span><span class='conditional'>THEN</span> <span
+<span class="conditional">IF</span> <span class="name">prov:derivedByRemovalFrom(d2, d0, K0)</span> and 
+    <span class="name">prov:derivedByInsertionFrom(d2, d1, KV1)</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 D11 (impossible-insertion-insertion)</a></span>
-<p>Here, <span class="name">KV1</span> and <span class="name">KV2</span> are sets of key-entity pairs.</p>
+<div class='constraint' id='unique-insertion-constraint'>
+	<span class='ruleTitle'><a class="internalDFN" href="#unique-insertion-constraint">Constraint D11 (unique-insertion)</a></span>
+<p>Here, <span class="name">KV0</span> and <span class="name">KV1</span> are sets of key-entity pairs.</p>
 <p>
-<span class="conditional">IF</span> <span class="name">prov:derivedByInsertionFrom(d2, d1, KV1)</span> and 
-    <span class="name">prov:derivedByInsertionFrom(d2, d1, KV2)</span><span class='conditional'>THEN</span> <span
+<span class="conditional">IF</span> <span class="name">prov:derivedByInsertionFrom(d2, d0, KV0)</span> and 
+    <span class="name">prov:derivedByInsertionFrom(d2, d1, KV1)</span><span class='conditional'>THEN</span> <span
+	 class="name">d0 = d1</span> and  <span
 	 class="name">KV1 = KV2</span>
 </p></div>
-<div class='constraint' id='impossible-removal-removal-constraint'>
-	<span class='ruleTitle'><a class="internalDFN" href="#impossible-removal-removal-constraint">Constraint D12 (impossible-removal-removal)</a></span>
-<p>Here, <span class="name">K1</span> and <span class="name">K2</span> are sets of keys.</p>
+<div class='constraint' id='unique-removal-constraint'>
+	<span class='ruleTitle'><a class="internalDFN" href="#unique-removal-constraint">Constraint D12 (unique-removal)</a></span>
+<p>Here, <span class="name">K0</span> and <span class="name">K1</span> are sets of keys.</p>
 <p>
-<span class="conditional">IF</span> <span class="name">prov:derivedByRemovalFrom(d2, d1, K1)</span> and 
-    <span class="name">prov:derivedByRemovalFrom(d2, d1, K2)</span><span class='conditional'>THEN</span> <span
+<span class="conditional">IF</span> <span class="name">prov:derivedByRemovalFrom(d2, d0, K0)</span> and 
+    <span class="name">prov:derivedByRemovalFrom(d2, d1, K1)</span><span class='conditional'>THEN</span> <span
+	 class="name">d0 = d1</span> and <span
 	 class="name">K1 = K2</span>
 </p></div>
 
@@ -2834,6 +2839,7 @@
 <section>
       <h3>Change Log Since First Public Working Draft</h3> 
 <ul>
+<li>Added the full title of the document.</li>
 <li>Added namespace and convention sections.</li>
 <li>Made <span class="name">prov:</span> prefix explicit.</li>
 <li>Changed all mentions of "key-value pair" to the more accurate "key-entity pair".</li>
--- a/xml/schema/prov-dictionary.xsd	Wed Apr 10 12:14:56 2013 +0200
+++ b/xml/schema/prov-dictionary.xsd	Wed Apr 10 16:26:05 2013 +0200
@@ -28,8 +28,8 @@
 	<!-- Key-Entity Pair -->
 	<xs:complexType name="KeyEntityPair">
         <xs:sequence>
+    	  <xs:element name="key" type="xs:anySimpleType" />
     	  <xs:element name="entity" type="prov:IDRef" />
-    	  <xs:element name="key" type="xs:anySimpleType" />
         </xs:sequence>
 	</xs:complexType>
 	
@@ -40,7 +40,7 @@
 	<xs:complexType name="DictionaryMembership">
 	  <xs:sequence>
 		<xs:element name="dictionary" type="prov:IDRef"/>
-		<xs:element name="keyEntityPair" type="prov:KeyEntityPair" maxOccurs="unbounded"/>
+		<xs:element name="keyEntityPair" type="prov:KeyEntityPair" minOccurs=1 maxOccurs="unbounded"/>
 	  </xs:sequence>
 	</xs:complexType>
 	
@@ -51,7 +51,7 @@
 	  <xs:sequence>
       <xs:element name="newDictionary" type="prov:IDRef"/>
       <xs:element name="oldDictionary" type="prov:IDRef"/>
-      <xs:element name="keyEntityPair" type="prov:KeyEntityPair" maxOccurs="unbounded"/>
+      <xs:element name="keyEntityPair" type="prov:KeyEntityPair" minOccurs=1 maxOccurs="unbounded"/>
       <!-- prov attributes -->
       <xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
@@ -67,7 +67,7 @@
 	  <xs:sequence>
       <xs:element name="newDictionary" type="prov:IDRef"/>
       <xs:element name="oldDictionary" type="prov:IDRef"/>
-      <xs:element name="key" type="xs:anySimpleType" maxOccurs="unbounded" />
+      <xs:element name="key" type="xs:anySimpleType" minOccurs=1 maxOccurs="unbounded" />
       <!-- prov attributes -->
       <xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>