Updated to show times
authorStian Soiland-Reyes <soiland-reyes@cs.manchester.ac.uk>
Wed, 26 Oct 2011 15:52:00 +0100
changeset 790 1176dfae5b22
parent 789 cc807162645f
child 791 a2e5a25cd04c
Updated to show times
ontology/examples/ontology-extensions/workflow/workflow.rdf
ontology/examples/ontology-extensions/workflow/workflow.ttl
--- a/ontology/examples/ontology-extensions/workflow/workflow.rdf	Wed Oct 26 15:13:02 2011 +0100
+++ b/ontology/examples/ontology-extensions/workflow/workflow.rdf	Wed Oct 26 15:52:00 2011 +0100
@@ -1,16 +1,18 @@
-<rdf:RDF xmlns="http://www.w3.org/ns/prov-o/"
+<rdf:RDF 
     xmlns:cnt="http://www.w3.org/2011/content#"
     xmlns:foaf="http://xmlns.com/foaf/0.1/"
     xmlns:prov="http://www.w3.org/ns/prov-o/"
     xmlns:time="http://www.w3.org/2006/time#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:wf="http://www.example.com/scientific-workflow#"
-    xmlns:base="http://www.example.com/run1#" >
+    xmlns:run="http://www.example.com/run1#"
+    xmlns:base="http://www.example.com/run1#"
+    >
 
-    <Agent rdf:about="#aUser">
+    <prov:Agent rdf:about="#aUser">
         <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
         <foaf:name>Stian Soiland-Reyes</foaf:name>
-    </Agent>
+    </prov:Agent>
 
     <wf:WorkflowEngine rdf:about="#workflowEngine" />
 
@@ -35,7 +37,7 @@
     </wf:Value>
 
     <wf:Process rdf:about="#workflowRun">
-        <used>
+        <prov:used>
             <wf:ValueAtPort>
                 <wf:sawValue rdf:resource="#input"/>
                 <wf:seenAtPort rdf:resource="http://www.example.com/workflow1#inName"/>
@@ -45,20 +47,38 @@
                     </prov:Time>
                 </prov:assumedRoleAt>
             </wf:ValueAtPort>
-        </used>
+        </prov:used>
         <wf:ranInWorkflowEngine rdf:resource="#workflowEngine"/>
         <wf:wasLaunchedBy rdf:resource="#aUser"/>
         <wf:wasDefinedBy rdf:resource="http://www.example.com/workflow1#workflow"/>
+        <prov:startedAt>
+            <prov:Time>
+                <time:inDateTimeXSD>2011-10-21T09:20:15Z</time:inDateTimeXSD>
+            </prov:Time>
+        </prov:startedAt>
+        <prov:endedAt>
+            <prov:Time>
+                <time:inDateTimeXSD>2011-10-21T09:23:32Z</time:inDateTimeXSD>
+            </prov:Time>
+        </prov:endedAt>
     </wf:Process>
 
     <wf:Process rdf:about="#constant">
         <wf:wasSubProcessExecutionOf rdf:resource="#workflowRun"/>
         <wf:wasDefinedBy
         rdf:resource="http://www.example.com/workflow1#String_Constant"/>
+        <prov:startedAt>
+            <prov:Time rdf:about="#t0">
+                <time:inDateTimeXSD>2011-10-21T09:20:15Z</time:inDateTimeXSD>
+            </prov:Time>
+        </prov:startedAt>
+        <prov:endedAt rdf:resource="#t0" />
     </wf:Process>
 
     <wf:Value rdf:about="#hello">
-        <wasGeneratedBy rdf:resource="#constant"/>
+        <prov:wasGeneratedBy rdf:resource="#constant"/>
+        <prov:wasGeneratedAt rdf:resource="#t0"/>
+        <prov:endedAt rdf:resource="#t0" />
         <wf:value>
             <cnt:ContentAsText>
                 <cnt:chars>Hello, </cnt:chars>
@@ -67,7 +87,7 @@
     </wf:Value>
 
     <wf:ValueAtPort rdf:about="#helloValue">
-        <wasGeneratedBy rdf:resource="#constant"/>
+        <prov:wasGeneratedBy rdf:resource="#constant"/>
         <wf:value>
             <cnt:ContentAsText>
                 <cnt:chars>Hello, </cnt:chars>
@@ -77,24 +97,44 @@
     </wf:ValueAtPort>
 
     <wf:Process rdf:about="#combine">
