--- a/examples/eg-20-collections-exercise/rdf/eg-20-collections-exercise.ttl Mon Apr 02 11:25:43 2012 +0100
+++ b/examples/eg-20-collections-exercise/rdf/eg-20-collections-exercise.ttl Mon Apr 02 11:25:57 2012 +0100
@@ -8,6 +8,7 @@
@prefix void: <http://rdfs.org/ns/void#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix ex: <http://example.com/>
@prefix : <http://dvcs.w3.org/hg/prov/raw-file/tip/examples/eg-20-collections-exercise/rdf/eg-20-collections-exercise.ttl#> .
### already in prov, added to test OWL profile ###
@@ -52,12 +53,16 @@
rdfs:domain prov:Insertion ;
rdfs:range prov:KeyValuePair .
-prov:value a owl:ObjectProperty ;
+prov:value a owl:ObjectProperty, owl:FunctionalProperty ;
rdfs:domain prov:KeyValuePair ;
rdfs:range prov:Entity .
-prov:knownMember a owl:ObjectProperty ;
+prov:knownMembership a owl:ObjectProperty ;
rdfs:domain prov:Collection ;
+ rdfs:range prov:Membership .
+
+prov:member a owl:ObjectProperty ;
+ rdfs:domain prov:Membership ;
rdfs:range prov:KeyValuePair .
prov:derivedByInsertionFrom a owl:ObjectProperty ;
@@ -82,10 +87,10 @@
### datatype properties ###
-prov:key a owl:DatatypeProperty ;
+prov:key a owl:DatatypeProperty, owl:FunctionalProperty ;
rdfs:domain prov:KeyValuePair .
-prov:removed a owl:DatatypeProperty ;
+prov:removedKey a owl:DatatypeProperty ;
rdfs:domain prov:Removal .
### examples ###
@@ -150,7 +155,7 @@
prov:qualifiedRemoval
[ a prov:Removal ;
prov:collection :c2 ;
- prov:removed "k1"^^xsd:string, "k3"^^xsd:string
+ prov:removedKey "k1"^^xsd:string, "k3"^^xsd:string
] .
@@ -158,13 +163,13 @@
# memberOf(c1, {("k1", e1), ("k2", e2)} )
-:c1 prov:knownMember
- [ a prov:KeyValuePair;
- prov:key "k1"^^xsd:string ;
- prov:value :e1
- ] ,
- [ a prov:KeyValuePair;
+: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
- ] .
+ ] .
+
--- a/ontology/ProvenanceOntology.owl Mon Apr 02 11:25:43 2012 +0100
+++ b/ontology/ProvenanceOntology.owl Mon Apr 02 11:25:57 2012 +0100
@@ -382,26 +382,24 @@
- <!-- http://www.w3.org/ns/prov#keyValuePair -->
+ <!-- http://www.w3.org/ns/prov#knownMembership -->
- <owl:ObjectProperty rdf:about="&prov;keyValuePair">
+ <owl:ObjectProperty rdf:about="&prov;knownMembership">
<prov:component>collections</prov:component>
<prov:category>collections</prov:category>
- <rdfs:domain rdf:resource="&prov;KeyValueInvolvement"/>
- <rdfs:range rdf:resource="&prov;KeyValuePair"/>
+ <rdfs:domain rdf:resource="&prov;Collection"/>
+ <rdfs:range rdf:resource="&prov;Membership"/>
</owl:ObjectProperty>
- <!-- http://www.w3.org/ns/prov#knownMember -->
+ <!-- http://www.w3.org/ns/prov#member -->
- <owl:ObjectProperty rdf:about="&prov;knownMember">
+ <owl:ObjectProperty rdf:about="&prov;member">
+ <prov:component>collections</prov:component>
<prov:category>collections</prov:category>
- <prov:component>collections</prov:component>
- <rdfs:domain rdf:resource="&prov;Collection"/>
<rdfs:range rdf:resource="&prov;KeyValuePair"/>
- <rdfs:subPropertyOf rdf:resource="&prov;involved"/>
- <prov:qualifiedForm rdf:resource="&prov;qualifiedMember"/>
+ <rdfs:domain rdf:resource="&prov;Membership"/>
</owl:ObjectProperty>
@@ -501,18 +499,6 @@
- <!-- http://www.w3.org/ns/prov#qualifiedMember -->
-
- <owl:ObjectProperty rdf:about="&prov;qualifiedMember">
- <prov:component>collections</prov:component>
- <prov:category>collections</prov:category>
- <rdfs:domain rdf:resource="&prov;Collection"/>
- <rdfs:range rdf:resource="&prov;Member"/>
- <prov:unqualifiedForm rdf:resource="&prov;knownMember"/>
- </owl:ObjectProperty>
-
-
-
<!-- http://www.w3.org/ns/prov#qualifiedQuotation -->
<owl:ObjectProperty rdf:about="&prov;qualifiedQuotation">
@@ -1248,15 +1234,6 @@
- <!-- http://www.w3.org/ns/prov#KeyValueInvolvement -->
-
- <owl:Class rdf:about="&prov;KeyValueInvolvement">
- <rdfs:subClassOf rdf:resource="&prov;Involvement"/>
- <prov:unqualifiedForm rdf:resource="&prov;qualifiedMember"/>
- </owl:Class>
-
-
-
<!-- http://www.w3.org/ns/prov#KeyValuePair -->
<owl:Class rdf:about="&prov;KeyValuePair">
@@ -1279,10 +1256,9 @@
- <!-- http://www.w3.org/ns/prov#Member -->
+ <!-- http://www.w3.org/ns/prov#Membership -->
- <owl:Class rdf:about="&prov;Member">
- <rdfs:subClassOf rdf:resource="&prov;KeyValuePair"/>
+ <owl:Class rdf:about="&prov;Membership">
<prov:category>collections</prov:category>
<prov:component>collections</prov:component>
<prov:unqualifiedForm rdf:resource="&prov;knownMember"/>
--- a/ontology/prov-o-html-sections/description-collections.inc.html Mon Apr 02 11:25:43 2012 +0100
+++ b/ontology/prov-o-html-sections/description-collections.inc.html Mon Apr 02 11:25:57 2012 +0100
@@ -2,6 +2,130 @@
<!-- 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</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 href='#Collection'>prov:Collection</a>. Its subclass <a
+ href='#EmptyCollection'>prov:EmptyCollection</a> indicates
+ that the collection has no members.
+ Members of a collection are expressed through <a
+ href='#KeyValuePair'>prov:KeyValuePair</a>s.
+ The members can be expressed explicitly using <a
+ href='#knownMembership'>prov:knownMembership</a>, and indirectly
+ through a series of collection derivations of insertions and
+ removals, using <a
+ href='#derivedByInsertionFrom'>prov:derivedByInsertionFrom</a>
+ and <a
+ href='#derivedByRemovalFrom'>prov:derivedByRemovalFrom</a>.
+ </p>
+ <p>
+ To specify the key-value pairs inserted,
+ <code>prov:derivedByInsertionFrom</code> must be qualified using <a
+ href='#qualifiedInsertion'>prov:qualifiedInsertion</a> to a
+ <a href='#Insertion'>Insertion</a>, which indicates the pairs
+ using <a href='#inserted'>prov:inserted</a> to some <a
+ href='#KeyValuePair'>prov:KeyValuePair</a>. Its <a
+ href='#key'>prov:key</a> is any RDF literal, while the <a
+ href='#value'>prov:value</a> is a <a
+ href='#Entity'>prov:Entity</a>.
+ Likewise, removal are qualified using <a
+ href='#qualifiedRemoval'>prov:qualifiedRemoval</a> to a <a
+ href='#Removal'>Removal</a>, which <a
+ href='#removedKey'>prov:removedKey</a>
+ points to the removed key. <code>prov:Insertion</code>,
+ <code>prov:Removal</code> and <code>prov:Membership</code> can have
+ custom properties and identifiers, as described in PROV-DM.
+ </p>
+ <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>
+ <div class="anExample">
+ <pre>
+@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>
+ <p>
+ The following example shows how <code>:c3</code> has been derived from
+ <code>:c2</code>, which 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>
+ <div class="anExample">
+ <pre>
+@prefix prov: <http://www.w3.org/ns/prov#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+: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>
+ </div>
+ <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>
+ <div class="anExample">
+ <pre>
+@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>
+
</section>