optional attributes
authorLuc Moreau <l.moreau@ecs.soton.ac.uk>
Mon, 05 Dec 2011 13:43:08 +0000
changeset 1175 b97ac63f85cd
parent 1174 e211b01fa8a1
child 1176 42d8c1ac4dbe
child 1181 d4a01bb176e2
optional attributes
model/ProvenanceModel.html
--- a/model/ProvenanceModel.html	Mon Dec 05 12:54:38 2011 +0000
+++ b/model/ProvenanceModel.html	Mon Dec 05 13:43:08 2011 +0000
@@ -681,8 +681,8 @@
 entity(e1, [ prov:type="File", ex:path="/shared/crime.txt", ex:creator="Alice", ex:content="" ])
 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."])
 entity(e3, [ prov:type="File", ex:path="/shared/crime.txt", ex:creator="Alice", ex:content="There was a lot of crime in London and New York last month."])
-entity(e4, [ ])
-entity(e5, [ ])
+entity(e4)
+entity(e5)
 entity(e6, [ prov:type="File", ex:path="/shared/crime.txt", ex:creator="Alice", ex:content="There was a lot of crime in London and New York last month.", ex:spellchecked="yes"])
 </pre>
 
@@ -707,12 +707,12 @@
 <p>
 Activity Records (described in <a href="#record-Activity">Section Activity</a>) represent activities in the scenario.</p>
 <pre>
-activity(a0, create-file,          2011-11-16T16:00:00,,[])
-activity(a1, add-crime-in-london,  2011-11-16T16:05:00,,[])
-activity(a2, email,                2011-11-16T17:00:00,,[])
-activity(a3, edit-London-New-York, 2011-11-17T09:00:00,,[])
-activity(a4, email,                2011-11-17T09:30:00,,[])
-activity(a5, spellcheck,,,[])
+activity(a0, create-file,          2011-11-16T16:00:00,)
+activity(a1, add-crime-in-london,  2011-11-16T16:05:00,)
+activity(a2, email,                2011-11-16T17:00:00,)
+activity(a3, edit-London-New-York, 2011-11-17T09:00:00,)
+activity(a4, email,                2011-11-17T09:30:00,)
+activity(a5, spellcheck,,)
 </pre>
 
 
@@ -720,7 +720,7 @@
 Generation Records (described in <a href="#record-Generation">Section Generation</a>) represent the <a>event</a> at which a file is created in a specific form. Attributes are used to describe the modalities according to which a given entity is generated by a given activity.  The interpretation of attributes is application specific. Illustrations of such attributes for the scenario are: no attribute is provided for <span class="name">e0</span>;
 <span class="name">e2</span> was generated by the editor's  save function;  <span class="name">e4</span> can be found on the smtp port, in the attachment section of the mail message; <span class="name">e6</span> was produced on the standard output of <span class="name">a5</span>. Two identifiers <span class="name">g1</span> and <span class="name">g2</span> identify the generation records referenced in derivations introduced below.</p>
 <pre>
-wasGeneratedBy(e0, a0, [])
+wasGeneratedBy(e0, a0)
 wasGeneratedBy(e1, a0, [ex:fct="create"])
 wasGeneratedBy(e2, a1, [ex:fct="save"])     
 wasGeneratedBy(e3, a3, [ex:fct="save"])     
@@ -896,7 +896,7 @@
 <p>An entity record, noted <span class="name">entity(id, [ attr1=val1, ...])</span> in PROV-ASN, contains:</p>
 <ul>
 <li><em>id</em>: an identifier <span class="name">id</span> identifying an entity; the identifier of the entity record is defined to be the same as the identifier of the entity; </li>
-<li><em>attributes</em>: contains a set of attribute-value pairs <span class="name">[ attr1=val1, ...]</span>, representing this entity's situation in the world.</li>
+<li><em>attributes</em>: an OPTIONAL set of attribute-value pairs <span class="name">[ attr1=val1, ...]</span>, representing this entity's situation in the world.</li>
 </ul>
 
 