-        <used>
-          <wf:EntityAtPort>
+        <prov:used>
+          <wf:ValueAtPort>
             <wf:sawValue rdf:resource="#hello"/>
             <wf:seenAtPort rdf:resource="http://www.example.com/workflow1#catIn1"/>
-          </wf:EntityAtPort>
-        </used>
-        <used>
-          <wf:EntityAtPort>
+            <prov:assumedRoleAt>
+                <prov:Time>
+                    <time:inDateTimeXSD>2011-10-21T09:20:21Z</time:inDateTimeXSD>
+                </prov:Time>
+            </prov:assumedRoleAt>
+          </wf:ValueAtPort>
+        </prov:used>
+        <prov:used>
+          <wf:ValueAtPort>
             <wf:sawValue rdf:resource="#input"/>
             <wf:seenAtPort rdf:resource="http://www.example.com/workflow1#catIn2"/>
-          </wf:EntityAtPort>
-        </used>
+            <prov:assumedRoleAt>
+                <prov:Time>
+                    <time:inDateTimeXSD>2011-10-21T09:20:23Z</time:inDateTimeXSD>
+                </prov:Time>
+            </prov:assumedRoleAt>
+          </wf:ValueAtPort>
+        </prov:used>
         <wf:wasSubProcessExecutionOf rdf:resource="#workflowRun"/>
         <wf:wasDefinedBy rdf:resource="http://www.example.com/workflow1#cat"/>
+        <prov:startedAt>
+            <prov:Time>
+                <time:inDateTimeXSD>2011-10-21T09:20:20Z</time:inDateTimeXSD>
+            </prov:Time>
+        </prov:startedAt>
+        <prov:endedAt>
+            <prov:Time>
+                <time:inDateTimeXSD>2011-10-21T09:20:25Z</time:inDateTimeXSD>
+            </prov:Time>
+        </prov:endedAt>
     </wf:Process>
 
     <wf:Value rdf:about="#combined">
-        <wasGeneratedBy rdf:resource="#combine"/>
+        <prov:wasGeneratedBy rdf:resource="#combine"/>
         <wf:value>
             <cnt:ContentAsText>
                 <cnt:chars>Hello, Steve</cnt:chars>
@@ -103,9 +143,19 @@
     </wf:Value>
 
     <wf:Process rdf:about="#shasum">
-        <used rdf:resource="#combined"/>
+        <prov:used rdf:resource="#combined"/>
         <wf:wasSubProcessExecutionOf rdf:resource="#workflowRun"/>
         <wf:wasDefinedBy rdf:resource="http://www.example.com/workflow1#shasum"/>
+        <prov:startedAt>
+            <prov:Time>
+                <time:inDateTimeXSD>2011-10-21T09:20:30Z</time:inDateTimeXSD>
+            </prov:Time>
+        </prov:startedAt>
+        <prov:endedAt>
+            <prov:Time>
+                <time:inDateTimeXSD>2011-10-21T09:21:00Z</time:inDateTimeXSD>
+            </prov:Time>
+        </prov:endedAt>
     </wf:Process>
 
     <wf:Value rdf:about="#sha1">
@@ -117,8 +167,8 @@
         </wf:value>
     </wf:Value>
 
-    <wf:EntityAtPort rdf:about="#sha1OutputFromShasum">
-        <wasGeneratedBy rdf:resource="#shasum"/>
+    <wf:ValueAtPort rdf:about="#sha1OutputFromShasum">
+        <prov:wasGeneratedBy rdf:resource="#shasum"/>
         <wf:value>
             <cnt:ContentAsText>
                 <cnt:characterEncoding>UTF-8</cnt:characterEncoding>
@@ -127,10 +177,10 @@
         </wf:value>
         <wf:sawValue rdf:resource="#sha1"/>
         <wf:wasSeenAt rdf:resource="http://www.example.com/workflow1#shaOut"/>
-    </wf:EntityAtPort>
+    </wf:ValueAtPort>
 
-    <wf:EntityAtPort rdf:about="#sha1OutputFromWorkflow">
-        <wasGeneratedBy rdf:resource="#workflowRun"/>
+    <wf:ValueAtPort rdf:about="#sha1OutputFromWorkflow">
+        <prov:wasGeneratedBy rdf:resource="#workflowRun"/>
         <wf:value>
             <cnt:ContentAsText>
                 <cnt:characterEncoding>UTF-8</cnt:characterEncoding>
