workflow.ttl synced from workflow.rdf
authorStian Soiland-Reyes <soiland-reyes@cs.manchester.ac.uk>
Fri, 30 Sep 2011 11:37:11 +0100
changeset 418 5e23de1b8ec7
parent 417 13bfa22d7e41
child 419 ef7ecac1f71a
workflow.ttl synced from workflow.rdf
ontology/examples/ontology-extensions/workflow/workflow.ttl
--- a/ontology/examples/ontology-extensions/workflow/workflow.ttl	Fri Sep 30 11:27:03 2011 +0100
+++ b/ontology/examples/ontology-extensions/workflow/workflow.ttl	Fri Sep 30 11:37:11 2011 +0100
@@ -1,205 +1,89 @@
-## NOTE: This file predates workflow.rdf and includes some alternative
-## interpretations using experimental prov2: namespace
-
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@base <http://www.example.com/run1> .
+@prefix prov: <http://dvcs.w3.org/hg/prov/raw-file/tip/ontology/ProvenanceOntology.owl#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
 @prefix cnt: <http://www.w3.org/2011/content#> .
-@prefix dcterms: <http://purl.org/dc/terms/> .
-@prefix foaf: <http://xmlns.com/foaf/0.1/> .
-
-
-@prefix prov: <http://dvcs.w3.org/hg/prov/raw-file/tip/ontology/ProvenanceOntology.owl#> .
-# Not (yet) in the official OWL
-@prefix prov2: <http://www.w3.org/2011/prov/new#> .
-
-# Domain-specific ontologies
 @prefix wf: <http://www.example.com/scientific-workflow#> .
-@prefix impl: <http://company.example.org/engine-implementation#> .
-
-# The workflow definition
-@prefix def: <http://my.example.com/workflow-definition#> .
-
-:workflowEngine a impl:WorkflowEngine, prov:Agent .
-
-:aUser a prov:Agent, foaf:Person ;
-    foaf:name "Stian Soiland-Reyes" .
-
-
-# This document is the provenance container (or is that prov:Account ?)
-<> a prov:ProvenanceContainer ; 
-    prov:wasGeneratedBy [
-        # Metadata about who generated the provenance container
-        a prov:ProcessExecution, wf:ProvenanceExport ;
-        prov:used :workflowRun ;
-        prov:wasControlledBy :workflowEngine 
-    ] .
-
-
-:inputFile a prov:Entity, impl:FileValue ;
-    # Note that this file comes from the outside, so we don't know which
-    # process execution it :wasGeneratedBy
-    impl:file "/tmp/myinput.txt" ;
-    impl:value [ 
-        # Snapshot of actual value as it was read by :wfEngine
-        a cnt:ContentAsText ;
-        cnt:characterEncoding "UTF-8" ;
-        cnt:chars "Steve" 
-    ] .
-
-
-:input a prov:Entity, wf:Value ;
-
-    prov:wasDerivedFrom :inputFile ;
-    # as sub-property
-    impl:wasReadFrom :inputFile ;
-
-    prov:wasGeneratedBy [     wf:ranInWorkflowEngine :workflowEngine ; ] ;
-    # We chose not to to capture and describe any further details about
-    # the file-reading process execution, but we know this value was
-    # derived from :inputFile by reading it, initiated by the workflow
-    # engine and selected by the user.
-
-    # The reason :input is used by the workflow below instead of
-    # :inputFile is that the content of impl:file might have changed by
-    # the time :input was used - but it is *this* value which was kept
-    # in memory and used by the workflow. We know it was read from the
-    # file before the first usage of :input, and the beginning of
-    # :workflowEngine.
-
-    wf:value [ 
-        a cnt:ContentAsText ;
-        cnt:characterEncoding "UTF-8" ;
-        cnt:chars "Steve" 
-    ] .
-
-
-:workflowRun a prov:ProcessExecution, wf:Process ;
-    prov2:recipe def:workflowDef ;
-    wf:wasDefinedBy def:workflowDef ;
-
-    prov:wasControlledBy :workflowEngine, :aUser ;
-    # or using sub-properties
-    wf:wasLaunchedBy :aUser ;
-    wf:ranInWorkflowEngine :workflowEngine ;
-    prov:used [ a prov:Entity, prov2:EntityInRole, wf:ValueAtPort ;
-        # role-as-complement-of syntax
-        # http://lists.w3.org/Archives/Public/public-prov-wg/2011Sep/0170.html
-        prov:wasComplementOf :input ;
-        # Or should that be a specific sub-property?
-        prov2:wasAssumedBy :input ;
-
-        prov2:assumedRole def:inName ;
-        prov2:assumedRoleName "name" ;
-        wf:seenAtPort def:inName 
-    ] ;
-    prov2:startedAt "2011-09-16 16:17:00" ;
-    prov2:endedAt "2011-09-16 16:17:05" .
-
+@prefix w: <http://www.example.com/workflow1#> .
+@prefix : <#> .
+    
+:aUser     a prov:Agent, foaf:Person ;
+     foaf:name "Stian Soiland-Reyes" .
 