@@ -913,12 +913,15 @@
 <span class="name">entity</span>
 <span class="name">(</span>
 <span class="nonterminal">identifier</span>
-<span class="name">,</span>
+<span class="nonterminal">optional-attribute-values</span>
+<span class="name">)</span><br/><br/>
+<!-- -->
+<span class="nonterminal">optional-attribute-values</span>&nbsp;::= 
+<span class="optional"><span class="name">,</span>
 <span class="name">[</span>
 <span class="nonterminal">attribute-values</span>
 <span class="name">]</span>
-<span class="name">)</span><br/>
-<!-- -->
+</span><br/>
 <span class="nonterminal">attribute-values</span>&nbsp;::=  
 <span class="nonterminal">attribute-value</span>
 | <span class="nonterminal">attribute-value</span> <span class="name">,</span> <span class="nonterminal">attribute-values</span>
@@ -1006,11 +1009,9 @@
 <span class="name">,</span>
 <span class="optional"><span class="nonterminal">time</span></span>
 <span class="name">,</span>
-<span><span class="nonterminal">time</span></span>
-<span class="name">,</span>
-<span class="nonterminal">other-attribute-values</span>
+<span class="optional"><span class="nonterminal">time</span></span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span><br/>
-<span class="nonterminal">other-attribute-values</span>&nbsp;::=  <span class="nonterminal">attribute-values</span>
 </div>
 
 <div class="anexample">