@@ -139,6 +189,6 @@
         </wf:value>
         <wf:sawValue rdf:resource="#sha1"/>
         <wf:wasSeenAt rdf:resource="http://www.example.com/workflow1#sha1"/>
-    </wf:EntityAtPort>
+    </wf:ValueAtPort>
 
 </rdf:RDF>
--- a/ontology/examples/ontology-extensions/workflow/workflow.ttl	Wed Oct 26 15:13:02 2011 +0100
+++ b/ontology/examples/ontology-extensions/workflow/workflow.ttl	Wed Oct 26 15:52:00 2011 +0100
@@ -1,89 +1,142 @@
-@base <http://www.example.com/run1> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
 @prefix prov: <http://www.w3.org/ns/prov-o/> .
+@prefix time: <http://www.w3.org/2006/time#> .
+@prefix run: <http://www.example.com/run1#> .
 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
 @prefix cnt: <http://www.w3.org/2011/content#> .
 @prefix wf: <http://www.example.com/scientific-workflow#> .
-@prefix w: <http://www.example.com/workflow1#> .
-@prefix : <#> .
-    
-:aUser     a prov:Agent, foaf:Person ;
-     foaf:name "Stian Soiland-Reyes" .
+
 
 :workflowEngine     a wf:WorkflowEngine .
 
+:aUser     a prov:Agent,
+            foaf:Person;
+     foaf:name "Stian Soiland-Reyes" .
+
 :inputFile     a wf:FileValue;
      wf:file "/tmp/myinput.txt";
