provo narrative
authorTim L <lebot@rpi.edu>
Tue, 03 Jul 2012 13:47:26 -0400
changeset 3695 e4a1c1b1e110
parent 3694 164409836c09
child 3696 1298ed6eac4a
provo narrative
ontology/bin/rlplus-justify.py
ontology/prov-o-html-sections/description-starting-points.inc.html
--- a/ontology/bin/rlplus-justify.py	Tue Jul 03 17:26:36 2012 +0100
+++ b/ontology/bin/rlplus-justify.py	Tue Jul 03 13:47:26 2012 -0400
@@ -3,36 +3,50 @@
 # usage: java -jar bin/profilechecker.jar ProvenanceOntology.owl OWL2RLProfile 2>&1 | python bin/rlplus-justify.py
 
 import sys
+import re
 
 explain = {}
 
-explain['Use of non-simple property in AsymmetricObjectProperty axiom: [AsymmetricObjectProperty(<http://www.w3.org/ns/prov#wasDerivedFrom>) in <http://www.w3.org/ns/prov#><http://www.w3.org/TR/2012/WD-prov-o-2012MMDD>]'] = 'OWL API Bug?'
-
-explain['Use of non-simple property in AsymmetricObjectProperty axiom: [AsymmetricObjectProperty(<http://www.w3.org/ns/prov#used>) in <http://www.w3.org/ns/prov#><http://www.w3.org/TR/2012/WD-prov-o-2012MMDD>]'] = 'OWL API Bug?'
-
-explain['Use of non-simple property in AsymmetricObjectProperty axiom: [AsymmetricObjectProperty(<http://www.w3.org/ns/prov#wasGeneratedBy>) in <http://www.w3.org/ns/prov#><http://www.w3.org/TR/2012/WD-prov-o-2012MMDD>]'] = 'OWL API Bug?'
-
-explain['Use of non-simple property in FunctionalObjectProperty axiom: [FunctionalObjectProperty(<http://www.w3.org/ns/prov#wasGeneratedBy>) in <http://www.w3.org/ns/prov#><http://www.w3.org/TR/2012/WD-prov-o-2012MMDD>]'] = 'OWL API Bug?'
 
-explain['Use of non-simple property in IrrefexiveObjectProperty axiom: [IrreflexiveObjectProperty(<http://www.w3.org/ns/prov#wasGeneratedBy>) in <http://www.w3.org/ns/prov#><http://www.w3.org/TR/2012/WD-prov-o-2012MMDD>]'] = 'OWL API Bug?'
-
-explain['Use of non-simple property in IrrefexiveObjectProperty axiom: [IrreflexiveObjectProperty(<http://www.w3.org/ns/prov#wasDerivedFrom>) in <http://www.w3.org/ns/prov#><http://www.w3.org/TR/2012/WD-prov-o-2012MMDD>]'] = 'OWL API Bug?'
+explain['Use of non-superclass expression in position that requires a superclass expression: ObjectUnionOf(prov:Activity prov:Agent prov:Entity prov:InstantaneousEvent>) [ObjectPropertyDomain(prov:atLocation ObjectUnionOf(prov:Activity prov:Agent prov:Entity prov:InstantaneousEvent>)) ]'] = {'id' : '1', 'abbreviation' : '<a href="#atLocation" class="qname">prov:atLocation</a> rdfs:domain (prov:Activity prov:Agent prov:Entity prov:InstantaneousEvent)', 'errortype' : '' }
 
-explain['Use of non-simple property in IrrefexiveObjectProperty axiom: [IrreflexiveObjectProperty(<http://www.w3.org/ns/prov#used>) in <http://www.w3.org/ns/prov#><http://www.w3.org/TR/2012/WD-prov-o-2012MMDD>]'] = 'OWL API Bug?'
+explain['Use of non-superclass expression in position that requires a superclass expression: ObjectUnionOf(prov:Activity prov:Agent prov:Entity>) [ObjectPropertyRange(Annotation(prov:definition "influencer: an identifier (o1) for an ancestor entity, activity, or agent that the former depends on;") Annotation(prov:dm "http://www.w3.org/TR/2012/WD-prov-dm-20120703/prov-dm.html#term-influence") prov:wasInfluencedBy ObjectUnionOf(prov:Activity prov:Agent prov:Entity>)) ]'] = {'id' : '2', 'abbreviation' : '<a href="#wasInfluencedBy" class="qname">prov:wasInfluencedBy</a> rdfs:range (prov:Activity prov:Agent prov:Entity)', 'errortype' : '' }
 
-explain['Use of non-superclass expression in position that requires a superclass expression: ObjectUnionOf(<http://www.w3.org/ns/prov#Association> <http://www.w3.org/ns/prov#End> <http://www.w3.org/ns/prov#Generation> <http://www.w3.org/ns/prov#Start> <http://www.w3.org/ns/prov#Usage>) [ObjectPropertyDomain(<http://www.w3.org/ns/prov#hadRole> ObjectUnionOf(<http://www.w3.org/ns/prov#Association> <http://www.w3.org/ns/prov#End> <http://www.w3.org/ns/prov#Generation> <http://www.w3.org/ns/prov#Start> <http://www.w3.org/ns/prov#Usage>)) in <http://www.w3.org/ns/prov#><http://www.w3.org/TR/2012/WD-prov-o-2012MMDD>]'] = 'hadRole'
+explain['Use of non-superclass expression in position that requires a superclass expression: ObjectUnionOf(prov:Delegation prov:Derivation prov:Start>) [ObjectPropertyDomain(prov:hadActivity ObjectUnionOf(prov:Delegation prov:Derivation prov:Start>)) ]'] = {'id' : '3', 'abbreviation' : '<a href="#hadActivity" class="qname">prov:hadActivity</a> rdfs:domain (prov:Delegation prov:Derivation prov:Start)', 'errortype' : '' }
 
