From f717616ecc50fa1677fbdc022baa2b1025cf1a76 Mon Sep 17 00:00:00 2001 From: Sean Barnum Date: Wed, 19 Jul 2023 14:27:13 -0400 Subject: [PATCH 1/4] Added classes, properties and shapes for Event Added new core:Event class with appropriate SHACL shapes Added new core:eventType property Added new core:eventContext property Added new core:eventAttribute property --- ontology/uco/core/core.ttl | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index aaa52614..d4bd8fc0 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -171,6 +171,43 @@ core:EnclosingCompilation sh:targetClass core:EnclosingCompilation ; . +core:Event + a + owl:Class, + sh:NodeShape + ; + rdfs:subClassOf core:UcoObject ; + rdfs:label "Event"@en ; + rdfs:comment "An Event is a noteworthy occurrence (something that happens or might happen)."@en ; + sh:property + [ + sh:datatype xsd:string ; + sh:nodeKind sh:Literal ; + sh:path core:eventType ; + ], + [ + sh:nodeKind sh:IRI ; + sh:class core:UcoObject ; + sh:path core:eventContext ; + ], + [ + sh:datatype xsd:string ; + sh:nodeKind sh:Literal ; + sh:path core:startTime ; + ], + [ + sh:datatype xsd:string ; + sh:nodeKind sh:Literal ; + sh:path core:endTime ; + ], + [ + sh:nodeKind sh:IRI ; + sh:class types:Dictionary ; + sh:path core:eventAttribute ; + ] ; + sh:targetClass core:Event +. + core:ExternalReference a owl:Class , @@ -518,6 +555,27 @@ core:endTime rdfs:range xsd:dateTime ; . +core:eventContext + a owl:ObjectProperty; + rdfs:label "Event Context"@en ; + rdfs:comment "An event context describes the association of actions and objects relating to an event."@en ; + rdfs:range core:UcoObject + . + +core:eventAttribute + a owl:ObjectProperty; + rdfs:label "Event Attribute"@en ; + rdfs:comment "An event attribute specifies an ad-hoc attribute/value for an event."@en ; + rdfs:range types:Dictionary + . + +core:eventType + a owl:DatatypeProperty; + rdfs:label "Event Type"@en ; + rdfs:comment "An event type specifies a classification type for the event."@en ; + rdfs:range xsd:string + . + core:externalIdentifier a owl:DatatypeProperty ; rdfs:label "externalIdentifier"@en ; From ba4b77194d88874ca69a74aafb659266bd64900b Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Wed, 19 Jul 2023 15:08:58 -0400 Subject: [PATCH 2/4] Normalize --- ontology/uco/core/core.ttl | 107 +++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index d4bd8fc0..057ffb82 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -171,42 +171,43 @@ core:EnclosingCompilation sh:targetClass core:EnclosingCompilation ; . -core:Event - a - owl:Class, - sh:NodeShape +core:Event + a + owl:Class , + sh:NodeShape ; - rdfs:subClassOf core:UcoObject ; - rdfs:label "Event"@en ; - rdfs:comment "An Event is a noteworthy occurrence (something that happens or might happen)."@en ; + rdfs:subClassOf core:UcoObject ; + rdfs:label "Event"@en ; + rdfs:comment "An Event is a noteworthy occurrence (something that happens or might happen)."@en ; sh:property - [ - sh:datatype xsd:string ; - sh:nodeKind sh:Literal ; - sh:path core:eventType ; - ], - [ - sh:nodeKind sh:IRI ; - sh:class core:UcoObject ; - sh:path core:eventContext ; - ], - [ - sh:datatype xsd:string ; - sh:nodeKind sh:Literal ; - sh:path core:startTime ; - ], - [ - sh:datatype xsd:string ; - sh:nodeKind sh:Literal ; - sh:path core:endTime ; - ], - [ - sh:nodeKind sh:IRI ; - sh:class types:Dictionary ; - sh:path core:eventAttribute ; - ] ; - sh:targetClass core:Event -. + [ + sh:class core:UcoObject ; + sh:nodeKind sh:IRI ; + sh:path core:eventContext ; + ] , + [ + sh:class types:Dictionary ; + sh:nodeKind sh:IRI ; + sh:path core:eventAttribute ; + ] , + [ + sh:datatype xsd:string ; + sh:nodeKind sh:Literal ; + sh:path core:endTime ; + ] , + [ + sh:datatype xsd:string ; + sh:nodeKind sh:Literal ; + sh:path core:eventType ; + ] , + [ + sh:datatype xsd:string ; + sh:nodeKind sh:Literal ; + sh:path core:startTime ; + ] + ; + sh:targetClass core:Event ; + . core:ExternalReference a @@ -555,25 +556,25 @@ core:endTime rdfs:range xsd:dateTime ; . -core:eventContext - a owl:ObjectProperty; - rdfs:label "Event Context"@en ; - rdfs:comment "An event context describes the association of actions and objects relating to an event."@en ; - rdfs:range core:UcoObject - . - -core:eventAttribute - a owl:ObjectProperty; - rdfs:label "Event Attribute"@en ; - rdfs:comment "An event attribute specifies an ad-hoc attribute/value for an event."@en ; - rdfs:range types:Dictionary - . - -core:eventType - a owl:DatatypeProperty; - rdfs:label "Event Type"@en ; - rdfs:comment "An event type specifies a classification type for the event."@en ; - rdfs:range xsd:string +core:eventAttribute + a owl:ObjectProperty ; + rdfs:label "Event Attribute"@en ; + rdfs:comment "An event attribute specifies an ad-hoc attribute/value for an event."@en ; + rdfs:range types:Dictionary ; + . + +core:eventContext + a owl:ObjectProperty ; + rdfs:label "Event Context"@en ; + rdfs:comment "An event context describes the association of actions and objects relating to an event."@en ; + rdfs:range core:UcoObject ; + . + +core:eventType + a owl:DatatypeProperty ; + rdfs:label "Event Type"@en ; + rdfs:comment "An event type specifies a classification type for the event."@en ; + rdfs:range xsd:string ; . core:externalIdentifier From 36ee2363dcd17b5a9fa36e77a2c86081800ebb68 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 20 Jul 2023 16:37:08 -0400 Subject: [PATCH 3/4] Fix datatype constraints Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index 057ffb82..6b8c566e 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -191,19 +191,19 @@ core:Event sh:path core:eventAttribute ; ] , [ - sh:datatype xsd:string ; + sh:datatype xsd:dateTime ; sh:nodeKind sh:Literal ; sh:path core:endTime ; ] , [ - sh:datatype xsd:string ; + sh:datatype xsd:dateTime ; sh:nodeKind sh:Literal ; - sh:path core:eventType ; + sh:path core:startTime ; ] , [ sh:datatype xsd:string ; sh:nodeKind sh:Literal ; - sh:path core:startTime ; + sh:path core:eventType ; ] ; sh:targetClass core:Event ; From 9cf555adabcdf9ee0fba34d48059ffb017a3e42d Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 25 Aug 2023 13:12:19 -0400 Subject: [PATCH 4/4] Add stub reference to types:Dictionary References: * https://github.com/ucoProject/UCO/issues/541 Signed-off-by: Alex Nelson --- ontology/uco/core/core.ttl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index 6b8c566e..7accb6fa 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -736,6 +736,11 @@ core:value rdfs:range xsd:string ; . +types:Dictionary + a owl:Class ; + rdfs:isDefinedBy ; + . + [] a owl:AllDisjointClasses ; owl:members (