Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.
Provenance is information about entities, activities, and people involved in producing a piece of data or thing, which can be used to form assessments about its quality, reliability or trustworthiness. This document describes extensions to PROV to facilitate the modeling of provenance for dictionary data structures. [PROV-DM] specifies a Collection as an entity that provides a structure to some constituents, which are themselves entities. However, some applications may need a mechanism to specify more structure to a Collection, in order to accurately describe its provenance. Therefore, in this document, we introduce Dictionary, a specific type of Collection with a logical structure consisting of key-value pairs.
The PROV Document Overview describes the overall state of PROV, and should be read before other PROV documents.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This document was published by the Provenance Working Group as a First Public Working Draft. If you wish to make comments regarding this document, please send them to public-prov-comments@w3.org (subscribe, archives). All comments are welcome.
Publication as a First Public Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. The group does not expect this document to become a W3C Recommendation. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
Provenance is a record that describes the people, institutions, entities, and activities involved in producing, influencing, or delivering a piece of data or a thing. The specifications [PROV-O], [PROV-DM], [PROV-N], and [PROV-XML] have respectively defined the PROV ontology, the PROV conceptual model, the PROV notation, and the PROV XML schema, allowing provenance descriptions to be expressed, represented in various representations, and interchanged between systems across the Web.
[PROV-DM] specifies Collection as an entity that provides a structure to some constituents, which are themselves entities. However, some applications may need a mechanism to specify more structure to a Collection, in order to accurately describe its provenance.
Therefore, this document introduces a new concept, Dictionary, that has a logical structure consisting of key-entity pairs.
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.
Conceptually, a dictionary has a logical structure consisting of key-value pairs. This structure is often referred to as a map, and is a generic indexing mechanism that can abstract commonly used data structures, including associative lists, relational tables, ordered lists, and more. This document provides a mechanism to assert the provenance for these types of data structures, in the most general way, as a collection of key-value pairs, modified through insertions and deletions. Any more specialized structures can be modeled to some extent in terms of these key-value pairs. Here, we will discuss the provenance of dictionaries structured in terms of key-value pairs. However, how this key-value pair structure is translated to more specialized data structures, is beyond the scope of this document.
In this document, a dictionary is viewed as a snapshot of a data structure with key-value pairs, following a sequence of state-changing insertion and removal operations. These operations result in new snapshots, each snapshot forming a distinct and identifiable dictionary entity. Thus, when the structure of a dictionary changes (through insertions or removals), a new dictionary entity is defined, whereas the older dictionary entity remains the same.
Following the earlier definitions for generic collections, PROV-Dictionary defines the following types related to dictionaries:
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 prov:type prov:EmptyCollection is used.
entity(d0, [prov:type='prov:EmptyDictionary' ]) // d0 is an empty dictionary entity(d1, [prov:type='prov:Dictionary' ]) // d1 is a dictionary, with (so far) unknown content
Similar to the collection membership relation, the dictionary membership allows stating the members of a Dictionary. However, it provides additional structure. Note that dictionary membership implies collection membership, but not vice versa. This implication is formalized in Inference D1.
Keys cannot be repeated in the same dictionary. However, a dictionary can contain the same entity more than once, as long as it is associated with different keys.
Note that the collection membership relation, written hadMember(c, e), can be used when c has prov:type = 'prov:Collection' or prov:type = 'prov:Dictionary'. However, the dictionary membership, written hadDictionaryMember(d, e, "k"), can only be used when d has prov:type = 'prov:Dictionary'.
entity(d, [prov:type='prov:Dictionary' ]) // d1 is a dictionary, with (so far) unknown content entity(e1) entity(e2) hadDictionaryMember(d, e1, "k1") hadDictionaryMember(d, e2, "k2")From these descriptions, we conclude:
Thus, the membership of d is only partially known, unless it was derived through insertions and removals from an empty dictionary (See Completeness constraints).
An Insertion ◊ relation, written derivedByInsertionFrom(id; d2, d1, {(key_1, e_1), ..., (key_n, e_n)}, attrs), has:
An Insertion relation derivedByInsertionFrom(id; d2, d1, {(key_1, e_1), ..., (key_n, e_n)}) states that d2 is the dictionary following the insertion of pairs (key_1, e_1), ..., (key_n, e_n) into dictionary d1. Note that insertion and the specified key-entity-set are 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 Inference D7.
entity(d0, [prov:type='prov:EmptyDictionary' ]) // d0 is an empty dictionary entity(e1) entity(e2) entity(e3) entity(d1, [prov:type='prov:Dictionary' ]) entity(d2, [prov:type='prov:Dictionary' ]) derivedByInsertionFrom(d1, d0, {("k1", e1), ("k2", e2)}) derivedByInsertionFrom(d2, d1, {("k3", e3)}, [ dcterms:description ="A second insertion" ]) //an insertion with optional attribute dcterms:descriptionFrom this set of descriptions, we conclude:
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.
entity(d0, [prov:type='prov:EmptyDictionary' ]) // d0 is an empty dictionary entity(e1) entity(e2) entity(e3) entity(d1, [prov:type='prov:Dictionary' ]) entity(d2, [prov:type='prov:Dictionary' ]) derivedByInsertionFrom(d1, d0, {("k1", e1), ("k2", e2)}) derivedByInsertionFrom(d2, d1, {("k1", e3)})This is a case of update of e1 to e3 for the same key, "k1".
A Removal ◊ relation, written derivedByRemovalFrom(id; d2, d1, {key_1, ... key_n}, attrs), has:
A Removal relation derivedByRemovalFrom(id; d2,d1, {key_1, ..., key_n}) states that d2 is the dictionary following the removal of the set of pairs corresponding to keys key_1...key_n from d1. If a key that is not present in the dictionary is removed, the dictionary remains unchanged. Note that removal and the specified key-set are 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 Inference D7.
entity(d0, [prov:type="prov:EmptyDictionary"]) // d0 is an empty dictionary entity(e1) entity(e2) entity(e3) entity(d1, [prov:type="prov:Dictionary"]) entity(d2, [prov:type="prov:Dictionary"]) entity(d3, [prov:type="prov:Dictionary"]) entity(d4, [prov:type="prov:Dictionary"]) derivedByInsertionFrom(d1, d0, {("k1", e1), ("k2",e2)}) derivedByInsertionFrom(d2, d1, {("k3", e3)}) derivedByRemovalFrom(d3, d2, {"k1", "k3"}) derivedByRemovalFrom(d4, d3, {"k1"})From this set of descriptions, we conclude:
entityExpression
with attribute
prov:type='prov:Dictionary'
, or
prov:type='prov:EmptyDictionary'
, respectively.
The following two expressions are about a dictionary and an empty dictionary, respectively.
entity(ex:d1, [ prov:type='prov:Dictionary' ]) entity(ex:d2, [ prov:type='prov:EmptyDictionary' ])
The following table summarizes how each constituent of a PROV-DM Membership maps to a non-terminal.
Dictionary Membership | Non-Terminal |
dictionary | dIdentifier |
entity | eIdentifier |
key | key |
In this example, d is a dictionary known to have e0 as member, and may have other members.
entity(e0) entity(d, [prov:type='prov:Dictionary' ]) hadDictionaryMember(d, e0, "k0")
The following table summarizes how each constituent of a PROV-Dictionary Insertion maps to a non-terminal.
Insertion | Non-Terminal |
id | optionalIdentifier |
after | dIdentifier |
before | dIdentifier |
key-value-pairs | keyValuePairs |
attributes | optionalAttributeValuePairs |
derivedByInsertionFrom(id; d1, d, {("k1", e1), ("k2", e2)}, [])
Here id is the optional insertion identifier, d1 is the identifier for the dictionary after the insertion, d is the identifier for the dictionary before the insertion, {("k1", e1), ("k2", e2)} is the set of key-entity pairs that have been inserted in d, and [] is the optional (empty) set of attributes.
The remaining examples show cases where some of the optionals are omitted.derivedByInsertionFrom(d1, d, {("k1", e1), ("k2", e2)}) derivedByInsertionFrom(d1, d, {("k1", e1)}) derivedByInsertionFrom(d1, d, {("k1", e1), ("k2", e2)}, [])
The following table summarizes how each constituent of a PROV-Dictionary Removal maps to a non-terminal.
Removal | Non-Terminal |
id | optionalIdentifier |
after | dIdentifier |
before | dIdentifier |
key-set | keySet |
attributes | optionalAttributeValuePairs |
derivedByRemovalFrom(id; d3, d, {"k1", "k2"}, [])
Here id is the optional removal identifier, d1 is the identifier for the collection after the removal, d is the identifier for the collection before the removal, {"k1", "k2"} is the set of keys that have been removed from d, and [] is the optional (empty) set of attributes.
The remaining examples show cases where some of the optionals are omitted.derivedByRemovalFrom(d2, d, {"k1", "k2"}) derivedByRemovalFrom(d2, d, {"k1"}) derivedByRemovalFrom(d2, d, {"k1", "k2"}, [])
dIdentifier ::= identifier
key ::= literal
keyValuePairs ::= keyValuePair , keyValuePair
keyValuePair ::= ( key , eIdentifier )
In this section, the ontological definition of prov:Dictionary
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].
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 <http://www.w3.org/ns/prov#>
, which includes all extensions, including PROV-Dictionary, or if they wish to have only [PROV-O] terms, they can import <http://www.w3.org/ns/prov-o#>
. Similarly, <http://www.w3.org/ns/prov-dictionary#>
holds only the PROV-Dictionary terms.
The [OWL file for PROV-Dictionary] is available for download. (Note that this file is unfinished at the time of this working draft, and may be subject to change.)
A prov:Dictionary
is a prov:Entity
that acts as a container to some members,
which are themselves entities.
Specifically, a dictionary is composed of set of key-value pairs, where a
literal key is used to identify a constituent entity within the dictionary.
@prefix prov: <http://www.w3.org/ns/prov#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix : <http://example.org/> . :e1 a prov:Entity . :e2 a prov:Entity . :d1 a prov:Dictionary; prov:hadDictionaryMember [ a prov:KeyValuePair; prov:pairKey "k1"^^xsd:string; prov:pairValue :e1 ], [ a prov:KeyValuePair; prov:pairKey "k2"^^xsd:string; prov:pairValue :e2 ]; .
It is worth noting that :d1
may also
have other members. If one wants to explicitly state that a dictionary has no members, that dictionary can be described as an instance of the
subclass prov:EmptyDictionary
.
To describe the provenance of a dictionary, PROV-Dictionary provides two
kinds of influence: prov:qualifiedInsertion
is used to
describe that a dictionary was obtained from an existing dictionary by
inserting a set of key-value pairs. prov:qualifiedRemoval
is used to specify
that a given dictionary was obtained from an existing dictionary by
removing a set of key-value pairs. The example below specifies that
the dictionary :d1
was obtained from the empty dictionary
:d
by inserting the key-value pairs ("k1",
:e1)
and ("k2", :e2)
.
@prefix prov: <http://www.w3.org/ns/prov#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix : <http://example.org/> . :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; ]; ]; .
Similarly, the example below specifies that the dictionary
:d3
was obtained by removing the key-value pairs associated with
the keys "k1"
and "k2"
from the dictionary
:d2
. Thus, :d3
does not contain the
members ("k1", :e1)
and ("k2",
:e2)
from :d2
.
@prefix prov: <http://www.w3.org/ns/prov#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix : <http://example.org/> . :d2 a prov:Dictionary . :d3 a prov:Dictionary; prov:derivedByRemovalFrom :d2; prov:qualifiedRemoval [ a prov:Removal; prov:dictionary :d2; prov:removedKey "k1"^^xsd:string, "k3"^^xsd:string; ]; .
These terms are used to describe the provenance of dictionaries.
IRI:http://www.w3.org/ns/prov#Dictionary
A dictionary is an entity that provides a structure to some constituents, which are themselves entities. These constituents are said to be member of the dictionary.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix my: <http://example.org/ontology#> . @prefix dcterms: <http://purl.org/dc/terms/> . @prefix : <http://example.org/> . :seating_chart_2012 a prov:Dictionary, prov:Collection, prov:Entity, my:SeatingChart; prov:derivedByInsertionFrom :seating_chart_2011; dcterms:date "2012"; my:hasTotalStudents 45; .
This concept allows for the provenance of the dictionary, but also of its constituents to be expressed. Such a notion of dictionary corresponds to a wide variety of concrete data structures, such as a maps or associative arrays.
A given dictionary forms a given structure for its members. A different structure (obtained either by insertion or removal of members) constitutes a different dictionary.
IRI:http://www.w3.org/ns/prov#EmptyDictionary
@prefix prov: <http://www.w3.org/ns/prov#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix : <http://example.org/> . :e1 a prov:Entity . :e2 a prov:Entity . :d a prov:EmptyDictionary .
An empty dictionary (i.e. has no members).
IRI:http://www.w3.org/ns/prov#Insertion
Insertion is a derivation that transforms a dictionary into another, by insertion of one or more key-value pairs.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix : <http://example.com/> . :our-NEW-baseball-team-field-positions a prov:Dictionary, :FieldPositions; prov:derivedByInsertionFrom :our-old-baseball-team-field-positions; prov:qualifiedInsertion [ a prov:Insertion; prov:dictionary :our-old-baseball-team-field-positions; prov:insertedKeyValuePair [ a prov:KeyValuePair; prov:pairKey "first-baseman"^^xsd:string; prov:pairValue <http://dbpedia.org/resource/Jim_Thorpe>; ]; ]; . <http://dbpedia.org/resource/Jim_Thorpe> a prov:Entity . :our-old-baseball-team-field-positions a prov:Dictionary .
Insertion is a derivation that transforms a dictionary into another, by insertion of one or more key-value pairs.
IRI:http://www.w3.org/ns/prov#KeyValuePair
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix : <http://example.com/> . :our-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 .
A key-value pair. Part of a prov:Dictionary through prov:hadDictionaryMember. The key is any RDF Literal, the value is a prov:Entity.
IRI:http://www.w3.org/ns/prov#Removal
Removal is a derivation that transforms a dictionary into another, by removing one or more key-value pairs.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix : <http://example.com/> . :d1 a prov:Dictionary . :d2 a prov:Dictionary, prov:Entity; prov:derivedByRemovalFrom :d1; prov:qualifiedRemoval [ a prov:Removal, prov:DictionaryInvolvement; prov:dictionary :d1; prov:removedKey "k1"^^xsd:string, "k2"^^xsd:string; ]; .
Removal is a derivation that transforms a dictionary into another, by removing one or more key-value pairs specified by prov:removedKey.
IRI:http://www.w3.org/ns/prov#derivedByInsertionFrom
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix : <http://example.com/> . :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; ]; ]; .
IRI:http://www.w3.org/ns/prov#derivedByRemovalFrom
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix : <http://example.com/> . :d1 a prov:Dictionary . :d2 a prov:Dictionary, prov:Entity; prov:derivedByRemovalFrom :d1; prov:qualifiedRemoval [ a prov:Removal; prov:dictionary :d1; prov:removedKey "k1"^^xsd:string, "k2"^^xsd:string; ]; .
The dictionary was derived from the other by removal. prov:qualifiedRemoval shows details of the removal, in particular the removed key-value pairs.
IRI:http://www.w3.org/ns/prov#dictionary
@prefix prov: <http://www.w3.org/ns/prov#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix : <http://example.org/> . :e1 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; ]; ]; .
The property used by a prov:Insertion and prov:Removal to cite the prov:Dictionary that was prov:derivedByInsertionFrom or prov:derivedByRemovalFrom another dictionary.
IRI:http://www.w3.org/ns/prov#insertedKeyValuePair
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix : <http://example.com/> . :our-NEW-baseball-team-field-positions a prov:Dictionary, :FieldPositions; prov:derivedByInsertionFrom :our-old-baseball-team-field-positions; prov:qualifiedInsertion [ a prov:Insertion; prov:dictionary :our-old-baseball-team-field-positions; prov:insertedKeyValuePair [ a prov:KeyValuePair; prov:pairKey "first-baseman"^^xsd:string; prov:pairValue <http://dbpedia.org/resource/Jim_Thorpe>; ]; ]; . <http://dbpedia.org/resource/Jim_Thorpe> a prov:Entity . :our-old-baseball-team-field-positions a prov:Dictionary .
An object property to refer to the prov:KeyValuePair inserted into a prov:Dictionary.
IRI:http://www.w3.org/ns/prov#hadDictionaryMember
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix : <http://example.com/> . :our-old-baseball-team-field-positions a prov:Dictionary, :FieldPositions; prov:hadDictionaryMember [ a prov:KeyValuePair; prov:pairKey "first-baseman"^^xsd:string; prov:pairValue :george; ], [ a prov:KeyValuePair; prov:pairKey "pitcher"^^xsd:string; prov:pairValue :carl; ]; . :george a prov:Entity . :carl a prov:Entity .
Describes the key-value pair that was member of a prov:Dictionary. A dictionary can have multiple members.
IRI:http://www.w3.org/ns/prov#pairKey
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix : <http://example.com/> . :our-old-baseball-team-field-positions a prov:Dictionary, :FieldPositions; prov:hadDictionaryMember [ a prov:KeyValuePair; prov:pairKey "first-baseman"^^xsd:string; prov:pairValue :george; ], [ a prov:KeyValuePair; prov:pairKey "pitcher"^^xsd:string; prov:pairValue :carl; ]; . :george a prov:Entity . :carl a prov:Entity .
The key of a KeyValuePair, which is an element of a prov:Dictionary.
has characteristics Functional
IRI:http://www.w3.org/ns/prov#pairValue
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix : <http://example.com/> . :our-old-baseball-team-field-positions a prov:Dictionary, :FieldPositions; prov:hadDictionaryMember [ a prov:KeyValuePair; prov:pairKey "first-baseman"^^xsd:string; prov:pairValue :george; ], [ a prov:KeyValuePair; prov:pairKey "pitcher"^^xsd:string; prov:pairValue :carl; ]; . :george a prov:Entity . :carl a prov:Entity .
IRI:http://www.w3.org/ns/prov#qualifiedInsertion
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix : <http://example.com/> . :our-NEW-baseball-team-field-positions a prov:Dictionary, :FieldPositions; prov:derivedByInsertionFrom :our-old-baseball-team-field-positions; prov:qualifiedInsertion [ a prov:Insertion; prov:dictionary :our-old-baseball-team-field-positions; prov:insertedKeyValuePair [ a prov:KeyValuePair; prov:pairKey "first-baseman"^^xsd:string; prov:pairValue <http://dbpedia.org/resource/Jim_Thorpe>; ]; ]; . <http://dbpedia.org/resource/Jim_Thorpe> a prov:Entity . :our-old-baseball-team-field-positions a prov:Dictionary, :FieldPositions .
The dictionary was derived from the other by insertion. prov:qualifiedInsertion shows details of the insertion, in particular the inserted key-value pairs.
IRI:http://www.w3.org/ns/prov#qualifiedRemoval
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix : <http://example.com/> . :d1 a prov:Dictionary . :d2 a prov:Dictionary, prov:Entity; prov:derivedByRemovalFrom :d1; prov:qualifiedRemoval [ a prov:Removal; prov:dictionary :d1; prov:removedKey "k1"^^xsd:string, "k2"^^xsd:string; ]; .
The dictionary was derived from the other by removal. prov:qualifiedRemoval shows details of the removal, in particular the removed keys.
IRI:http://www.w3.org/ns/prov#removedKey
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix : <http://example.com/> . :d2 a prov:Dictionary, prov:Entity; prov:derivedByRemovalFrom :d1; prov:qualifiedRemoval [ a prov:Removal, prov:DictionaryInvolvement; prov:dictionary :d1; prov:removedKey "k1"^^xsd:string, 1337, 3.14; ]; .
The key removed in a Removal.
To specialize an Entity as a Dictionary, include a prov:type
with the value "prov:Dictionary".
An EmptyDictionary is asserted with the prov:type
"prov:EmptyDictionary" and denotes a Dictionary with no members.
<prov:document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:prov="http://www.w3.org/ns/prov#" xmlns:ex="http://example.com/ns/ex#"> <!-- d0 is an empty dictionary --> <prov:entity prov:id="d0"> <prov:type xsi:type="xsd:QName">prov:EmptyDictionary</prov:type> </prov:entity> <!-- d1 is a dictionary, with (so far) unknown content --> <prov:entity prov:id="d1"> <prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type> </prov:entity> </prov:document>
Key-value pairs are used to identify the members of a dictionary.
<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="KeyValuePair" > <xs:element name="entity" type="prov:IDRef" /> <xs:element name="key" type="xs:anySimpleType" /> </xs:complexType>
<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="keyValuePair" type="prov:KeyValuePair"/>
<prov:document> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:prov="http://www.w3.org/ns/prov#" xmlns:ex="http://example.com/ns/ex#"> <prov:entity prov:id="e0"/> <prov:entity prov:id="e1"/> <prov:keyValuePair> <prov:entity prov:ref="e0"/> <prov:key>k0</prov:key> </prov:keyValuePair> <prov:keyValuePair> <prov:entity prov:ref="e1"/> <prov:key>k1</prov:key> </prov:keyValuePair> </prov:document>
The members of a dictionary are specified by listing key-value pairs inside a prov:DictionaryMembership
element
<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="DictionaryMembership"> <xs:sequence> <xs:element name="dictionary" type="prov:IDRef"/> <xs:element name="keyValuePair type="prov:KeyValuePair" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType>
<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="hadDictionaryMember" type="prov:DictionaryMembership"/>
<prov:document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:prov="http://www.w3.org/ns/prov#"> <prov:entity prov:id="e0"/> <prov:entity prov:id="e1"/> <prov:entity prov:id="e2"/> <prov:entity prov:id="d"> <prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type> </prov:entity> <prov:hadDictionaryMember> <prov:dictionary prov:ref="d"/> <prov:keyValuePair> <prov:entity prov:ref="e0"/> <prov:key>k0</prov:key> </prov:keyValuePair> <prov:keyValuePair> <prov:entity prov:ref="e1"/> <prov:key>k1</prov:key> </prov:keyValuePair> <prov:keyValuePair> <prov:entity prov:ref="e2"/> <prov:key>k2</prov:key> </prov:keyValuePair> </prov:hadDictionaryMember> </prov:document>
To specify that one dictionary was derived by insertion of key-value pairs into another one, a prov:Insertion
element is used.
<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Insertion"> <xs:sequence> <xs:element name="newDictionary" type="prov:IDRef"/> <xs:element name="oldDictionary" type="prov:IDRef"/> <xs:element name="keyValuePair type="prov:KeyValuePair" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType>
<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="derivedByInsertionFrom" type="prov:Insertion"/>
<prov:document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:prov="http://www.w3.org/ns/prov#"> <prov:entity prov:id="e0"/> <prov:entity prov:id="e1"/> <prov:entity prov:id="e2"/> <prov:entity prov:id="d1"> <prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type> </prov:entity> <prov:entity prov:id="d2"> <prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type> </prov:entity> <prov:hadDictionaryMember> <prov:dictionary prov:ref="d1"/> <prov:keyValuePair> <prov:entity prov:ref="e0"/> <prov:key>k0</prov:key> </prov:keyValuePair> </prov:hadDictionaryMember> <prov:derivedByInsertionFrom> <prov:newDictionary prov:ref="d2"/> <prov:oldDictionary prov:ref="d1"/> <prov:keyValuePair> <prov:entity prov:ref="e1"/> <prov:key>k1</prov:key> </prov:keyValuePair> <prov:keyValuePair> <prov:entity prov:ref="e2"/> <prov:key>k2</prov:key> </prov:keyValuePair> </prov:derivedByInsertionFrom> </prov:document>
To specify that one dictionary was derived by removal of key-value pairs from another one, a prov:Removal
element is used.
<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Removal"> <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:sequence> </xs:complexType>
<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="derivedByRemovalFrom" type="prov:Removal"/>
<prov:document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:prov="http://www.w3.org/ns/prov#"> <prov:entity prov:id="e0"/> <prov:entity prov:id="e1"/> <prov:entity prov:id="e2"/> <prov:entity prov:id="d1"> <prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type> </prov:entity> <prov:entity prov:id="d2"> <prov:type xsi:type="xsd:QName">prov:Dictionary</prov:type> </prov:entity> <prov:hadDictionaryMember> <prov:dictionary prov:ref="d1"/> <prov:keyValuePair> <prov:entity prov:ref="e0"/> <prov:key>k0</prov:key> </prov:keyValuePair> <prov:keyValuePair> <prov:entity prov:ref="e1"/> <prov:key>k1</prov:key> </prov:keyValuePair> <prov:keyValuePair> <prov:entity prov:ref="e2"/> <prov:key>k2</prov:key> </prov:keyValuePair> </prov:hadDictionaryMember> <prov:derivedByRemovalFrom> <prov:newDictionary prov:ref="d2"/> <prov:oldDictionary prov:ref="d1"/> <prov:key>k1</prov:key> <prov:key>k2</prov:key> </prov:derivedByRemovalFrom> </prov:document>
Dictionary membership implies collection membership.
IF hadDictionaryMember(d, e1, "k1") THEN hadMember(d, e1)
Each key maps to a single entity.
IF hadDictionaryMember(d1, e1, "k1") and hadDictionaryMember(d1, e2, "k1") THEN e1 = e2
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.
IF hadDictionaryMember(d1, e, "k") and derivedByInsertionFrom(d2, d1, {("k1", e1),...,("kn", en)}) and k ∉ {"k1",...,"kn"} THEN hadDictionaryMember(d2, e, "k")
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.
IF derivedByInsertionFrom(d2, d1, {("k1", e1),...,("kn",en)}) THEN hadDictionaryMember(d2, ei, "ki") for each i ∈ [1..n]
Insertion and removal are special cases of derivation.
IF derivedByInsertionFrom(d2, d1, {("k1", e1),...,("kn",en)}) THEN wasDerivedFrom(d2, d1)
IF derivedByRemovalFrom(d2, d1, {"k1",...,"kn"}) THEN wasDerivedFrom(d2, d1)
Insertions and removals do not introduce any new key-entity pairs, other than those specified.
A dictionary that was derived by removal from another dictionary, cannot contain the key-entity pairs that were removed from the latter.
IF derivedByRemovalFrom(d2, d1, {"k1",...,"kn"}) and hadDictionaryMember(d2, e, "ki") and i ∈ [1..n] THEN INVALID
A dictionary must not be derived through multiple insertion or removal relations.
Here, KV1 and KV2 are sets of key-entity pairs.
IF derivedByRemovalFrom(d2, d1, KV1) and derivedByInsertionFrom(d2, d1, KV2)THEN INVALID
Here, KV1 and KV2 are sets of key-entity pairs.
IF derivedByInsertionFrom(d2, d1, KV1) and derivedByInsertionFrom(d2, d1, KV2)THEN KV1 = KV2
Here, K1 and K2 are sets of keys.
IF derivedByRemovalFrom(d2, d1, K1) and derivedByRemovalFrom(d2, d1, K2)THEN K1 = K2
IF entity(d, [prov:type='prov:Dictionary']) THEN 'prov:Dictionary' ∈ typeOf(d) and 'prov:Collection' ∈ typeOf(d) and 'entity' ∈ typeOf(d)
IF entity(d, [prov:type='prov:EmptyDictionary']) THEN 'prov:EmptyDictionary' ∈ typeOf(d) and 'prov:Dictionary' ∈ typeOf(d) and 'prov:Collection' ∈ typeOf(d) and 'prov:EmptyCollection' ∈ typeOf(d) and 'entity' ∈ typeOf(d)
IF hadDictionaryMember(d, e, "k") THEN 'prov:Dictionary' ∈ typeOf(d) and 'prov:Collection' ∈ typeOf(d) and 'entity' ∈ typeOf(d) and 'entity' ∈ typeOf(e)
Here, KV is a set of key-entity pairs
IF derivedByInsertionFrom(d2, d1, KV) THEN 'prov:Dictionary' ∈ typeOf(d1) and 'prov:Dictionary' ∈ typeOf(d2) and 'prov:Collection' ∈ typeOf(d1) and 'entity' ∈ typeOf(d1) and 'prov:Collection' ∈ typeOf(d2) and 'entity' ∈ typeOf(d2) and 'entity' ∈ typeOf(e1)
Here, K is a set of keys
IF derivedByRemovalFrom(d2, d1, K) THEN 'prov:Dictionary' ∈ typeOf(d1) and 'prov:Dictionary' ∈ typeOf(d2) and 'prov:Collection' ∈ typeOf(d1) and 'entity' ∈ typeOf(d1) and 'prov:Collection' ∈ typeOf(d2) and 'entity' ∈ typeOf(d2)
Members of the Provenance Working Group at the time of publication of this document were: Ilkay Altintas (Invited expert), Reza B'Far (Oracle Corporation), Khalid Belhajjame (University of Manchester), James Cheney (University of Edinburgh, School of Informatics), Sam Coppens (iMinds - Ghent University), David Corsar (University of Aberdeen, Computing Science), Stephen Cresswell (The National Archives), Tom De Nies (iMinds - Ghent University), Helena Deus (DERI Galway at the National University of Ireland, Galway, Ireland), Simon Dobson (Invited expert), Martin Doerr (Foundation for Research and Technology - Hellas(FORTH)), Kai Eckert (Invited expert), Jean-Pierre EVAIN (European Broadcasting Union, EBU-UER), James Frew (Invited expert), Irini Fundulaki (Foundation for Research and Technology - Hellas(FORTH)), Daniel Garijo (Universidad Politécnica de Madrid), Yolanda Gil (Invited expert), Ryan Golden (Oracle Corporation), Paul Groth (Vrije Universiteit), Olaf Hartig (Invited expert), David Hau (National Cancer Institute, NCI), Sandro Hawke (W3C/MIT), Jörn Hees (German Research Center for Artificial Intelligence (DFKI) Gmbh), Ivan Herman, (W3C/ERCIM), Ralph Hodgson (TopQuadrant), Hook Hua (Invited expert), Trung Dong Huynh (University of Southampton), Graham Klyne (University of Oxford), Michael Lang (Revelytix, Inc.), Timothy Lebo (Rensselaer Polytechnic Institute), James McCusker (Rensselaer Polytechnic Institute), Deborah McGuinness (Rensselaer Polytechnic Institute), Simon Miles (Invited expert), Paolo Missier (School of Computing Science, Newcastle university), Luc Moreau (University of Southampton), James Myers (Rensselaer Polytechnic Institute), Vinh Nguyen (Wright State University), Edoardo Pignotti (University of Aberdeen, Computing Science), Paulo da Silva Pinheiro (Rensselaer Polytechnic Institute), Carl Reed (Open Geospatial Consortium), Adam Retter (Invited Expert), Christine Runnegar (Invited expert), Satya Sahoo (Invited expert), David Schaengold (Revelytix, Inc.), Daniel Schutzer (FSTC, Financial Services Technology Consortium), Yogesh Simmhan (Invited expert), Stian Soiland-Reyes (University of Manchester), Eric Stephan (Pacific Northwest National Laboratory), Linda Stewart (The National Archives), Ed Summers (Library of Congress), Maria Theodoridou (Foundation for Research and Technology - Hellas(FORTH)), Ted Thibodeau (OpenLink Software Inc.), Curt Tilmes (National Aeronautics and Space Administration), Craig Trim (IBM Corporation), Stephan Zednik (Rensselaer Polytechnic Institute), Jun Zhao (University of Oxford), Yuting Zhao (University of Aberdeen, Computing Science).
The dictionary was derived from the other by insertion. prov:qualifiedInsertion shows details of the insertion, in particular the inserted key-value pairs.