Copyright © 2012 W3C® (MIT, ERCIM, Keio), 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. PROV-DM is the conceptual data model that forms a basis for the W3C provenance (PROV) family of specifications. PROV-DM distinguishes core structures, forming the essence of provenance information, from extended structures catering for more specific uses of provenance. PROV-DM is organized in six components, respectively dealing with: (1) entities and activities, and the time at which they were created, used, or ended; (2) derivations of entities from entities; (3) agents bearing responsibility for entities that were generated and activities that happened; (4) a notion of bundle, a mechanism to support provenance of provenance; and, (5) properties to link entities that refer to the same thing; (6) collections forming a logical structure for its members.
To provide examples of the PROV data model, the PROV notation (PROV-N) is introduced: aimed at human consumption, PROV-N allows serializations of PROV instances to be created in a compact manner. PROV-N facilitates the mapping of the PROV data model to concrete syntax, and is used as the basis for a formal semantics of PROV. The purpose of this document is to define the PROV-N notation.
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 is the fifth public release of the PROV-DM document. Publication as Last Call working draft means that the Working Group believes that it has satisfied the relevant technical requirements outlined in its charter on this document. The design is not expected to change significantly, going forward, and now is the key time for external review, before the implementation phase.
This specification identifies one feature at risk: Mention might be removed from PROV if implementation experience reveals problems with supporting this construct.
The PROV Working group seeks public feedback on this Working Draft. The end date of the Last Call review period is 2012-09-13 (TBC), and we would appreciate comments by that date to public-prov-comments@w3.org
This document was published by the Provenance Working Group as an Editor's Draft. If you wish to make comments regarding this document, please send them to public-prov-comments@w3.org (subscribe, archives). All feedback is welcome.
Publication as an Editor's 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. 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 in the world. Two companion specifications respectively define PROV-DM, a data model for provenance, allowing provenance descriptions to be expressed [PROV-DM] and a set of constraints that provenance descriptions are expected to satisfy [PROV-CONSTRAINTS].
This document introduces the PROV-N grammar along with examples of its usage.
Its target audience is twofold:
This document structured as follows.
Section 2 provides general consideration about the PROV-N grammar.
Section 3 presents the grammar of all expressions of the language grouped according to the PROV data model components.
Section 4 defines the grammar of toplevel bundles, a house-keeping construct of PROV-N capable of packaging up PROV-N expressions and namespace declarations.
Section 5 defines media type for the PROV-N notation.
The key words "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may", and "optional" in this document are to be interpreted as described in [RFC2119].
The following namespaces prefixes are used throughout this document.
prefix | namespace uri | definition |
prov | http://www.w3.org/ns/prov# | The PROV namespace (see Section 4.7.1) |
xsd | http://www.w3.org/2000/10/XMLSchema# | XML Schema Namespace [XMLSCHEMA11-2] |
(others) | (various) | All other namespace prefixes are used in examples only. In particular, URIs starting with "http://example.com" represent some application-dependent URI [URI] |
PROV-N adopts a functional-style syntax consisting of a predicate name and an ordered list of terms. All PROV data model relations involve two primary elements, the subject and the object, in this order. Furthermore, some expressions also admit additional elements that further characterize it.
wasDerivedFrom(e2, e1)
wasDerivedFrom(e2, e1, a, g2, u1)
The grammar is specified using the Extended Backus-Naur Form (EBNF) notation.
Within the term on the right-hand side of a rule, the following terms are used to match strings of one or more characters:
A PROV-N document consists of a collection of expressions, wrapped in a toplevel bundle with some namespace declarations, such that the text for an element matches the corresponding expression production of the grammar.
wasDerivedFrom(e2, e1, a, g2, u1) wasDerivedFrom(e2, e1)In a derivation expression, the activity, generation, and usage are optional terms. They are specified in the first derivation, but not in the second.
activity(a2, 2011-11-16T16:00:00, 2011-11-16T16:00:01) activity(a1)The start and end times for Activity a1 are optional. They are specified in the first expression, but not in the second.
The general rule for optionals is that, if none of the optionals are used in the expression, then they are simply omitted, resulting in a simpler expression as in the examples above.
However, it may be the case that only some of the optional terms are omitted. Because the position of the terms in the expression matters, an additional marker must be used to indicate that a particular term is not available. The symbol '-' is used for this purpose.In the first expression below, all optionals are specified. However in the second and third, only one optional is specified, forcing the use of the marker for the missing terms.
wasDerivedFrom(e2, e1, a, g2, u1) wasDerivedFrom(e2, e1, -, -, u1) wasDerivedFrom(e2, e1, a, -, -)
activity(a1) activity(a1, -, -)
Most expressions defined in the grammar include the use of two terms: an identifier and a set of attribute-value pairs, delimited by square brackets. Identifiers are optional except for Entities, Activites, and Agents. Identifiers are always the first term in any expression. By convention, optional identifiers are separated using a semi-colon ';'. This makes it possible to completely omit an optional identifier with no ambiguity arising. Also, if the set of attribute-value pairs is present, it is always the last term in any expression.
Derivation has an optional identifier. In the first expression, the identifier is not available, while it is explicit in the second. The third example shows that one can optionally indicate the missing identifier using the - marker.
wasDerivedFrom(e2, e1) wasDerivedFrom(d; e2, e1) wasDerivedFrom(-; e2, e1)
The first and second activities have no attributes. The third activity has two attributes.
activity(ex:a10) activity(ex:a10, []) activity(ex:a10, [ex:param1="a", ex:param2="b"])
This section introduces grammar productions for each expression, followed by small examples of expressions illustrating the grammar. Strings conforming to the grammar are valid expressions in the PROV-N language.
[3] | entityExpression | ::= | "entity" "(" identifier optionalAttributeValuePairs ")" |
[4] | optionalAttributeValuePairs | ::= | ( "," "[" attributeValuePairs "]" )? |
[5] | attributeValuePairs | ::= | ( | attributeValuePair ( "," attributeValuePair )* ) |
[6] | attributeValuePair | ::= | attribute "=" literal |
The following table summarizes how each constituent of a PROV-DM Entity maps to a non-terminal.
Entity | Non-Terminal |
id | identifier |
attributes | optionalAttributeValuePairs |
entity(tr:WD-prov-dm-20111215, [ prov:type="document" ])Here tr:WD-prov-dm-20111215 is the entity identifier, and [ prov:type="document" ] groups the optional attributes, only one in this example, with their values.
entity(tr:WD-prov-dm-20111215)Here, the optional attributes are absent.
[7] | activityExpression | ::= | "activity" "(" identifier ( "," timeOrMarker "," timeOrMarker )? optionalAttributeValuePairs ")" |
[8] | timeOrMarker | ::= | ( time | "-" ) |
The following table summarizes how each constituent of a PROV-DM Activity maps to a non-terminal.
Activity | Non-Terminal |
id | identifier |
startTime | timeOrMarker |
endTime | timeOrMarker |
attributes | optionalAttributeValuePairs |
activity(ex:a10, 2011-11-16T16:00:00, 2011-11-16T16:00:01, [prov:type="createFile"])
Here ex:a10 is the activity identifier, 2011-11-16T16:00:00 and 2011-11-16T16:00:01 are the optional start and end times for the activity, and [prov:type="createFile"] are optional attributes.
The remaining examples show cases where some of the optionals are omitted.activity(ex:a10) activity(ex:a10, -, -) activity(ex:a10, -, -, [prov:type="edit"]) activity(ex:a10, -, 2011-11-16T16:00:00) activity(ex:a10, 2011-11-16T16:00:00, -) activity(ex:a10, 2011-11-16T16:00:00, -, [prov:type="createFile"]) activity(ex:a10, [prov:type="edit"])
[9] | generationExpression | ::= | "wasGeneratedBy" "(" optionalIdentifier eIdentifier ( "," aIdentifierOrMarker "," timeOrMarker )? optionalAttributeValuePairs ")" |
[10] | optionalIdentifier | ::= | ( identifierOrMarker ";" )? |
[11] | identifierOrMarker | ::= | ( identifier | "-" ) |
The following table summarizes how each constituent of a PROV-DM Generation maps to a non-terminal.
Generation | Non-Terminal |
id | optionalIdentifier |
entity | eIdentifier |
activity | aIdentifierOrMarker |
time | timeOrMarker |
attributes | optionalAttributeValuePairs |
wasGeneratedBy(ex:g1; tr:WD-prov-dm-20111215, ex:edit1, 2011-11-16T16:00:00, [ex:fct="save"])
Here ex:g1 is the optional generation identifier, tr:WD-prov-dm-20111215 is the identifier of the entity being generated, ex:edit1 is the optional identifier of the generating activity, 2011-11-16T16:00:00 is the optional generation time, and [ex:fct="save"] are optional attributes.
The remaining examples show cases where some of the optionals are omitted.wasGeneratedBy(e2, a1, tr:WD-prov-dm-20111215) wasGeneratedBy(e, ex:edit1, 2011-11-16T16:00:00) wasGeneratedBy(e2, a1, -, [ex:fct="save"]) wasGeneratedBy(e2, [ex:fct="save"]) wasGeneratedBy(ex:g1; e) wasGeneratedBy(ex:g1; e, a, tr:WD-prov-dm-20111215)
Even though the production generationExpression
allows for expressions wasGeneratedBy(e2, -, -) and wasGeneratedBy(-; e2, -, -), these expressions are not valid in PROV-N, since at least one of id, activity, time, and attributes must be present.
[12] | usageExpression | ::= | "used" "(" optionalIdentifier aIdentifier "," ( "," eIdentifierOrMarker "," timeOrMarker )? optionalAttributeValuePairs ")" |
The following table summarizes how each constituent of a PROV-DM Usage maps to a non-terminal.
Usage | Non-Terminal |
id | optionalIdentifier |
activity | aIdentifier |
entity | eIdentifierOrMarker |
time | timeOrMarker |
attributes | optionalAttributeValuePairs |
used(ex:u1; ex:act2, ar3:0111, 2011-11-16T16:00:00, [ex:fct="load"])
Here ex:u1 is the optional usage identifier, ex:act2 is the identifier of the using activity, ar3:0111 is the identifier of the entity being used, 2011-11-16T16:00:00 is the optional usage time, and [ex:fct="load"] are optional attributes.
The remaining examples show cases where some of the optionals are omitted.used(ex:act2) used(ex:act2, ar3:0111, 2011-11-16T16:00:00) used(a1,e1, -, [ex:fct="load"]) used(ex:u1; ex:act2, ar3:0111, -)
Even though the production usageExpression
allows for expressions used(a2, -, -) and used(-; e2, -, -), these expressions are not valid in PROV-N, since at least one of id, entity, time, and attributes must be present.
[13] | communicationExpression | ::= | "wasInformedBy" "(" optionalIdentifier aIdentifier "," aIdentifier optionalAttributeValuePairs ")" |
The following table summarizes how each constituent of a PROV-DM Communication maps to a non-terminal.
Communication | Non-Terminal |
id | optionalIdentifier |
informed | aIdentifier |
informant | aIdentifier |
attributes | optionalAttributeValuePairs |
wasInformedBy(ex:inf1; ex:a1, ex:a2, [ex:param1="a", ex:param2="b"])
Here ex:inf1 is the optional communication identifier, ex:a1 is the identifier of the informed activity, ex:a2 is the identifier of the informant activity, and [ex:param1="a", ex:param2="b"] are optional attributes.
The remaining examples show cases where some of the optionals are omitted.wasInformedBy(ex:a1, ex:a2) wasInformedBy(ex:a1, ex:a2, [ex:param1="a", ex:param2="b"]) wasInformedBy(i; ex:a1, ex:a2) wasInformedBy(i; ex:a1, ex:a2, [ex:param1="a", ex:param2="b"])
[14] | startExpression | ::= | "wasStartedBy" "(" optionalIdentifier aIdentifier ( "," eIdentifierOrMarker "," aIdentifierOrMarker "," timeOrMarker )? optionalAttributeValuePairs ")" |
The following table summarizes how each constituent of a PROV-DM Start maps to a non-terminal.
Start | Non-Terminal |
id | optionalIdentifier |
activity | aIdentifier |
trigger | eIdentifierOrMarker |
starter | aIdentifierOrMarker |
time | timeOrMarker |
attributes | optionalAttributeValuePairs |
wasStartedBy(s; ex:act2, ex:trigger, ex:act1, 2011-11-16T16:00:00, [ex:param="a"])
Here s is the optional start identifier, ex:act2 is the identifier of the started activity, ex:trigger is the optional identifier for the entity that triggered the activity start, ex:act1 is the optional identifier for the activity that generated the (possibly unspecified) entity ex:trigger, 2011-11-16T16:00:00 is the optional start time, and [ex:param="a"] are optional attributes.
The remaining examples show cases where some of the optionals are omitted.wasStartedBy(ex:act2, -, ex:act1, -) wasStartedBy(ex:act2, -, ex:act1, 2011-11-16T16:00:00) wasStartedBy(ex:act2, -, -, 2011-11-16T16:00:00) wasStartedBy(ex:act2, [ex:param="a"]) wasStartedBy(s; ex:act2, e, ex:act1, 2011-11-16T16:00:00)
Note: Even though the production startExpression
allows for expressions wasStartedBy(e2, -, -) and wasStartedBy(-; e2, -, -), these expressions are not valid in PROV-N,
since at least one of id, trigger, starter, time, and attributes must be present.
[15] | endExpression | ::= | "wasEndedBy" "(" optionalIdentifier aIdentifier ( "," eIdentifierOrMarker "," aIdentifierOrMarker "," timeOrMarker )? optionalAttributeValuePairs ")" |
The following table summarizes how each constituent of a PROV-DM End maps to a non-terminal.
End | Non-Terminal |
id | optionalIdentifier |
activity | aIdentifier |
trigger | eIdentifierOrMarker |
ender | aIdentifierOrMarker |
time | timeOrMarker |
attributes | optionalAttributeValuePairs |
wasEndedBy(s; ex:act2, ex:trigger,ex:act3, 2011-11-16T16:00:00, [ex:param="a"])
Here s is the optional start identifier, ex:act2 is the identifier of the ending activity, ex:trigger is the identifier of the entity that triggered the activity end, ex:act3 is the optional identifier for the activity that generated the (possibly unspecified) entity e, 2011-11-16T16:00:00 is the optional usage time, and [ex:param="a"] are optional attributes.
The remaining examples show cases where some of the optionals are omitted.wasEndedBy(ex:act2, ex:trigger, -, -) wasEndedBy(ex:act2, ex:trigger, -, 2011-11-16T16:00:00) wasEndedBy(ex:act2, -, -, 2011-11-16T16:00:00) wasEndedBy(ex:act2, -, -, 2011-11-16T16:00:00, [ex:param="a"]) wasEndedBy(e; ex:act2) wasEndedBy(e; ex:act2, ex:trigger, -, 2011-11-16T16:00:00)
Note:Even though the production endExpression
allows for expressions wasEndedBy(e2, -, -) and wasEndedBy(-; e2, -, -), these expressions are not valid in PROV-N,
since at least one of id, trigger, ender, time, and attributes must be present.
[16] | invalidationExpression | ::= | "wasInvalidatedBy" "(" optionalIdentifier eIdentifier ( "," aIdentifierOrMarker "," timeOrMarker )? optionalAttributeValuePairs ")" |
The following table summarizes how each constituent of a PROV-DM Invalidation maps to a non-terminal.
Invalidation | Non-Terminal |
id | optionalIdentifier |
entity | eIdentifier |
activity | aIdentifierOrMarker |
time | timeOrMarker |
attributes | optionalAttributeValuePairs |
wasInvalidatedBy(ex:i1; tr:WD-prov-dm-20111215, ex:edit1, 2011-11-16T16:00:00, [ex:fct="save"])
Here ex:i1 is the optional invalidation identifier, tr:WD-prov-dm-20111215 is the identifier of the entity being invalidated, ex:edit1 is the optional identifier of the invalidating activity, 2011-11-16T16:00:00 is the optional invalidation time, and [ex:fct="save"] are optional attributes.
The remaining examples show cases where some of the optionals are omitted.wasInvalidatedBy(tr:WD-prov-dm-20111215, ex:edit1, -) wasInvalidatedBy(tr:WD-prov-dm-20111215, ex:edit1, 2011-11-16T16:00:00) wasInvalidatedBy(e2, a1, -, [ex:fct="save"]) wasInvalidatedBy(e2, -, -, [ex:fct="save"]) wasInvalidatedBy(ex:i1; tr:WD-prov-dm-20111215, ex:edit1, -) wasInvalidatedBy(tr:WD-prov-dm-20111215, ex:edit1, -)
Even though the production invalidationExpression
allows for expressions wasInvalidatedBy(e2, -, -) and wasInvalidatedBy(-; e2, -, -), these expressions are not valid in PROV-N, since
since at least one of id, activity, time, and attributes must be present.
[17] | derivationExpression | ::= | "wasDerivedFrom" "(" optionalIdentifier eIdentifier "," eIdentifier ( "," aIdentifierOrMarker "," gIdentifierOrMarker "," uIdentifierOrMarker )? optionalAttributeValuePairs ")" |
The following table summarizes how each constituent of a PROV-DM Derivation maps to a non-terminal.
wasDerivedFrom(d, e2, e1, a, g2, u1, [ex:comment="a righteous derivation"])
Here d is the optional derivation identifier, e2 is the identifier for the entity being derived, e1 is the identifier of the entity from which e2 is derived, a is the optional identifier of the activity which used/generated the entities, g2 is the optional identifier of the generation, u1 is the optional identifier of the usage, and [ex:comment="a righteous derivation"] are optional attributes.
The remaining examples show cases where some of the optionals are omitted.wasDerivedFrom(e2, e1) wasDerivedFrom(e2, e1, a, g2, u1) wasDerivedFrom(e2, e1, -, g2, u1) wasDerivedFrom(e2, e1, a, -, u1) wasDerivedFrom(e2, e1, a, g2, -) wasDerivedFrom(e2, e1, a, -, -) wasDerivedFrom(e2, e1, -, -, u1) wasDerivedFrom(e2, e1, -, -, -) wasDerivedFrom(d, e2, e1, a, g2, u1) wasDerivedFrom(-, e2, e1, a, g2, u1)
wasDerivedFrom(d; e2, e1, a, g2, u1, [prov:type='prov:Revision', ex:comment="a righteous derivation"])
Here, the derivation from Example 17 is extended with a prov:type attribute and value prov:Revision.
wasDerivedFrom(quoteId1; ex:blockQuote,ex:blog, ex:act1, ex:g, ex:u, [ prov:type='prov:Quotation' ])
Here, the derivation is provided with a prov:type attribute and value prov:Quotation.
wasDerivedFrom(src1; ex:e1, ex:e2, ex:act, ex:g, ex:u, [ prove:type='prov:PrimarySource' ])
Here, the derivation is provided with a prov:type attribute and value prov:PrimarySource.
[18] | agentExpression | ::= | "agent" "(" identifier optionalAttributeValuePairs ")" |
The following table summarizes how each constituent of a PROV-DM Agent maps to a non-terminal.
Agent | Non-Terminal |
id | identifier |
attributes | optionalAttributeValuePairs |
agent(ag4, [ prov:type="prov:Person", ex:name="David" ])
Here ag is the agent identifier, and [ prov:type="prov:Person", ex:name="David" ] are optional attributes.
In the next example, the optional attributes are omitted.agent(ag4)
[19] | attributionExpression | ::= | "wasAttributedTo" "(" optionalIdentifier eIdentifier "," agIdentifier optionalAttributeValuePairs ")" |
The following table summarizes how each constituent of a PROV-DM Attribution maps to a non-terminal.
Attribution | Non-Terminal |
id | optionalIdentifier |
entity | eIdentifier |
agent | agIdentifier |
attributes | optionalAttributeValuePairs |
wasAttributedTo(id; e, ag, [ex:license='cc:attributionURL' ])
Here id is the optional attribution identifier, e is an entity identifier, ag is the identifier of the agent to whom the entity is abscribed, and [ex:license='cc:attributionURL' ] are optional attributes.
The remaining examples show cases where some of the optionals are omitted.wasAttributedTo(e, ag) wasAttributedTo(e, ag, [ex:license='cc:attributionURL' ])
[20] | associationExpression | ::= | "wasAssociatedWith" "(" optionalIdentifier aIdentifier "," agIdentifierOrMarker ( "," eIdentifierOrMarker )? optionalAttributeValuePairs ")" |
The following table summarizes how each constituent of a PROV-DM Association maps to a non-terminal.
Association | Non-Terminal |
id | optionalIdentifier |
activity | aIdentifier |
agent | agIdentifierOrMarker |
plan | eIdentifierOrMarker |
attributes | optionalAttributeValuePairs |
wasAssociatedWith(ex:agas; ex:a1, ex:ag1, ex:e1, [ex:param1="a", ex:param2="b"])
Here ex:agas is the optional attribution identifier, ex:a1 is an activity identifier, ex:ag1 is the optional identifier of the agent associated to the activity, ex:e1 is the optional identifier of the plan used by the agent in the context of the activity, and [ex:param1="a", ex:param2="b"] are optional attributes.
The remaining examples show cases where some of the optionals are omitted.wasAssociatedWith(ex:a1, -, ex:e1) wasAssociatedWith(ex:a1, ex:ag1) wasAssociatedWith(ex:a1, ex:ag1, ex:e1) wasAssociatedWith(ex:a1, ex:ag1, ex:e1, [ex:param1="a", ex:param2="b"]) wasAssociatedWith(a; ex:a1, -, ex:e1)
Note:The production associationExpression
allows for expressions wasAssociatedWith(a, -, -) and wasAssociatiedWith(-; a, -, -). However, these expressions are not valid in PROV-N,
since
at least one of id, agent, plan, and attributes must be present.
[21] | delegationExpression | ::= | "actedOnBehalfOf" "(" optionalIdentifier agIdentifier "," agIdentifier ( "," aIdentifierOrMarker )? optionalAttributeValuePairs ")" |
The following table summarizes how each constituent of a PROV-DM Delegation maps to a non-terminal.
Delegation | Non-Terminal |
id | optionalIdentifier |
delegate | agIdentifier |
responsible | agIdentifier |
activity | aIdentifierOrMarker |
attributes | optionalAttributeValuePairs |
actedOnBehalfOf(del1; ag2, ag1, a, [prov:type="contract"])
Here del1 is the optional delegation identifier, ag2 is the identifier for the delegate agent, ag1 is the identifier of the responsible agent, a is the optional identifier of the activity for which the delegation link holds, and [prov:type="contract"] are optional attributes.
The remaining examples show cases where some of the optionals are omitted.actedOnBehalfOf(ag1, ag2) actedOnBehalfOf(ag1, ag2, a) actedOnBehalfOf(ag1, ag2, -, [prov:type="delegation"]) actedOnBehalfOf(ag2, ag3, a, [prov:type="contract"]) actedOnBehalfOf(r; ag2, ag3, a, [prov:type="contract"])
[22] | influenceExpression | ::= | "influence" "(" optionalIdentifier eIdentifier "," eIdentifier optionalAttributeValuePairs ")" |
The following table summarizes how each constituent of a PROV-DM Influence maps to a non-terminal.
Influence | Non-Terminal |
id | optionalIdentifier |
influencee | eIdentifier |
influencer | eIdentifier |
attributes | optionalAttributeValuePairs |
influence(id,e2,e1,[ex:param="a"])
Here id is the optional influence identifier, e2 is an entity identifier, e1 is the identifier for an ancestor entity that e2 depends on, and [ex:param="a"] is the optional set of attributes.
The remaining examples show cases where some of the optionals are omitted.influence(e2,e1) influence(e2,e1,[ex:param="a"]) influence(id; e2,e1)
[23] | namedBundle | ::= | "bundle" identifier (namespaceDeclarations)? (expression)* "endBundle" |
bundle ex:author-view agent(ex:Paolo, [ prov:type='prov:Person' ]) agent(ex:Simon, [ prov:type='prov:Person' ]) ... endBundle
Here ex:author-view is the name of the bundle.
[24] | alternateExpression | ::= | "alternateOf" "(" eIdentifier "," eIdentifier ")" |
The following table summarizes how each constituent of a PROV-DM Alternate maps to a non-terminal.
Alternate | Non-Terminal |
alternate1 | eIdentifier |
alternate2 | eIdentifier |
alternateOf(tr:WD-prov-dm-20111215,ex:alternate-20111215)Here tr:WD-prov-dm-20111215 is alternate for ex:alternate-20111215.
[25] | specializationExpression | ::= | "specializationOf" "(" eIdentifier "," eIdentifier ")" |
The following table summarizes how each constituent of a PROV-DM Specialization maps to a non-terminal.
Specialization | Non-Terminal |
specificEntity | eIdentifier |
generalEntity | eIdentifier |
specializationOf(tr:WD-prov-dm-20111215,tr:prov-dm)Here tr:WD-prov-dm-20111215 is a specialization of tr:prov-dm.
Note: This feature is "at risk" and may be removed from this specification based on feedback. Please send feedback to public-prov-comments@w3.org.
The expression Mention might be removed from PROV if implementation experience reveals problems with supporting this construct.
[26] | mentionExpression | ::= | "mentionOf" "(" identifier "," identifier "," bIdentifier ")" |
The following table summarizes how each constituent of a PROV-DM Mention maps to a non-terminal.
Mention | Non-Terminal |
specificEntity | eIdentifier |
generalEntity | eIdentifier |
bundle | bIdentifier |
mention(ex:report1_as_in_b1, ex:report1, ex:b1)
Here ex:report1_as_in_b1 is an entity identifier, ex:report1 is an entity identifier, ex:b1 is the identifier for a bundle
[27] | membershipExpression | ::= | "memberOf" "(" optionalIdentifier cIdentifier "," entitySet complete optionalAttributeValuePairs ")" |
[28] | complete | ::= | ( "," ( "true" | "false" | "-" ) )? |
[29] | entitySet | ::= | "{" (eIdentifier)* "}" |
The following table summarizes how each constituent of a PROV-DM Membership maps to a non-terminal.
Collection Membership | Non-Terminal |
id | optionalIdentifier |
collection | cIdentifier |
entity-set | entitySet |
complete | complete |
attributes | optionalAttributeValuePairs |
memberOf(mId, c, {e1, e2, e3}, []) // Collection membership
Here mId is the optional membership identifier, c is the identifier for the collection whose membership is stated, {e1, e2, e3} is the entity-set indicating the members of c, and [] is the optional (empty) set of attributes.
In the remaining examples, some of the optionals are omitted.memberOf(c3, {e1}) memberOf(c3, {e1,e2}) // default "complete" flag is false memberOf(c3, {e1,e2}, false) memberOf(c3, {e1,e2}, true) memberOf(c3, ,[]) memberOf(c3, ,true, [])
Various kinds of identifiers are used in productions.
[30] | eIdentifier | ::= | identifier |
[31] | aIdentifier | ::= | identifier |
[32] | agIdentifier | ::= | identifier |
[33] | gIdentifier | ::= | identifier |
[34] | uIdentifier | ::= | identifier |
[36] | cIdentifier | ::= | identifier |
[35] | dIdentifier | ::= | identifier |
[37] | bIdentifier | ::= | identifier |
[38] | eIdentifierOrMarker | ::= | ( eIdentifier | "-" ) |
[39] | aIdentifierOrMarker | ::= | ( aIdentifier | "-" ) |
[40] | agIdentifierOrMarker | ::= | ( agIdentifier | "-" ) |
[41] | gIdentifierOrMarker | ::= | ( gIdentifier | "-" ) |
[42] | uIdentifierOrMarker | ::= | ( uIdentifier | "-" ) |
[43] | identifier | ::= | QUALIFIED_NAME |
A qualified name is a name subject to namespace interpretation. It consists of a namespace, denoted by an optional prefix, and a local name. The PROV data model stipulates that a qualified name can be mapped into an IRI by concatenating the IRI associated with the prefix and the local part.
A qualified name's prefix is optional. If a prefix occurs in a qualified name, it refers to a namespace declared in a namespace declaration. In the absence of prefix, the qualified name refers to the default namespace.
A PROV qualified name QUALIFIED_NAME
has a more permissive syntax then XML's QName
[XML-NAMES]
and SPARQL PrefixedName
[RDF-SPARQL-QUERY]. It is a PROV requirement that the concatenation of the namespace with the local part results in a valid IRI [IRI]. Given that
',' (comma),
';' (semi-colon),
'=' (equal),
'(' (left bracket),
')' (right bracket),
'[' (left square bracket),
']' (right square bracket) are used by the PROV notation as delimiters, they are not allowed in local parts. Instead, they can be %-escaped or incorporated in the IRI denoted by a prefix.
Qualified names QUALIFIED_NAME
consist of a prefix and a local part. Prefixes follow the production PN_PREFIX
defined by SPARQL [RDF-SPARQL-QUERY]. Local parts have to be conformant with PN_LOCAL
, which extends the original SPARQL PN_LOCAL
definition by allowing further characters and %-escaped charaters (see PN_CHARS_OTHERS
).
[59] | <QUALIFIED_NAME > | ::= | ( PN_PREFIX ":" )? PN_LOCAL |
[60] | <PN_LOCAL > | ::= | ( PN_CHARS_U | [0-9] | PN_CHARS_OTHERS ) ( ( PN_CHARS | "." | PN_CHARS_OTHERS )* ( PN_CHARS | PN_CHARS_OTHERS ) )? |
[61] | <PN_CHARS_OTHERS > | ::= | PERCENT |
[62] | <PERCENT > | ::= | "%" HEX HEX |
[63] | <HEX > | ::= | [0-9] |
Examples of articles on the BBC Web site seen as entities.
bundle prefix bbc <http://www.bbc.co.uk/> prefix bbcNews <http://www.bbc.co.uk/news/> entity(bbc:) // bbc site itself entity(bbc:news/) // bbc news entity(bbc:news/world-asia-17507976) // a given news article entity(bbcNews:) // an alternative way of referring to the bbc news site endBundle
Examples of entities with declared and default namespace.
bundle default <http://example.org/2/> prefix ex <http://example.org/1/> entity(ex:a) // corresponds to IRI http://example.org/1/a entity(ex:a/) // corresponds to IRI http://example.org/1/a/ entity(ex:a/b) // corresponds to IRI http://example.org/1/a/b entity(b) // corresponds to IRI http://example.org/2/b entity(ex:1234) // corresponds to IRI http://example.org/2/1234 entity(4567) // corresponds to IRI http://example.org/2/4567 endBundle
Note:The productions for qualifiedName
and prefix
are conflicting. In the context of a namespaceDeclaration
, a parser should give precedence to the production for prefix
.
[44] | attribute | ::= | QUALIFIED_NAME |
The reserved attributes in the PROV namespace are the following.
[45] | literal | ::= | typedLiteral |
[46] | typedLiteral | ::= | STRING_LITERAL "%%" datatype |
[47] | datatype | ::= | QUALIFIED_NAME |
[48] | convenienceNotation | ::= | STRING_LITERAL (LANGTAG)? |
[64] | <STRING_LITERAL > | ::= | STRING_LITERAL2 |
[66] | <INT_LITERAL > | ::= | ("-")? (DIGIT)+ |
[67] | <QUALIFIED_NAME_LITERAL > | ::= | "'" QUALIFIED_NAME "'" |
In production datatype
, the QUALIFIED_NAME
is used to denote a PROV data type [PROV-DM].
The non terminals
STRING_LITERAL
,
INT_LITERAL
, and
QUALIFIED_NAME_LITERAL
are syntactic sugar for quoted strings with datatype
xsd:string
,
xsd:int
, and
prov:QUALIFIED_NAME
respectively.
In particular, a Literal may be an IRI-typed string (with datatype xsd:anyURI); such IRI has no specific interpretation in the context of PROV.
Note:The productions for prov:QUALIFIED_NAME
and
INT_LITERAL
are conflicting. In the context of a
literal
, a parser should give precedence to the production for
INT_LITERAL
.
The following examples respectively are the string "abc", the string (in French) "bonjour", the integer number 1, and the IRI "http://example.org/foo".
"abc" "bonjour"@fr "1" %% xsd:integer "http://example.org/foo" %% xsd:anyURI
The following example shows a value of type prov:QUALIFIED_NAME (see prov:QUALIFIED_NAME). The prefix ex must be bound to a namespace declared in a namespace declaration.
"ex:value" %% prov:QUALIFIED_NAMEAlternatively, the same value can be expressed using the following convenience notation.
'ex:value'
The reserved type values in the PROV namespace are the following.
The agent ag is a person (type: prov:Person), whereas the entity pl is a plan (type: prov:Plan).
agent(ag, [ prov:type='prov:Person' ]) entity(pl, [ prov:type='prov:Plan' ])
Time instants are defined according to xsd:dateTime [XMLSCHEMA11-2].
[49] | time | ::= | ISODATETIME |
[68] | <DIGIT > | ::= | [0-9] |
[69] | <ISODATETIME > | ::= | DIGIT DIGIT DIGIT DIGIT "-" DIGIT DIGIT "-" DIGIT DIGIT "T" DIGIT DIGIT ":" DIGIT DIGIT ":" DIGIT DIGIT ( "." DIGIT ( DIGIT (DIGIT)? )? )? ( "Z" | TIMEZONEOFFSET )? |
[70] | <TIMEZONEOFFSET > | ::= | ( "+" | "-" ) DIGIT DIGIT ":" DIGIT DIGIT |
The third argument in the following usage expression is a time instance, namely 4pm on 2011-11-16.
used(ex:act2, ar3:0111, 2011-11-16T16:00:00)
[50] | namespaceDeclarations | ::= | ( defaultNamespaceDeclaration | namespaceDeclaration ) (namespaceDeclaration)* |
[51] | namespaceDeclaration | ::= | "prefix" QUALIFIED_NAME namespace |
[53] | namespace | ::= | IRI_REF |
[52] | defaultNamespaceDeclaration | ::= | "default" IRI_REF |
A namespaceDeclaration consists of a binding between a prefix and a namespace. Every qualified name with this prefix in the scope of this declaration refers to this namespace. The scope of a namespace declaration is the namedBundle or toplevel bundle in which it directly occurs.
In PROV-N, the following prefixes are reserved:
A PROV-N document must not redeclare prefixes prov and xsd.
The following example declares three namespaces, one default, and two with explicit prefixes ex1 and ex2.
bundle default <http://example.org/0/> prefix ex1 <http://example.org/1/> prefix ex2 <http://example.org/2/> ... endBundle
A toplevel bundle is a house-keeping construct of PROV-N capable of packaging up PROV-N expressions and namespace declarations. A toplevel bundle forms a self-contained package of provenance descriptions for the purpose of exchanging them. A toplevel bundle may be used to package up PROV-N expressions in response to a request for the provenance of something ([PROV-AQ]).
Given its status of house keeping construct for the purpose of exchanging provenance expressions, a toplevel bundle is not defined as a PROV-N expression (production expression
).
A toplevel bundle, written bundle decls exprs bundles endBundle in PROV-N, contains:
A toplevel bundle's text matches the bundle production.
[1] | bundle | ::= | "bundle" (namespaceDeclarations)? (expression)* (namedBundle)* "endBundle" |
The following container contains expressions related to the provenance of entity e2.
bundle default <http://anotherexample.org/> prefix ex <http://example.org/> entity(e2, [ prov:type="File", ex:path="/shared/crime.txt", ex:creator="Alice", ex:content="There was a lot of crime in London last month."]) activity(a1, 2011-11-16T16:05:00, -,[prov:type="edit"]) wasGeneratedBy(e2, a1, -, [ex:fct="save"]) wasAssociatedWith(a1, ag2, -, [prov:role="author"]) agent(ag2, [ prov:type='prov:Person' , ex:name="Bob" ]) endBundle
This container could for instance be returned as the result of a query to a provenance store for the provenance of entity e2 [PROV-AQ].
The media type of PROV-N is text/prov-n. The content encoding of PROV-N content is UTF-8.
See http://www.w3.org/2002/06/registering-mediatype for Register an Internet Media Type for a W3C Spec.
Following text adapted from turtle.The Internet Media Type / MIME Type for PROV-N is "text/prov-n".
It is recommended that PROV-N files have the extension ".pn" (all lowercase) on all platforms.
It is recommended that PROV-N files stored on Macintosh HFS file systems be given a file type of "TEXT".
This information that follows has been submitted to the IESG for review, approval, and registration with IANA.
This document has been produced by the PROV Working Group, and its contents reflect extensive discussion within the Working Group as a whole.
Members of the PROV 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 (IBBT), David Corsar (University of Aberdeen, Computing Science), Stephen Cresswell (The National Archives), Tom De Nies (IBBT), 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).
2.5 Comments
Comments in PROV-N take two forms:IRI_REF
orSTRING_LITERAL
; such cooments continue to the end of line (marked by characters U+000D or U+000A) or end of file if there is no end of line after the comment marker.IRI_REF
orSTRING_LITERAL
.Comments are treated as white space.