-     wf:value  [ a cnt:ContentAsText;
+     wf:value  [
+         a cnt:ContentAsText;
          cnt:characterEncoding "UTF-8";
          cnt:chars "Steve" ] .
 
 :input     a wf:Value;
-     wf:value  [ a cnt:ContentAsText;
+     wf:value  [
+         a cnt:ContentAsText;
          cnt:characterEncoding "UTF-8";
          cnt:chars "Steve" ];
      wf:wasReadFrom :inputFile .
 
 :workflowRun     a wf:Process;
-     prov:used  [ a wf:ValueAtPort;
+     wf:ranInWorkflowEngine :workflowEngine;
+     wf:wasDefinedBy <http://www.example.com/workflow1#workflow>;
+     wf:wasLaunchedBy :aUser;
+     prov:startedAt  [
+         a prov:Time;
+         time:inDateTimeXSD "2011-10-21T09:20:15Z" ];
+     prov:endedAt  [
+         a prov:Time;
+         time:inDateTimeXSD "2011-10-21T09:23:32Z" ];
+     prov:used  [
+         a wf:ValueAtPort;
          wf:sawValue :input;
-         wf:seenAtPort w:inName ];
-     wf:ranInWorkflowEngine :workflowEngine;
-     wf:wasDefinedBy w:workflow;
-     wf:wasLaunchedBy :aUser .
+         wf:seenAtPort <http://www.example.com/workflow1#inName>;
+         prov:assumedRoleAt  [
+             a prov:Time;
+             time:inDateTimeXSD "2011-10-21T09:21:31Z" ] 
+         ] .
+
+:t0     a prov:Time;
+     time:inDateTimeXSD "2011-10-21T09:20:15Z" .
 
 :constant     a wf:Process;
-     wf:wasDefinedBy w:String_Constant;
-     wf:wasSubProcessExecutionOf :workflowRun .
+     <endedAt> :t0;
+     wf:wasDefinedBy <http://www.example.com/workflow1#String_Constant>;
+     wf:wasSubProcessExecutionOf :workflowRun;
+     prov:startedAt :t0 .
 
 :hello     a wf:Value;
-     prov:wasGeneratedBy :constant;
-     wf:value  [ a cnt:ContentAsText;
-         cnt:chars "Hello, " ] .
+     wf:value  [
+         a cnt:ContentAsText;
+         cnt:chars "Hello, " ];
+     prov:endedAt :t0;
+     prov:wasGeneratedAt :t0;
+     prov:wasGeneratedBy :constant .
 
 :helloValue     a wf:ValueAtPort;
-     prov:wasGeneratedBy :constant;
      wf:sawEntity :hello;
-     wf:value  [ a cnt:ContentAsText;
-         cnt:chars "Hello, " ] .
+     wf:value  [
+         a cnt:ContentAsText;
+         cnt:chars "Hello, " ];
+     prov:wasGeneratedBy :constant .
+
 
 :combine     a wf:Process;
-     prov:used  [ a wf:EntityAtPort;
-             wf:sawValue :hello;
-             wf:seenAtPort w:catIn1 ],
-         [ a wf:EntityAtPort;
-             wf:sawValue :input;
-             wf:seenAtPort w:catIn2 ];
-     wf:wasDefinedBy w:cat;
-     wf:wasSubProcessExecutionOf :workflowRun .
+     wf:wasDefinedBy <http://www.example.com/workflow1#cat>;
+     wf:wasSubProcessExecutionOf :workflowRun;
+     prov:endedAt  [
+         a prov:Time;
+         time:inDateTimeXSD "2011-10-21T09:20:25Z" ];
+     prov:startedAt  [
+         a prov:Time;
+         time:inDateTimeXSD "2011-10-21T09:20:20Z" ];
+     prov:used  [
+         a wf:ValueAtPort;
+         wf:sawValue :hello;
+         wf:seenAtPort <http://www.example.com/workflow1#catIn1>;
+         prov:assumedRoleAt  [
+             a prov:Time;
+             time:inDateTimeXSD "2011-10-21T09:20:21Z" ] 
+       ], [
+         a wf:ValueAtPort;
+         wf:sawValue :input;
+         wf:seenAtPort <http://www.example.com/workflow1#catIn2>;
+         prov:assumedRoleAt  [
+             a prov:Time;
+             time:inDateTimeXSD "2011-10-21T09:20:23Z" ] 
+       ] .
 
 :combined     a wf:Value;
-     prov:wasGeneratedBy :combine;
-     wf:value  [ a cnt:ContentAsText;
-         cnt:chars "Hello, Steve" ] .
+     wf:value  [
+         a cnt:ContentAsText;
+         cnt:chars "Hello, Steve" ];
+     prov:wasGeneratedBy :combine .
 
 :shasum     a wf:Process;
-     prov:used :combined;
-     wf:wasDefinedBy w:shasum;
-     wf:wasSubProcessExecutionOf :workflowRun .
+     wf:wasDefinedBy <http://www.example.com/workflow1#shasum>;
+     wf:wasSubProcessExecutionOf :workflowRun;
+     prov:startedAt  [
+         a prov:Time;
+         time:inDateTimeXSD "2011-10-21T09:20:30Z" ];
+     prov:endedAt  [
+         a prov:Time;
+         time:inDateTimeXSD "2011-10-21T09:21:00Z" ];
+     prov:used :combined .
+
 
 :sha1     a wf:Value;
-     wf:value  [ a cnt:ContentAsText;
+     wf:value  [
+         a cnt:ContentAsText;
          cnt:characterEncoding "UTF-8";
          cnt:chars "a33d1fb1658d4fbf017de59ab67437a3eb5ff50d" ] .
 
-:sha1OutputFromShasum     a wf:EntityAtPort;
-     prov:wasGeneratedBy :shasum;
+:sha1OutputFromShasum     a wf:ValueAtPort;
      wf:sawValue :sha1;
-     wf:value  [ a cnt:ContentAsText;
+     wf:value  [
+         a cnt:ContentAsText;
          cnt:characterEncoding "UTF-8";
          cnt:chars "a33d1fb1658d4fbf017de59ab67437a3eb5ff50d" ];
-     wf:wasSeenAt w:shaOut .
+     wf:wasSeenAt <http://www.example.com/workflow1#shaOut>;
+     prov:wasGeneratedBy :shasum .
 
-:sha1OutputFromWorkflow     a wf:EntityAtPort;
-     prov:wasGeneratedBy :workflowRun;
+:sha1OutputFromWorkflow     a wf:ValueAtPort;
      wf:sawValue :sha1;
-     wf:value  [ a cnt:ContentAsText;
+     wf:value  [
+         a cnt:ContentAsText;
          cnt:characterEncoding "UTF-8";
          cnt:chars "a33d1fb1658d4fbf017de59ab67437a3eb5ff50d" ];
-     wf:wasSeenAt w:sha1 .
+     wf:wasSeenAt <http://www.example.com/workflow1#sha1>;
+     prov:wasGeneratedBy :workflowRun .
 
+
+