-explain['Use of non-superclass expression in position that requires a superclass expression: ObjectUnionOf(<http://www.w3.org/ns/prov#Derivation> <http://www.w3.org/ns/prov#Responsibility> <http://www.w3.org/ns/prov#Start>) [ObjectPropertyDomain(<http://www.w3.org/ns/prov#hadActivity> ObjectUnionOf(<http://www.w3.org/ns/prov#Derivation> <http://www.w3.org/ns/prov#Responsibility> <http://www.w3.org/ns/prov#Start>)) in <http://www.w3.org/ns/prov#><http://www.w3.org/TR/2012/WD-prov-o-2012MMDD>]'] = 'hadActivity'
+explain['Use of non-superclass expression in position that requires a superclass expression: ObjectUnionOf(prov:Association prov:End prov:Generation prov:Invalidation prov:Start prov:Usage>) [ObjectPropertyDomain(prov:hadRole ObjectUnionOf(prov:Association prov:End prov:Generation prov:Invalidation prov:Start prov:Usage>)) ]'] = {'id' : '4', 'abbreviation' : '<a href="#hadRole" class="qname">prov:hadRole</a> rdfs:domain (prov:Association prov:End prov:Generation prov:Invalidation prov:Start prov:Usage)', 'errortype' : '' }
 
-print '<table>'
+explain['Use of non-superclass expression in position that requires a superclass expression: ObjectUnionOf(prov:Activity prov:Agent prov:Entity>) [ObjectPropertyDomain(Annotation(prov:definition "influencee: an identifier (o2) for an entity, activity, or agent; ") Annotation(prov:dm "http://www.w3.org/TR/2012/WD-prov-dm-20120703/prov-dm.html#term-influence") prov:wasInfluencedBy ObjectUnionOf(prov:Activity prov:Agent prov:Entity>)) ]'] = {'id' : '5', 'abbreviation' : '<a href="#wasInfluencedBy" class="qname">prov:wasInfluencedBy</a> rdfs:domain (prov:Activity prov:Agent prov:Entity)', 'errortype' : '' }
+
+print '<div style="text-align: center">'
+print '  <table id="owl-rl-violations">'
+print '    <caption><a href="#owl-rl-violations">Table 3</a>: All OWL Axioms in PROV-O that do not conform to the OWL-RL profile.</caption>'
+print '    <tr>'
+print '      <th>Non OWL-RL PROV-O Axiom</td>'
+print '    </tr>'
+explained = {}
 for line in sys.stdin:
    line = line.strip()
-   if line in explain:
-      if explain[line] is not 'OWL API Bug?':
-         print '  <tr>'
-         print '    <td>' + line.replace('http://www.w3.org/ns/prov#','prov:').replace('>','').replace('<','').replace('in .*$','') + '</td>'
-         print '    <td>' + explain[line] + '</td>'
-         print '  </tr>'
+   short = re.sub('in <http://www.w3.org/ns/prov#><http://www.w3.org/TR/2012/WD-prov-o-2012....>]',']',line)
+   short = re.sub('<http://www.w3.org/ns/prov#','prov:',short)
+   short = re.sub('> ',' ',short)
+
+   if short in explain:
+      if short not in explained:
+         html = '    <tr>\n'
+         html = html + '      <td>' + explain[short]['abbreviation'] + '</td>\n'
+         html = html + '    </tr> <!-- '+explain[short]['id']+' -->\n'
+         explained[explain[short]['id']] = html
    else:
+      print ''
+      print 'TODO ------'
+      print ''
       print line
-print '</table>'
+      print ''
+      print short
+      print ''
+      print ' ------ ------'
+for dodad in explained:
+   print explained[dodad]
+print '  </table>'
+print '</div>'
--- a/ontology/prov-o-html-sections/description-starting-points.inc.html	Tue Jul 03 17:26:36 2012 +0100
+++ b/ontology/prov-o-html-sections/description-starting-points.inc.html	Tue Jul 03 13:47:26 2012 -0400
@@ -17,7 +17,7 @@
       <a href='#startedAtTime' class="qname">prov:startedAtTime</a> and <a href='#endedAtTime' class="qname">prov:endedAtTime</a>, respectively), they can  
       <strong>use</strong> Entities during their lifespan, and can <strong>generate</strong> other Entities (described using 
       <a href='#used' class="qname">prov:used</a> and <a href='#wasGeneratedBy' class="qname">prov:wasGeneratedBy</a>, respectively). 
-      For example, a blog writing activity may use a particular dataset and generate a bar chart. Usage and generation can be used to create provenance chains of 
+      For example, a blog writing activity may use a particular dataset and generate a bar chart. Usage and generation can be applied to create provenance chains of 
       alternating Activities and Entities.
       </p>