-:constant a prov:ProcessExecution, wf:Process ;
-    prov:wasControlledBy :workflowRun ;
-    wf:wasSubProcessExecutionOf :workflowRun ;
-
-    prov2:recipe def:procConstant ;
-    wf:wasDefinedBy def:procConstant ;
-
-    prov2:startedAt "2011-09-16 16:17:00" ;
-    prov2:endedAt "2011-09-16 16:17:01" .
-
-
-:hello a prov:Entity, wf:Value ;
-    :wasGeneratedBy :constant ;
-    impl:value [
-        a cnt:ContentAsText ;
-        cnt:chars "Hello, ";
-    ] .
-
-# need to complement :hello to describe the role
-:helloValue a prov:Entity, wf:Value, prov2:EntityInRole ;
-    prov:wasGeneratedBy :constant ;
-    prov:wasComplementOf :hello ;
-    prov2:assumedRole def:value ;
-    impl:value [
-        a cnt:ContentAsText ;
-        cnt:chars "Hello, ";
-    ] .
-
-:combine a prov:ProcessExecution, wf:Process ;
-    prov:wasControlledBy :workflowRun ;
-    wf:wasSubProcessExecutionOf :workflowRun ;
-
-    prov2:recipe def:procCat ;
-    wf:wasDefinedBy def:procCat ;
-
-    prov:used [ a prov2:EntityInRole ;
-        prov:wasComplementOf :hello ;
-        prov2:usedAt "2011-09-16 16:17:02" ;
-        prov2:assumedRole def:catIn1 ;
-        wf:seenAtPort def:catIn1 ;
-      ], [ a prov2:EntityInRole ;
-        prov:wasComplementOf :input ;
-        prov2:usedAt "2011-09-16 16:17:01" ;
-        prov2:assumedRole def:catIn2 ;
-        wf:seenAtPort def:catIn2;
-      ] ;
-    prov2:startedAt "2011-09-16 16:17:01" ;
-    prov2:endedAt "2011-09-16 16:17:03" .
+:workflowEngine     a wf:WorkflowEngine .
 
-:combined a prov:Entity ;
-    prov:wasGeneratedBy :combine ;
-    impl:value [
-        a cnt:ContentAsText ;
-        cnt:chars "Hello, Steve"
-    ] .
-
-:shasum a prov:ProcessExecution, wf:Process ;
-    prov:wasControlledBy :workflowRun ;
-    wf:wasSubProcessExecutionOf :workflowRun ;
-
-    prov2:recipe def:procShasum ;
-    wf:wasDefinedBy def:procShasum ;
-
-    # used :combined directly here without a role, this process only
-    # have a single input anyway
-    prov:used :combined ; 
-
-    prov2:startedAt "2011-09-16 16:17:04" ;
-    prov2:endedAt "2011-09-16 16:17:05" .
+:inputFile     a wf:FileValue;
+     wf:file "/tmp/myinput.txt";
+     wf:value  [ a cnt:ContentAsText;
+         cnt:characterEncoding "UTF-8";
+         cnt:chars "Steve" ] .
 
