updated ns concatenation script and template
authorTim L <lebot@rpi.edu>
Fri, 26 Apr 2013 11:47:56 -0400
changeset 6342 f2b088b74077
parent 6341 77eb85d5327e
child 6343 11f159a21a56
updated ns concatenation script and template
namespace/bin/prov-ns.sh
namespace/bin/prov-ns.xsl
namespace/prov.owl
namespace/prov.ttl
--- a/namespace/bin/prov-ns.sh	Fri Apr 26 11:18:50 2013 -0400
+++ b/namespace/bin/prov-ns.sh	Fri Apr 26 11:47:56 2013 -0400
@@ -2,6 +2,11 @@
 #3> <> prov:wasAttributedTo <http://tw.rpi.edu/instances/TimLebo>,
 #3>                         <http://data.semanticweb.org/person/paul-groth>;
 #3>    rdfs:seeAlso <readme.md> .
+#
+# This script follows ../prov.owl as a template to produce a releasable concatenation at ../releases/$version/prov.owl.
+#
+# This script will materialize any prov:hadDerivation that appears in prov.owl, 
+# by fetching the OWL and Turtle versions that are hard-coded into this script (for Turtle) and in prov-ns.xsl (for RDF/XML).
 
    prev="prov-YYYYmmdd"
 version="prov-YYYYMMDD"
@@ -28,7 +33,7 @@
    mkdir -p `dirname $release` 
 fi
 
