script to setup directory for examples, added qualified and unqualified time and invovlement examples, added stubs.
authorTim L <lebot@rpi.edu>
Sun, 04 Mar 2012 12:17:02 -0500
changeset 1746 21c5814b1a20
parent 1745 00bffc506002
child 1747 2b34b98e0b54
script to setup directory for examples, added qualified and unqualified time and invovlement examples, added stubs.
examples/bin/setup-example.sh
examples/eg-1-asn-stub/asn/eg-1-asn-stub.asn
examples/eg-1-asn-stub/rdf/eg-1-asn-stub.ttl
examples/eg-11-w3c-publication/asn/convert/rdf/eg-11-w3c-publication.n3.rdf
examples/eg-12/available
examples/eg-13-unqualified-and-qualified-involvement/document/homepage
examples/eg-13-unqualified-and-qualified-involvement/rdf/eg-13-unqualified-and-qualified-involvement.ttl
examples/eg-14-unqualified-and-qualified-times/document/homepage
examples/eg-14-unqualified-and-qualified-times/rdf/eg-14-unqualified-and-qualified-times.ttl
examples/eg-3-xml-stub/xml/eg-3-xml-stub.xml
examples/eg-4-json-stub/json/eg-4-json-stub.json
ontology/ProvenanceOntology.owl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/bin/setup-example.sh	Sun Mar 04 12:17:02 2012 -0500
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+# Script to setup directory structure according to
+# http://www.w3.org/2011/prov/wiki/PROV_examples_-_directory_conventions
+# Run without arguments for usage.
+
+if [[ $# -eq 0 || "$1" == "--help" ]]; then
+   echo "usage: `basename $0` [-n] title-using-dashes {asn, rdf, xml, json}+"
+   echo "  -n : dry run; do not make the directory"
+   exit 1
+fi
+
+dryRun="no"
+if [ "$1" == "-n" ]; then
+   dryRun="yes" 
+   shift
+fi
+
+count=`find . -maxdepth 1 -name "eg-*" | wc -l`
+let "count=count+1"
+
+title="$1"
+shift
+
+eg="eg-$count-$title" 
+echo $eg
+
+echo "   $eg/document/homepage"
+if [ $dryRun == "no" ]; then
+   mkdir -p $eg/document
+   echo "http://www.w3.org/2011/prov/wiki/E${eg#e}"          > $eg/document/homepage
+   echo "http://dvcs.w3.org/hg/prov/file/tip/examples/$eg}" >> $eg/document/homepage
+fi
+
+while [ $# -gt 0 ]; do
+   format="$1"
+
+   echo
+   echo "   $eg/$format"
+   if [ $dryRun == "no" ]; then
+      mkdir -p $eg/$format
+   fi
+
+   for stub in `find eg-?-$format-stub/$format -name "eg-?-$format-stub.*"`; do
+      ext=${stub#*stub.}
+      echo "   $eg/$format/$eg.$ext <- $stub"
+      if [ $dryRun == "no" ]; then
+         if [ $format == "rdf" ]; then
+            cat $stub | sed "s/eg-2-rdf-stub/$eg/g" > $eg/$format/$eg.$ext
+         else
+            cp $stub $eg/$format/$eg.$ext
+         fi
+      fi
+   done
+
+   shift
+done
+
+echo
+echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
+echo "Go start your wiki page at http://www.w3.org/2011/prov/wiki/E${eg#e}, putting this into the page:"
+echo
+echo "{{PROV example}}"
+echo
+echo "* author:"
+echo
+echo "== Identify the problem =="
+echo "== The use of provenance =="
+echo "== The PROV example =="
+echo "* http://dvcs.w3.org/hg/prov/file/tip/examples/$eg"
+echo "== How PROV is accessed and queried? =="
+echo
+echo "[[Category:PROV example]]"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-1-asn-stub/asn/eg-1-asn-stub.asn	Sun Mar 04 12:17:02 2012 -0500
@@ -0,0 +1,1 @@
+entity(id)
--- a/examples/eg-1-asn-stub/rdf/eg-1-asn-stub.ttl	Sun Mar 04 11:26:21 2012 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-@prefix prov:    <http://www.w3.org/ns/prov#> .
-@prefix dcterms: <http://purl.org/dc/terms/> .
-@prefix foaf:    <http://xmlns.com/foaf/0.1/> .
-@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#> .
-@prefix sd:      <http://www.w3.org/ns/sparql-service-description#> .
-@prefix void:    <http://rdfs.org/ns/void#> .
-@prefix : <#> .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-11-w3c-publication/asn/convert/rdf/eg-11-w3c-publication.n3.rdf	Sun Mar 04 12:17:02 2012 -0500
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<rdf:RDF xmlns:prov="http://www.w3.org/ns/prov-o/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+  <rdf:Description rdf:about="http://www.w3.org/TR/2011/WD-prov-dm-20111018">
+    <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Entity"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://www.w3.org/TR/2011/WD-prov-dm-20111215">
+    <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Entity"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://www.w3.org/2005/10/Process-20051014/tr.html#rec-advance">
+    <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Plan"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="https://lists.w3.org/Archives/Member/chairs/2011OctDec/0004">
+    <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Entity"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="https://lists.w3.org/Archives/Member/w3c-archive/2011Oct/0141">
+    <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Entity"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="https://lists.w3.org/Archives/Member/w3c-archive/2011Dec/0111">
+    <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Entity"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://www.w3.org/TR/2011/WD-prov-dm-20111215">
+    <prov:wasDerivedFrom rdf:resource="http://www.w3.org/TR/2011/WD-prov-dm-20111018"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/pub1">
+    <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Activity"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/pub2">
+    <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Activity"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://www.w3.org/TR/2011/WD-prov-dm-20111018">
+    <prov:wasGeneratedBy rdf:resource="http://example.org/pub1"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://www.w3.org/TR/2011/WD-prov-dm-20111215">
+    <prov:wasGeneratedBy rdf:resource="http://example.org/pub2"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/pub1">
+    <prov:used rdf:resource="https://lists.w3.org/Archives/Member/chairs/2011OctDec/0004"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/pub1">
+    <prov:used rdf:resource="https://lists.w3.org/Archives/Member/w3c-archive/2011Oct/0141"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/pub2">
+    <prov:used rdf:resource="https://lists.w3.org/Archives/Member/w3c-archive/2011Dec/0111"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://www.w3.org/Consortium">
+    <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Agent"/>
+  </rdf:Description>
+  <rdf:Description rdf:nodeID="node16m5fegvux1">
+    <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Association"/>
+  </rdf:Description>
+  <rdf:Description rdf:nodeID="node16m5fegvux1">
+    <prov:hadQualifiedEntity rdf:resource="http://www.w3.org/Consortium"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/pub1">
+    <prov:hadQualifiedAssociation rdf:nodeID="node16m5fegvux1"/>
+  </rdf:Description>
+  <rdf:Description rdf:nodeID="node16m5fegvux1">
+    <prov:adoptedPlan rdf:resource="http://www.w3.org/2005/10/Process-20051014/tr.html#rec-advance"/>
+  </rdf:Description>
+  <rdf:Description rdf:nodeID="node16m5fegvux2">
+    <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Association"/>
+  </rdf:Description>
+  <rdf:Description rdf:nodeID="node16m5fegvux2">
+    <prov:hadQualifiedEntity rdf:resource="http://www.w3.org/Consortium"/>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/pub2">
+    <prov:hadQualifiedAssociation rdf:nodeID="node16m5fegvux2"/>
+  </rdf:Description>
+  <rdf:Description rdf:nodeID="node16m5fegvux2">
+    <prov:adoptedPlan rdf:resource="http://www.w3.org/2005/10/Process-20051014/tr.html#rec-advance"/>
+  </rdf:Description>
+</rdf:RDF>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-13-unqualified-and-qualified-involvement/document/homepage	Sun Mar 04 12:17:02 2012 -0500
@@ -0,0 +1,2 @@
+http://www.w3.org/2011/prov/wiki/Eg-13-unqualified-and-qualified-involvement
+http://dvcs.w3.org/hg/prov/file/tip/examples/g-13-unqualified-and-qualified-involvement
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-13-unqualified-and-qualified-involvement/rdf/eg-13-unqualified-and-qualified-involvement.ttl	Sun Mar 04 12:17:02 2012 -0500
@@ -0,0 +1,11 @@
+@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-13-unqualified-and-qualified-involvement/rdf/eg-13-unqualified-and-qualified-involvement.ttl#> .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-14-unqualified-and-qualified-times/document/homepage	Sun Mar 04 12:17:02 2012 -0500
@@ -0,0 +1,2 @@
+http://www.w3.org/2011/prov/wiki/Eg-14-unqualified-and-qualified-times
+http://dvcs.w3.org/hg/prov/file/tip/examples/g-14-unqualified-and-qualified-times
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-14-unqualified-and-qualified-times/rdf/eg-14-unqualified-and-qualified-times.ttl	Sun Mar 04 12:17:02 2012 -0500
@@ -0,0 +1,26 @@
+@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-14-unqualified-and-qualified-times/rdf/eg-14-unqualified-and-qualified-times.ttl#> .
+
+.:dataSet
+   prov:usedEntityAt  "2012-03-03T21:04:54-05:00", 
+                      "2012-04-04T21:04:54-05:00";
+   prov:used :input_1, :input_2;
+   prov:qualified [
+      a prov:Usage;
+      prov:entity :input_1;
+      prov:atTime "2012-03-03T21:04:54-05:00";
+   ], [
+      a prov:Usage;
+      prov:entity :input_2;
+      prov:atTime "2012-04-04T21:04:54-05:00"
+   ];
+. 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-3-xml-stub/xml/eg-3-xml-stub.xml	Sun Mar 04 12:17:02 2012 -0500
@@ -0,0 +1,2 @@
+<prov>
+</prov>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/eg-4-json-stub/json/eg-4-json-stub.json	Sun Mar 04 12:17:02 2012 -0500
@@ -0,0 +1,3 @@
+{
+ 
+}
--- a/ontology/ProvenanceOntology.owl	Sun Mar 04 11:26:21 2012 -0500
+++ b/ontology/ProvenanceOntology.owl	Sun Mar 04 12:17:02 2012 -0500
@@ -42,12 +42,11 @@
     <owl:AnnotationProperty rdf:about="&rdfs;seeAlso"/>
     <owl:AnnotationProperty rdf:about="&prov;involvementProperty">
         <rdfs:subPropertyOf rdf:resource="&rdfs;seeAlso"/>
-         <rdfs:comment xml:lang="en">This annotation property links a subclass of prov:Involvement to a subproperty of prov:involved. It serves as the inverse of prov:involvementClass.</rdfs:comment>
     </owl:AnnotationProperty>
     <owl:AnnotationProperty rdf:about="&rdfs;label"/>
     <owl:AnnotationProperty rdf:about="&rdfs;comment"/>
     <owl:AnnotationProperty rdf:about="&prov;involvementClass">
-        <rdfs:comment xml:lang="en">This annotation property links a prov:involved subproperty with a prov:Involvement subclass. This indicates that the property can be qualified by using prov:qualified. 
+        <rdfs:comment xml:lang="en">This annotation property links a prov:involved subproperty with a prov:Involved subclass. This indicates that the property can be qualified by using prov:qualified. 
 
 Example:
     prov:wasGeneratedBy prov:involvementClass prov:Generation .
@@ -807,7 +806,9 @@
 
     <!-- http://www.w3.org/ns/prov-o/Roled -->
 
-    <owl:Class rdf:about="&prov;Roled"/>
+    <owl:Class rdf:about="&prov;Roled">
+        <rdfs:label>To maintain OWL-RL, we cannot place [ on hasRole min 0 allValuesFrom Role ] restrictions on AgentInvolvement, Generation, Inform, StartByActivity, and Usage. So, prov:Roled is made explicit and set to the domain of hasRole. Then, the classes are subclasses of Roled. This doesn&#39;t pin it down entirely with the semantics, but can guide developers.</rdfs:label>
+    </owl:Class>