@@ -1077,10 +1078,7 @@
 <span class="name">agent</span>
 <span class="name">(</span>
 <span class="nonterminal">identifier</span>
-<span class="name">,</span>
-<span class="name">[</span>
-<span class="nonterminal">attribute-values</span>
-<span class="name">]</span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span>
 </div>
 
@@ -1201,9 +1199,10 @@
 <li><em>entity</em>:  an identifier <span class="name">e</span> identifying an entity record that represents the entity that is created; </li>
 <li><em>activity</em>:  an identifier <span class="name">a</span> identifying an activity record that represents the activity that creates the entity;</li>
 
-<li><em>attributes</em>:  a set of attribute-value pairs <span class="name">attrs</span> that describes the modalities of generation of this entity by this activity;</li>
-
-<li><em>time</em>: an OPTIONAL "generation time" <span class="name">t</span>, the time at which the entity was created.</li>
+<li><em>time</em>: an OPTIONAL "generation time" <span class="name">t</span>, the time at which the entity was created;</li>
+
+<li><em>attributes</em>:  an OPTIONAL set of attribute-value pairs <span class="name">attrs</span> that describes the modalities of generation of this entity by this activity.</li>
+
 </ul>
 
 <p>In PROV-ASN, a generation record's text matches the <span class='nonterminal'>generationRecord</span> production of the grammar defined in this specification document.</p>
@@ -1217,10 +1216,9 @@
 <span class="nonterminal">eIdentifier</span>
 <span class="name">,</span>
 <span class="nonterminal">aIdentifier</span>
-<span class="name">,</span>
-<span class="nonterminal">attribute-values</span>
 <span class="optional"><span class="name">,</span>
 <span class="nonterminal">time</span></span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span><br/>
 </div>
 
@@ -1234,8 +1232,8 @@
 <p>
 The following generation assertions</p>
 <pre class="codeexample">
-  wasGeneratedBy(e1,a1,[ex:port="p1", ex:order=1], 2001-10-26T21:32:52)
-  wasGeneratedBy(e2,a1,[ex:port="p1", ex:order=2], 2001-10-26T10:00:00)
+  wasGeneratedBy(e1,a1, 2001-10-26T21:32:52, [ex:port="p1", ex:order=1])
+  wasGeneratedBy(e2,a1, 2001-10-26T10:00:00, [ex:port="p1", ex:order=2])
 </pre>
 <p>state the existence of two <a title="event">events</a> in the world (with respective times <span class="name">2001-10-26T21:32:52</span> and <span class="name">2001-10-26T10:00:00</span>), at which new entities, represented by entity records identified by <span class="name">e1</span> and <span class="name">e2</span>, are created by an activity, itself represented by an activity record identified by <span class="name">a1</span>.
 The first one is available as the first value on port p1, whereas the other is the second value on port p1.  The semantics of <span class="name">port</span> and <span class="name">order</span> in these records are application specific.
@@ -1284,8 +1282,8 @@
 <li><em>id</em>:  an OPTIONAL identifier  <span class="name">id</span> identifying the usage record;</li> 
 <li><em>activity</em>: an identifier <span class="name">a</span> for an activity record, which represents the consuming activity;</li>
 <li><em>entity</em>: an identifier <span class="name">e</span> for an entity record, which represents the entity that is consumed;</li>
-<li><em>attributes</em>: a set of attribute-value pairs <span class="name">attrs</span> that describe the modalities of usage of this entity by this activity;</li>
-<li><em>time</em>: an OPTIONAL "usage time" <span class="name">t</span>, the time at which the entity was used.</li>
+<li><em>time</em>: an OPTIONAL "usage time" <span class="name">t</span>, the time at which the entity was used;</li>
+<li><em>attributes</em>: an OPTIONIAL set of attribute-value pairs <span class="name">attrs</span> that describe the modalities of usage of this entity by this activity;</li>
 </ul>
 
 <p>In PROV-ASN, a usage record's text matches the <span class='nonterminal'>usageRecord</span> production of the grammar defined in this specification document.</p>
@@ -1301,12 +1299,11 @@
 <span class="nonterminal">aIdentifier</span>
 <span class="name">,</span>
 <span class="nonterminal">eIdentifier</span>
-<span class="name">,</span>
-<span class="nonterminal">attribute-values</span>
 <span class="optional">
 <span class="name">,</span>
-<span class="nonterminal">time</span>
+ <span class="nonterminal">time</span>
 </span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span><br/>
 </div>
 
@@ -1319,8 +1316,8 @@
 <div class='anexample'>
 <p>The following usage records</p>
 <pre class="codeexample">
-  used(a1,e1,[ex:parameter="p1"],2011-11-16T16:00:00)
-  used(a1,e2,[ex:parameter="p2"],2011-11-16T16:00:01)
+  used(a1,e1,2011-11-16T16:00:00,[ex:parameter="p1"])
+  used(a1,e2,2011-11-16T16:00:01,[ex:parameter="p2"])
 </pre>
 <p>state that the activity, represented by the activity record identified by <span class="name">a1</span>, consumed two entities, represented by entity records identified by <span class="name">e1</span> and <span class="name">e2</span>, at times <span class="name">2011-11-16T16:00:00</span> and  <span class="name">2011-11-16T16:00:01</span>, respectively; the first one was found as the value of parameter <span class="name">p1</span>, whereas the second was found as value of parameter <span class="name">p2</span>.  The semantics of <span class="name">parameter</span> in these records is application specific.</p>
 </div>
@@ -1392,8 +1389,9 @@
 <ul>
 <li><em>id</em>:  an OPTIONAL identifier  <span class="name">id</span> identifying the activity association record;</li> 
 <li><em>activity</em>: an identifier <span class="name">a</span> for an activity record;</li>
-<li><em>agent</em>: an identifier <span class="name">ag2</span> for an agent record, which represents the agent associated with the activity;</li>
-<li><em>attributes</em>: a set of attribute-value pairs <span class="name">attrs</span> that describe the modalities of association of this activity with this agent.</li>
+<li><em>attributes</em>: an OPTIONAL set of attribute-value pairs <span class="name">attrs</span> that describe the modalities of association of this activity with this agent;</li>
+<li><em>agent</em>: an identifier <span class="name">ag2</span> for an agent record, which represents the agent associated with the activity.</li>
+
 </ul>
 
 <p>In PROV-ASN, an activity association record's text matches the <span class="nonterminal">activityAssociationRecord</span> productions of the grammar defined in this specification document.</p>
@@ -1404,8 +1402,8 @@
 <span class="name">(</span>
 <span class="optional"><span class="nonterminal">identifier</span>,</span>
 <span class="nonterminal">aIdentifier</span>,
-<span class="nonterminal">agIdentifier</span>,
-<span class="nonterminal">attribute-values</span>
+<span class="nonterminal">agIdentifier</span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span>
 </div>
 
@@ -1437,7 +1435,7 @@
 <li><em>id</em>:  an OPTIONAL identifier  <span class="name">id</span> identifying the start record;</li> 
 <li><em>activity</em>: an identifier <span class="name">a</span> denoting an activity record, representing the started activity;
 <li><em>agent</em>: an identifier <span class="name">ag</span> for an agent record, representing the starting agent;
-<li><em>attributes</em>: contains a set of attribute-value pairs <span class="name">attrs</span>, describing modalities according to which the agent started the activity.
+<li><em>attributes</em>: an OPTIONAL set of attribute-value pairs <span class="name">attrs</span>, describing modalities according to which the agent started the activity.
 </ul>
 
 <p>An end record, written <span class="name">wasEndedBy(id,a,ag,attrs)</span> in PROV-ASN, contains:</p>
@@ -1445,7 +1443,7 @@
 <li><em>id</em>:  an OPTIONAL identifier  <span class="name">id</span> identifying the end record;</li> 
 <li><em>activity</em>: an identifier <span class="name">a</span> denoting an activity record, representing the ended activity;
 <li><em>agent</em>: an identifier <span class="name">ag</span> for an agent record, representing the ending agent;
-<li><em>attributes</em>: contains a set of attribute-value pairs <span class="name">attrs</span>, describing modalities according to which the agent ended the activity.
+<li><em>attributes</em>: an OPTIONAL set of attribute-value pairs <span class="name">attrs</span>, describing modalities according to which the agent ended the activity.
 </ul>
 
 <p>In PROV-ASN, start and end record's texts match the <span class="nonterminal">startRecord</span> and <span class="nonterminal">endRecord</span> productions of the grammar defined in this specification document.
@@ -1458,16 +1456,16 @@
 <span class="name">(</span>
 <span class="optional"> <span class="nonterminal">identifier</span>,</span>
 <span class="nonterminal">aIdentifier</span>,
-<span class="nonterminal">agIdentifier</span>,
-<span class="nonterminal">attribute-values</span>
+<span class="nonterminal">agIdentifier</span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span><br/>
 <span class="nonterminal">endRecord</span>&nbsp;::= 
 <span class="name">wasEndedBy</span>
 <span class="name">(</span>
 <span class="optional"> <span class="nonterminal">identifier</span>,</span>
 <span class="nonterminal">aIdentifier</span>,
-<span class="nonterminal">agIdentifier</span>,
-<span class="nonterminal">attribute-values</span>
+<span class="nonterminal">agIdentifier</span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span>
 </div>
 
@@ -1580,7 +1578,7 @@
 <li><em>subordinate</em>: an identifier <span class="name">ag2</span> for an agent record, which represents an agent associated with an activity, acting on behalf of the responsible agent;</li>
 <li><em>responsible</em>: an identifier <span class="name">ag1</span> for an agent record, which represents the agent on behalf of which the subordinate agent <span class="name">ag2</span> acts;</li>
 <li><em>activity</em>: an OPTIONAL identifier <span class="name">a</span> of an activity record for which the responsibility record holds;</li>
-<li><em>attributes</em>: a set of attribute-value pairs <span class="name">attrs</span> that describe the modalities of this relation.</li>
+<li><em>attributes</em>: an OPTIONAL set of attribute-value pairs <span class="name">attrs</span> that describe the modalities of this relation.</li>
 </ul>
 
 
@@ -1591,8 +1589,8 @@
 <span class="optional"> <span class="nonterminal">identifier</span>,</span>
 <span class="nonterminal">agIdentifier</span>,
 <span class="nonterminal">agIdentifier</span>,
-<span class="optional"><span class="nonterminal">aIdentifier</span>,</span>
-<span class="nonterminal">attribute-values</span>
+<span class="optional"><span class="nonterminal">aIdentifier</span></span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span>
 </div>
 
@@ -1718,9 +1716,7 @@
 <span class="nonterminal">gIdentifier</span>
 <span class="name">,</span>
 <span class="nonterminal">uIdentifier</span>
-<span class="optional"><span class="name">,</span>
-<span class="nonterminal">attribute-values</span>
-</span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span><br/>
 <span class="nonterminal">imprecise-1-derivationRecord</span>::=  
 <span class="name">wasDerivedFrom</span>
@@ -1740,9 +1736,7 @@
 <span class="nonterminal">eIdentifier</span>
 <span class="name">,</span>
 <span class="nonterminal">eIdentifier</span>
-<span class="optional"><span class="name">,</span>
-<span class="nonterminal">attribute-values</span>
-</span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span>
 </div>
 <div class="note">
@@ -1964,9 +1958,7 @@
 <span class="nonterminal">eIdentifier</span> 
 <span class="name">,</span> 
 <span class="nonterminal">eIdentifier</span> 
-<span class="optional"><span class="name">,</span>
-<span class="nonterminal">attribute-values</span>
-</span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span> <br/>
 |
 <span class="name">wasComplementOf</span> 
@@ -1978,9 +1970,7 @@
 <span class="nonterminal">eIdentifier</span> 
 <span class="name">,</span> 
 <span class="nonterminal">accIdentifier</span>
-<span class="optional"><span class="name">,</span>
-<span class="nonterminal">attribute-values</span>
-</span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span> 
 </div>
 
@@ -2078,10 +2068,11 @@
 
 <p>An <dfn id="dfn-annotation">annotation record</dfn> establishes a link between an identifiable PROV-DM record and a note record referred to by its identifier.  Multiple note records can be associated with a given PROV-DM record; symmetrically, multiple PROV-DM records can be associated with a given note record.  Since note records have identifiers,  they can also be annotated. The annotation mechanism (with note record and the annotation record) forms a key aspect of the extensibility mechanism of PROV-DM (see <a href="#extensibility-section">extensibility section</a>).</p> 
 
-<p>An annotation record, written <span class="name">hasAnnotation(r,n)</span> in PROV-ASN, has the following constituents:</p>
+<p>An annotation record, written <span class="name">hasAnnotation(r,n,attrs)</span> in PROV-ASN, has the following constituents:</p>
 <ul>
 <li><em>record</em>: an identifier <span class="name">r</span> of the record being annnotated;</li>
 <li><em>note</em>: an identifier <span class="name">n</span> of a note record;</li>
+<li><em>attributes</em>: an OPTIONAL set <span class="name">attrs</span> of attribute-value pairs to further describe this record.</li>
 </ul>
 
 
@@ -2095,6 +2086,7 @@
 <span class="nonterminal">identifier</span>
 <span class="name">,</span>
 <span class="nonterminal">nIdentifier</span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span>
 </div>
 
@@ -2148,11 +2140,12 @@
 
 
 
-<p>An account record, written <span class="name">account(id, assertIRI, recs)</span> in PROV-ASN, contains:</p>
+<p>An account record, written <span class="name">account(id, assertIRI, recs, attrs)</span> in PROV-ASN, contains:</p>
 <ul>
 <li><em>id</em>: an identifier <span class="name">id</span>  that identifies this account globally;</li>
 <li><em>asserter</em>: an IRI, denoted by <span class="name">assertIRI</span>, to identify an asserter; such IRI has no specific interpretation in the context of PROV-DM;</li>
-<li><em>records</em>: a set <span class="name">recs</span> of provenance records.</li>
+<li><em>records</em>: a set <span class="name">recs</span> of provenance records;</li>
+<li><em>attributes</em>: an OPTIONAL set <span class="name">attrs</span> of attribute-value pairs to further describe this record.</li>
 </ul>
 
 <p>In PROV-ASN, an account record's text matches the <span class="nonterminal">accountRecord</span> production of the grammar defined in this specification document.</p>
@@ -2167,6 +2160,7 @@
 <span class="name">,</span> 
 <span class="plus">
 <span class="nonterminal">record</span> </span>
+<span class="nonterminal">optional-attribute-values</span>
 <span class="name">)</span> 
 </div>
 
@@ -3287,6 +3281,7 @@
 <section class="appendix"> 
       <h2>Changes Since First Public Working Draft</h2> 
 <ul>
+<li>12/05/11: Made attributes optional, and used non-terminal optional-attribute-values.  </li>
 <li>12/05/11: Changed syntax of recordContainer to be more user friendly, and removed list of account ids, since redundant.  </li>
 <li>12/05/11: Changed syntax of namespace declaration to be more user friendly.  </li>
 <li>12/05/11: Simplified Typed literals, now allows for intLiteral, and datatype adjusted to be qualified name.  </li>