-java -jar $HOME/lib/saxon9.jar $HOME/prov.owl $HOME/bin/prov-ns-rdfxml.xsl previous-version=$prev version=$version > $release
+java -jar $HOME/lib/saxon9.jar $HOME/prov.owl $HOME/bin/prov-ns.xsl previous-version=$prev version=$version > $release
 
 echo
 release=${release##`pwd`/}
@@ -38,7 +43,8 @@
 
 turtle=${release%.owl}.ttl
 echo $turtle
-rapper -q -g -o turtle $HOME/prov.owl           > $turtle
+echo "#3> <> prov:wasDerivedFrom <prov.owl> ."  > $turtle
+rapper -q -g -o turtle $HOME/prov.owl          >> $turtle
 perl -pi -e "s/YYYYMMDD/$version/g"               $turtle
 perl -pi -e "s/YYYYmmdd/$prev/g"                  $turtle
 
@@ -46,14 +52,24 @@
 # $2: ontology location
 function materialize_import { 
    #echo "$turtle += $1"
+   echo "Including $1 from $2"
    echo                                        >> $turtle
    echo "# The following was imported from $2" >> $turtle
    echo                                        >> $turtle
    curl -Ls $2 | grep -v "^@prefix"            >> $turtle
 } 
 
-materialize_import 'http://www.w3.org/ns/prov-o#'          http://www.w3.org/ns/prov-o.ttl
-materialize_import 'http://www.w3.org/ns/prov-o-inverses#' http://www.w3.org/ns/prov-o-inverses.ttl
-materialize_import 'http://www.w3.org/ns/prov-aq#'         http://dvcs.w3.org/hg/prov/raw-file/tip/paq/prov-aq.ttl
-materialize_import 'http://www.w3.org/ns/prov-dictionary#' http://dvcs.w3.org/hg/prov/raw-file/tip/dictionary/prov-dictionary.ttl
-materialize_import 'http://www.w3.org/ns/prov-links#'      http://dvcs.w3.org/hg/prov/file/tip/links/prov-mention.ttl
+# NOTE: These ontology-source mappings need to be stated in bin/prov-ns.xsl, too.
+materialize_import 'http://www.w3.org/ns/prov-o#'          https://dvcs.w3.org/hg/prov/raw-file/tip/namespace/prov-o.ttl
+materialize_import 'http://www.w3.org/ns/prov-o-inverses#' https://dvcs.w3.org/hg/prov/raw-file/tip/namespace/prov-o-inverses.ttl
+materialize_import 'http://www.w3.org/ns/prov-aq#'         https://dvcs.w3.org/hg/prov/raw-file/tip/namespace/prov-aq.ttl
+materialize_import 'http://www.w3.org/ns/prov-dc#'         https://dvcs.w3.org/hg/prov/raw-file/tip/namespace/prov-dc.ttl
+materialize_import 'http://www.w3.org/ns/prov-dictionary#' https://dvcs.w3.org/hg/prov/raw-file/tip/namespace/prov-dictionary.ttl
+materialize_import 'http://www.w3.org/ns/prov-links#'      https://dvcs.w3.org/hg/prov/raw-file/tip/namespace/prov-links.ttl
+
+#prov-o.ttl
+#prov-o-inverses.ttl
+#prov-aq.ttl
+#prov-dc.ttl
+#prov-dictionary.ttl
+#prov-links.ttl
--- a/namespace/bin/prov-ns.xsl	Fri Apr 26 11:18:50 2013 -0400
+++ b/namespace/bin/prov-ns.xsl	Fri Apr 26 11:47:56 2013 -0400
@@ -11,20 +11,23 @@
 
 <xsl:variable name="namespace" rdf:about="http://www.w3.org/ns/prov#">
    <prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-o#">
-      <prov:hadLocation rdf:resource="http://www.w3.org/ns/prov-o.owl"/>
+      <prov:hadLocation rdf:resource="https://dvcs.w3.org/hg/prov/raw-file/tip/namespace/prov-o.owl"/>
    </prov:wasDerivedFrom> 
    <prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-o-inverses#">
-      <prov:hadLocation rdf:resource="http://www.w3.org/ns/prov-o-inverses.owl"/>
+      <prov:hadLocation rdf:resource="https://dvcs.w3.org/hg/prov/raw-file/tip/namespace/prov-o-inverses.owl"/>
    </prov:wasDerivedFrom> 
    <prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-aq#">
-      <prov:hadLocation rdf:resource="http://dvcs.w3.org/hg/prov/raw-file/tip/paq/prov-aq.owl"/>
+      <prov:hadLocation rdf:resource="https://dvcs.w3.org/hg/prov/raw-file/tip/namespace/prov-aq.owl"/>
+   </prov:wasDerivedFrom> 
+   <prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-dc#">
+      <prov:hadLocation rdf:resource="https://dvcs.w3.org/hg/prov/raw-file/tip/namespace/prov-dc.owl"/>
    </prov:wasDerivedFrom> 
    <prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-dictionary#">
-      <prov:hadLocation rdf:resource="http://dvcs.w3.org/hg/prov/raw-file/tip/dictionary/prov-dictionary.owl"/>
+      <prov:hadLocation rdf:resource="https://dvcs.w3.org/hg/prov/raw-file/tip/namespace/prov-dictionary.owl"/>
    </prov:wasDerivedFrom> 
-   <!--prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-links#">
-      <prov:hadLocation rdf:resource="http://dvcs.w3.org/hg/prov/file/tip/links/prov-mention.ttl"/>
-   </prov:wasDerivedFrom--> 
+   <prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-links#">
+      <prov:hadLocation rdf:resource="https://dvcs.w3.org/hg/prov/raw-file/tip/namespace/prov-links.owl"/>
+   </prov:wasDerivedFrom> 
 </xsl:variable>
 
 <xsl:key name="locations" match="prov:hadLocation" use="../@rdf:resource"/>
--- a/namespace/prov.owl	Fri Apr 26 11:18:50 2013 -0400
+++ b/namespace/prov.owl	Fri Apr 26 11:47:56 2013 -0400
@@ -6,8 +6,9 @@
          xmlns:owl="http://www.w3.org/2002/07/owl#"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
          xml:base="http://www.w3.org/ns/prov">
+
    <owl:Ontology rdf:about="http://www.w3.org/ns/prov#">
-      <rdfs:label xml:lang="en">PROV</rdfs:label>
+      <rdfs:label xml:lang="en">W3C PROVenance Interchange</rdfs:label>
       <rdfs:comment xml:lang="en">This document is published by the Provenance Working Group (http://www.w3.org/2011/prov/wiki/Main_Page).
 
 If you wish to make comments regarding this document, please send them to [email protected] (subscribe [email protected], archives http://lists.w3.org/
@@ -20,14 +21,16 @@
       <prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-o#"/>
       <prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-o-inverses#"/>
       <prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-aq#"/>
+      <prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-dc#"/>
       <prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-dictionary#"/>
-      <!--prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-links#"/-->
+      <prov:wasDerivedFrom rdf:resource="http://www.w3.org/ns/prov-links#"/>
 
       <!--This file contains the results of importing the following.-->
       <owl:imports rdf:resource="http://www.w3.org/ns/prov-o#"/>
       <owl:imports rdf:resource="http://www.w3.org/ns/prov-o-inverses#"/>
       <owl:imports rdf:resource="http://www.w3.org/ns/prov-aq#"/>
+      <owl:imports rdf:resource="http://www.w3.org/ns/prov-dc#"/>
       <owl:imports rdf:resource="http://www.w3.org/ns/prov-dictionary#"/>
-      <!--owl:imports rdf:resource="http://www.w3.org/ns/prov-links#"/-->
+      <owl:imports rdf:resource="http://www.w3.org/ns/prov-links#"/>
    </owl:Ontology>
 </rdf:RDF>
--- a/namespace/prov.ttl	Fri Apr 26 11:18:50 2013 -0400
+++ b/namespace/prov.ttl	Fri Apr 26 11:47:56 2013 -0400
@@ -11,10 +11,10 @@
 If you wish to make comments regarding this document, please send them to [email protected] (subscribe [email protected], archives http://lists.w3.org/
 Archives/Public/public-prov-comments/). All feedback is welcome."""@en ;
     rdfs:isDefinedBy <http://www.w3.org/ns/prov> ;
-    rdfs:label "PROV"@en ;
+    rdfs:label "W3C PROVenance Interchange"@en ;
     rdfs:seeAlso <http://www.w3.org/TR/prov-overview/> ;
-    owl:imports <http://www.w3.org/ns/prov-aq#>, <http://www.w3.org/ns/prov-dictionary#>, <http://www.w3.org/ns/prov-o#>, <http://www.w3.org/ns/prov-o-inverses#> ;
     owl:versionIRI <http://www.w3.org/ns/prov-YYYYMMDD> ;
+    owl:imports         <http://www.w3.org/ns/prov-aq#>, <http://www.w3.org/ns/prov-dictionary#>, <http://www.w3.org/ns/prov-o#>, <http://www.w3.org/ns/prov-o-inverses#> ;
     prov:wasDerivedFrom <http://www.w3.org/ns/prov-aq#>, <http://www.w3.org/ns/prov-dictionary#>, <http://www.w3.org/ns/prov-o#>, <http://www.w3.org/ns/prov-o-inverses#> ;
     prov:wasRevisionOf <http://www.w3.org/ns/prov-YYYYmmdd> .