-:sha1 a prov:Entity ;
-    # How was this generated..? Well, see below
-    wf:value [
-        a cnt:ContentAsText ;
-        cnt:characterEncoding "UTF-8" ;
-        cnt:chars "a33d1fb1658d4fbf017de59ab67437a3eb5ff50d" 
-    ] .
-    
-# As the output of :shasum
-:sha1OutputFromShasum a prov:Entity, prov2:EntityInRole ;
-    prov:wasGeneratedBy :shasum ;
-    prov:wasComplementOf :sha1 ;
-    prov2:assumedRole def:shaOut ;
-    wf:wasSeenAt def:shaOut ; 
-    prov2:generatedAt "2011-09-16 16:17:05" ;
-    wf:value [
-        a cnt:ContentAsText ;
-        cnt:characterEncoding "UTF-8" ;
-        cnt:chars "a33d1fb1658d4fbf017de59ab67437a3eb5ff50d" 
-    ] .
+:input     a wf:Value;
+     wf:value  [ a cnt:ContentAsText;
+         cnt:characterEncoding "UTF-8";
+         cnt:chars "Steve" ];
+     wf:wasReadFrom :inputFile .
 
-# Or as the output of :workflowRun
-:sha1OutputFromWorkflow a prov:Entity, prov2:EntityInRole ;
-    prov:wasGeneratedBy :workflowRun ;
-    prov:wasComplementOf :sha1 ;
-    prov2:assumedRole def:output ;
-    wf:wasSeenAt def:output ; 
-    # A bit later than :sha1OutputFromShasum 
-    prov2:generatedAt "2011-09-16 16:17:06" ;
-    wf:value [
-        a cnt:ContentAsText ;
-        cnt:characterEncoding "UTF-8" ;
-        cnt:chars "a33d1fb1658d4fbf017de59ab67437a3eb5ff50d" 
-    ] .
+:workflowRun     a wf:Process;
+     prov:used  [ a wf:ValueAtPort;
+         wf:sawValue :input;
+         wf:seenAtPort w:inName ];
+     wf:ranInWorkflowEngine :workflowEngine;
+     wf:wasDefinedBy w:workflow;
+     wf:wasLaunchedBy :aUser .
 
+:constant     a wf:Process;
+     wf:wasDefinedBy w:String_Constant;
+     wf:wasSubProcessExecutionOf :workflowRun .
 
+:hello     a wf:Value;
+     prov:wasGeneratedBy :constant;
+     wf:value  [ a cnt:ContentAsText;
+         cnt:chars "Hello, " ] .
+
+:helloValue     a wf:ValueAtPort;
+     prov:wasGeneratedBy :constant;
+     wf:sawEntity :hello;
+     wf:value  [ a cnt:ContentAsText;
+         cnt:chars "Hello, " ] .
+
+: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 .
+
+:combined     a wf:Value;
+     prov:wasGeneratedBy :combine;
+     wf:value  [ a cnt:ContentAsText;
+         cnt:chars "Hello, Steve" ] .
+
+:shasum     a wf:Process;
+     prov:used :combined;
+     wf:wasDefinedBy w:shasum;
+     wf:wasSubProcessExecutionOf :workflowRun .
+
+:sha1     a wf:Value;
+     wf:value  [ a cnt:ContentAsText;
+         cnt:characterEncoding "UTF-8";
+         cnt:chars "a33d1fb1658d4fbf017de59ab67437a3eb5ff50d" ] .
+
+:sha1OutputFromShasum     a wf:EntityAtPort;
+     prov:wasGeneratedBy :shasum;
+     wf:sawValue :sha1;
+     wf:value  [ a cnt:ContentAsText;
+         cnt:characterEncoding "UTF-8";
+         cnt:chars "a33d1fb1658d4fbf017de59ab67437a3eb5ff50d" ];
+     wf:wasSeenAt w:shaOut .
+
+:sha1OutputFromWorkflow     a wf:EntityAtPort;
+     prov:wasGeneratedBy :workflowRun;
+     wf:sawValue :sha1;
+     wf:value  [ a cnt:ContentAsText;
+         cnt:characterEncoding "UTF-8";
+         cnt:chars "a33d1fb1658d4fbf017de59ab67437a3eb5ff50d" ];
+     wf:wasSeenAt w:sha1 .
+