--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ontology/components/Time.ttl Fri Oct 14 00:16:06 2011 +0100
@@ -0,0 +1,24 @@
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix prov: <http://www.w3.org/ns/prov-o/> .
+
+prov:Time
+ a owl:Class;
+.
+
+prov:startedAt a owl:ObjectProperty ;
+ rdfs:domain prov:ProcessExecution ;
+ rdfs:range prov:Time ;
+
+prov:endedAt a owl:ObjectProperty ;
+ rdfs:domain prov:ProcessExecution ;
+ rdfs:range prov:Time ;
+
+prov:assumedRoleAt a owl:ObjectProperty ;
+ rdfs:domain prov:EntityInRole ;
+ rdfs:range prov:Time ;
+
+prov:wasGeneratedAt owl:ObjectProperty ;
+ rdfs:domain prov:Entity;
+ rdfs:range prov:Time ;
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ontology/components/Time/example-1.ttl Fri Oct 14 00:16:06 2011 +0100
@@ -0,0 +1,40 @@
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix prov: <http://www.w3.org/ns/prov-o/> .
+
+
+# start/end
+:pe1 a prov:ProcessExecution ;
+ prov:startedAt :tA ;
+ prov:endedAt :tB .
+:tA a prov:Time .
+:tB a prov:Time .
+
+
+# generation time
+:e1 a prov:Entity ;
+ prov:wasGeneratedBy :pe1 ;
+ prov:wasGeneratedAt :tC .
+:tC a prov:Time .
+
+
+# used time
+:pe2 a prov:ProcessExecution ;
+ prov:used [
+ a prov:EntityInRole;
+ prov:assumedBy :e1;
+ prov:assumedRoleAt :tD
+ ] .
+:tD a prov:Time .
+
+
+# controlled time
+:a1 a prov:Agent .
+:tE a prov:Time .
+:pe2 prov:wasControlledBy [
+ a prov:EntityInRole, prov:Agent;
+ prov:assumedBy :a1;
+ prov:assumedRoleAt :tE;
+ ] .
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ontology/components/Time/example-2-crimefile.ttl Fri Oct 14 00:16:06 2011 +0100
@@ -0,0 +1,45 @@
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix prov: <http://www.w3.org/ns/prov-o/> .
+@prefix cf: <http://www.example.com/crime#> .
+@prefix : <http://www.example.com/crimeFile#> .
+
+
+
+# Crime File example modified from
+https://dvcs.w3.org/hg/prov/raw-file/tip/model/ProvenanceModel.html#example-prov-asn-encoding
+# not neccessarily matching
+# http://dvcs.w3.org/hg/prov/raw-file/tip/ontology/Overview.html#specialization-of-prov-ontology-classes
+
+
+#processExecution(pe0,create-file,t,,[])
+:pe0 a prov:ProcessExecution, cf:FileCreation ;
+ prov:startedAt :t .
+
+# NOTE: 't+1' is just an identifier in PROV-ASN - it has no mathematical
+# meaning, ordering, etc. We'll here use :t1, etc. instead.
+
+#processExecution(pe1,add-crime-in-london,t+1,,[])
+:pe1 a prov:ProcessExecution, cf:FileAppending ;
+ prov:startedAt :t1 .
+
+#processExecution(pe2,email,t+2,,[])
+:pe2 a prov:ProcessExecution, cf:Emailing ;
+ prov:startedAt :t2 .
+
+#processExecution(pe3,edit-London-New-York,t+3,,[])
+:pe3 a prov:ProcessExecution, cf:FileEditing ;
+ prov:startedAt :t3 .
+
+#processExecution(pe4,email,t+4,,[])
+:pe4 a prov:ProcessExecution, cf:Emailing ;
+ prov:startedAt :t4 .
+
+#processExecution(pe5,spellcheck,,,[])
+:pe5 a prov:ProcessExecution, cf:SpellChecking ;
+ prov:recipe :spellcheck .
+
+
+# The rest of the crime file example, wasGeneratedBy(), used(), etc does not
+specify any times.
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ontology/components/Time/example-3-extension.ttl Fri Oct 14 00:16:06 2011 +0100
@@ -0,0 +1,83 @@
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix prov: <http://www.w3.org/ns/prov-o/> .
+@prefix time: <http://www.w3.org/2006/time#> .
+
+# Example of extending prov:Time using OWL Time ontology
+# http://www.w3.org/TR/owl-time/
+
+
+# Lazy straight forward version - no declared subclasses
+:pe0 a :ProcessExecution ;
+ prov:startedAt [
+ # a prov:Time, time:Instant ;
+ time:inXSDDateTime "2011-12-24T14:24:05Z"
+ ] ;
+ prov:endedAt [
+ time:inXSDDateTime "2011-12-25T01:41:54Z"
+ ] .
+
+
+# Integrate time: and prov:
+
+:TimedProcess a owl:Class ;
+ rdfs:subClassOf prov:ProcessExecution ;
+ rdfs:subClassOf time:Interval .
+
+:Time a owl:Class ;
+ rdfs:subClassOf prov:Time .
+ rdfs:subClassOf time:Instant .
+
+:started a owl:ObjectProperty ;
+ rdfs:subPropertyOf time:hasBeginning ;
+ rdfs:subPropertyOf prov:startedAt ;
+ rdfs:domain :TimedProcess ;
+ rdfs:range :Time .
+
+:ended a owl:ObjectProperty ;
+ rdfs:subPropertyOf time:hasEnd ;
+ rdfs:subPropertyOf prov:endedAt ;
+ rdfs:domain :TimedProcess ;
+ rdfs:range :Time .
+
+
+# The simple case
+:pe1 a :TimedProcess ;
+ :started [
+ time:inXSDDateTime "2011-12-24T14:24:05Z"
+ ] ;
+ :ended [
+ time:inXSDDateTime "2011-12-25T01:41:54Z"
+ ] .
+
+
+:e1 a prov:Entity ;
+ prov:wasGeneratedBy :pe1 ;
+ prov:wasGeneratedAt [
+ a time:Instant ;
+ time:inDateTime [
+ # We only bothered recorded the clock when :e1 was generated
+ time:hour 21 ;
+ time:minute 45 ;
+ ]
+ ]
+
+
+# Using the OWL Time Ontology to specify relations between intervals
+# (ie. our process executions) even if we have just partial
+# time information
+
+:pe2 a :TimedProcess ;
+ # starts immediately after :pe1
+ time:intervalMetBy :pe1 .
+ # lasts until :pe3 finishes
+ time:intervalFinishes :pe3 .
+
+:pe3 a :TimedProcess ;
+ # Started some time after :pe1 finished
+ time:intervalAfter :pe1 ;
+ :ended [
+ time:inXSDDateTime "2011-12-31T23:59:54Z"
+ ] .
+
+