hadusage hadgeneration backtracking qualification pattern eg
authorTim L <lebot@rpi.edu>
Tue, 17 Jul 2012 09:31:11 -0400
changeset 4084 5f314fd3c10a
parent 4083 1f56fd7ed2c2
child 4085 4bd5f4b96d2c
hadusage hadgeneration backtracking qualification pattern eg
examples/eg-39-derivation-hadusage-hadgeneration-backtracking/document/homepage
examples/eg-39-derivation-hadusage-hadgeneration-backtracking/rdf/eg-39-derivation-hadusage-hadgeneration-backtracking.ttl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-39-derivation-hadusage-hadgeneration-backtracking/document/homepage	Tue Jul 17 09:31:11 2012 -0400
@@ -0,0 +1,2 @@
+http://www.w3.org/2011/prov/wiki/Eg-39-derivation-hadusage-hadgeneration-backtracking
+http://dvcs.w3.org/hg/prov/file/tip/examples/eg-39-derivation-hadusage-hadgeneration-backtracking
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-39-derivation-hadusage-hadgeneration-backtracking/rdf/eg-39-derivation-hadusage-hadgeneration-backtracking.ttl	Tue Jul 17 09:31:11 2012 -0400
@@ -0,0 +1,73 @@
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@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 dcterms: <http://purl.org/dc/terms/> .
+@prefix sd:      <http://www.w3.org/ns/sparql-service-description#> .
+@prefix dcat:    <http://www.w3.org/ns/dcat#> .
+@prefix void:    <http://rdfs.org/ns/void#> .
+@prefix foaf:    <http://xmlns.com/foaf/0.1/> .
+@prefix prov:    <http://www.w3.org/ns/prov#> .
+@prefix :        <http://dvcs.w3.org/hg/prov/raw-file/tip/examples/eg-39-derivation-hadusage-hadgeneration-backtracking/rdf/eg-39-derivation-hadusage-hadgeneration-backtracking.ttl#> .
+
+# cut 1:
+
+:temperatureDisplay
+  a prov:Entity;
+  prov:hadPrimarySource :sensorReading20120510;
+  prov:qualifiedSource [
+     a prov:Source;
+     prov:entity        :sensorReading20120510;
+     prov:hadGeneration [
+        a prov:Generation;
+        prov:activity :display-weather;  # what is the subject we're reifying here?
+     ];
+  ];
+.
+
+
+# cut 2:
+
+:temperatureDisplay prov:wasGeneratedBy :displayWeather
+prov:qualifiedGeneration :gen01
+
+
+and then
+
+prov:hadGeneration :gen01.
+
+
+# cut 3:
+
+#But since Source is a kind of Derivation [1] , I can use hadActivity, hadUsage, and hadGeneration. Let's use all three:
+# [1] http://aquarius.tw.rpi.edu/prov-wg/prov-o#Derivation
+
+:cake prov:wasDerivedFrom :egg;
+           prov:qualifiedDerivation :my_derivation;
+.
+
+:my_derivation
+   a prov:Derivation;
+   prov:hadActivity        :cake_activity;    # This is what started, used egg, generated cake, and ended
+   prov:hadUsage         :egg_usage;
+   prov:hadGeneration :cake_generation;
+.
+
+#According to the qualified pattern, the Influences :egg_usage and :cake_generation only cite the influencer (not the influenced).
+#The "influenced" is given by the subject of the "qualified{Usage,Generation}" property, 
+#****which are not present****.
+
+:egg_usage a prov:Usage;    # how is :cake tied to this?
+    prov:entity :egg;
+.
+
+:cake_generation a prov:Generation;    # how is :egg tied to this?
+    prov:entity :cake;
+.
+
+#To find out the influenced ":cake" from :egg_usage, we need to backtrack through the derivation and "hang a left".
+#To find out the influenced ":egg" from :cake_generation, we need to backtrack through the derivation and "hang a right".
+
+#This ambiguity ("left or right") seemed like a pandora's box, but I guess those are the only two cases, so it's not terrible and perhaps even consistent with the rest of the paradigm.
+
+# I think I'm comfortable now, but this "left right rule" needs to be known.