--- a/ontology/prov-o-html-sections/description-collections.inc.html Mon Apr 16 13:28:58 2012 +0100
+++ b/ontology/prov-o-html-sections/description-collections.inc.html Mon Apr 16 14:40:37 2012 +0100
@@ -2,145 +2,98 @@
<!-- This section is version controlled at http://dvcs.w3.org/hg/prov/file/tip/ontology and mirroed to
https://github.com/timrdf/prov-lodspeakr/tree/master/components/services/prov-o -->
<h3>Collections Terms</h3>
- <p><em>
- A collection is an entity that provides a structure to some
- constituents, which are themselves entities. These constituents
- are said to be member of the collections.
- </em></p>
- <p>
- Conceptually, a collection has a logical structure consisting of
- key-value pairs. This structure is often referred to as a map, and is a
- generic indexing mechanisms that can abstract commonly used data
- structures, including associative lists (also known as "dictionaries" in
- some programming languages), relational tables, ordered lists, and more
- (the specification of such specialized structures in terms of key-value
- pairs is out of the scope of this document).
- </p>
- <p>
- A given collection forms a given structure for its members. A
- different structure (obtained either by insertion or removal of
- members) constitutes a different collection. Hence, for the
- purpose of provenance, a collection entity is viewed as a
- snapshot of a structure. Insertion and removal operations result
- in new snapshots, each snapshot forming an identifiable
- collection entity.
- </p>
- <p>
- In PROV-O, an entity is indicated to be a collection by using the
- subclass <a class="qname" href='#Collection'>prov:Collection</a>. Its subclass <a class="qname" href='#EmptyCollection'>prov:EmptyCollection</a> indicates
- that the collection has no members.
- Members of a collection are expressed through <a class="qname" href='#KeyValuePair'>prov:KeyValuePair</a>s.
- The members can be expressed explicitly using <a class="qname" href='#knownMembership'>prov:knownMembership</a>, and indirectly
- through a series of collection derivations of insertions and
- removals, using <a class="qname" href='#derivedByInsertionFrom'>prov:derivedByInsertionFrom</a>
- and <a class="qname" href='#derivedByRemovalFrom'>prov:derivedByRemovalFrom</a>.
- </p>
- <p>
- To specify the key-value pairs inserted,
- <span class="repeated">prov:derivedByInsertionFrom</span> must be qualified using <a class="qname" href='#qualifiedInsertion'>prov:qualifiedInsertion</a> to a
- <a class="qname" href='#Insertion'>Insertion</a>, which indicates the pairs
- using <a class="qname" href='#inserted'>prov:inserted</a> to some <a class="qname" href='#KeyValuePair'>prov:KeyValuePair</a>. Its <a class="qname" href='#key'>prov:key</a> is any RDF literal, while the <a class="qname" href='#value'>prov:value</a> is a <a class="qname" href='#Entity'>prov:Entity</a>.
- Likewise, removal are qualified using <a class="qname" href='#qualifiedRemoval'>prov:qualifiedRemoval</a> to a <a class="qname" href='#Removal'>Removal</a>, which <a class="qname" href='#removedKey'>prov:removedKey</a>
- points to the removed key. <span class="repeated">prov:Insertion</span>,
- <span class="repeated">prov:Removal</span> and <span class="repeated">prov:Membership</span> can have
- custom properties and identifiers, as described in PROV-DM.
- </p>
- <div class="exampleOuter">
- <p>
- The example below shows how
- <code>:c</code> and <code>:c1</code> are
- collections. <code>:c</code> is empty, while <code>:c1</code>
- is derived by inserting the key-value pairs <code>{("k1", :e1),
- ("k2", :e2)}</code>.</p>
- <pre class="example">
-@prefix prov: <http://www.w3.org/ns/prov#> .
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@prefix : <http://example.org/> .
+ <p> A <code><a class="qname"
+href='#Collection'>prov:Collection</a></code> is an <code
+class="repeated">prov:Entity</code> that acts as a container to some members,
+which are themselves entities.
+Specifically, a collection is composed of set of key-value pairs, where a
+literal key is used to identify a constituent entity within the collection.
+
+To illustrate this, the example below describes a collection <code>:c1</code>
+that has as members the two key value pairs <code>("k1", :e1)</code>
+and <code>("k2", :e2)</code>.
+</p>
+
+<pre class="example">
+@prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+:e1 a prov:Entity .
+:e2 a prov:Entity .
+:c1 a prov:Collection ;
+ prov:knownMembership [ a prov:Membership ;
+ prov:member [ a prov:KeyValuePair ;
+ prov:key "k1"^^xsd:string ;
+ prov:value :e1
+ ] , [ a prov:KeyValuePair;
+ prov:key "k2"^^xsd:string ;
+ prov:value :e2
+ ]
+ ] .
+</pre>
+
+<p>It is worth noting that <code>:c1</code> MAY also
+have other members (i.e. <code class="repeated">prov:knownMembership</code> is
+not functional). A collection MAY be empty and thus not have any known
+memberships, in which case it SHOULD be described as an instance of the
+subclass <a class="qname"
+href='#EmptyCollection'><code>prov:EmptyCollection</code></a>.
+</p>
+
+ <p> To describe the provenance of a collection, PROV-O provides two
+kinds of involvements: <code><a class="qname"
+href="qualifiedInsertion">prov:qualifiedInsertion</a></code> is used to
+describe that a collection was obtained from an existing collection by
+<em>inserting</em> a set of key-value pairs. <code><a class="qname"
+href="qualifiedRemoval">prov:qualifiedRemoval</a></code> is used to specify
+that a given collection was obtained from an existing collection by
+<em>removing</em> a set of key-value pairs. The example below specifies that
+the collection <code>:c1</code> was obtained from the empty collection
+<code>:c1</code> by <em>inserting</em> the key-value pairs <code>("k1",
+:e1)</code> and <code>("k2", :e2)</code>.
+</p>
+
+<pre class="example">
+@prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
:e1 a prov:Entity .
:e2 a prov:Entity .
:c a prov:EmptyCollection .
-
-:c1 a prov:Collection;
- prov:derivedByInsertionFrom :c;
- prov:qualifiedInsertion [
- a prov:Insertion;
- prov:collection :c;
- prov:inserted [
- a prov:KeyValuePair;
- prov:key "k1"^^xsd:string;
- prov:value :e1;
- ], [
- a prov:KeyValuePair;
- prov:key "k2"^^xsd:string;
- prov:value :e2;
- ];
- ];
-.
- </pre>
- </div>
-
-
-
-
- <div class="exampleOuter">
- <p>
- The following example shows how <code>:c3</code> has been derived from
- <code>:c2</code>, whose content is not asserted. The keys
- <code>"k1"</code> and <code>"k3"</code> and their corresponding
- values have been removed in <code>:c3</code>.
- </p>
- <pre class="example">
-@prefix prov: <http://www.w3.org/ns/prov#> .
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@prefix : <http://example.org/> .
-
-:c2 a prov:Collection .
+:c1 a prov:Collection .
+ prov:derivedByInsertionFrom :c ;
+ prov:qualifiedInsertion [ a prov:Insertion ;
+ prov:collection :c ;
+ prov:inserted [ a prov:KeyValuePair ;
+ prov:key "k1"^^xsd:string ;
+ prov:value :e1 ;
+ ], [ a prov:KeyValuePair ;
+ prov:key "k2"^^xsd:string ;
+ prov:value :e2 ;
+ ]
+ ] .
+</pre>
-:c3 a prov:Collection;
- prov:derivedByRemovalFrom :c2;
- prov:qualifiedRemoval [
- a prov:Removal;
- prov:collection :c2;
- prov:removed "k1"^^xsd:string,
- "k3"^^xsd:string;
- ];
-.
- </pre>
- </div>
-
-
-
-
+ <p>
+ Similarly, the example below specifies that the collection
+ <code>:c3</code> was obtained by <em>removing</em> the key-value pairs associated with
+ the keys <code>"k1"</code> and <code>"k2"</code> from the collection
+ <code>:c2</code>. Thus, <code>:c3</code> does not contain the
+ members <code>("k1", :e1)</code> and <code>("k2",
+ :e2(</code> from <code>:c2</code>.
+ </p>
- <div class="exampleOuter">
- <p>
- The next example shows how the members of
- <code>:c1</code> has been described as the key-value
- pairs <code>{("k1", :e1), ("k2", :e2)}</code>. Note that this
- assertion does not claim there are not other members.
- </p>
- <pre class="example">
-@prefix prov: <http://www.w3.org/ns/prov#> .
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@prefix : <http://example.org/> .
+<pre class="example">
+@prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-:c1
- prov:knownMembership [
- a prov:Membership;
- prov:member [
- a prov:KeyValuePair;
- prov:key "k1"^^xsd:string;
- prov:value :e1
- ], [
- a prov:KeyValuePair;
- prov:key "k2"^^xsd:string;
- prov:value :e2
- ]
- ];
-.
- </pre>
- </div>
-
+:c2 a prov:Collection .
+:c3 a prov:Collection .
+ prov:derivedByRemovalFrom :c2 ;
+ prov:qualifiedRemoval [ a prov:Removal ;
+ prov:collection :c2 ;
+ prov:removed "k1"^^xsd:string, "k3"^^xsd:string
+ ] .
+</pre>
</section>