Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ontology/uco/action/action.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ action:Action
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf core:UcoObject ;
rdfs:subClassOf core:Perdurant ;
rdfs:label "Action"@en ;
rdfs:comment "An action is something that may be done or performed."@en ;
owl:disjointWith core:Event ;
Expand Down
13 changes: 12 additions & 1 deletion ontology/uco/core/core.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ core:Event
owl:Class ,
sh:NodeShape
;
rdfs:subClassOf core:UcoObject ;
rdfs:subClassOf core:Perdurant ;
rdfs:label "Event"@en ;
rdfs:comment "An Event is a noteworthy occurrence (something that happens or might happen)."@en ;
owl:disjointWith action:Action ;
Expand Down Expand Up @@ -330,6 +330,17 @@ core:ObjectStatusVocab
] ;
.

core:Perdurant
a owl:Class ;
rdfs:subClassOf core:UcoObject ;
rdfs:label "Perdurant"@en ;
rdfs:comment "Perdurants \"are individuals composed of temporal parts,\" or the start or end of such an individual. \"They happen in time in the sense that they extend in time accumulating temporal parts.\" In any instant where a non-instantaneous perdurant exists, \"it is not the case that all its temporal parts are present.\" Also known as \"Occurrents\" in some models [e.g., BFO concept 3]. [Definition quoted and adapted from Section 2 of Guizzardi et al., \"Towards Ontological Foundations for the Conceptual Modeling of Events,\" 2013; and, the BFO-2020 definition of \"occurrent\".] Taking for example a human: the human *is not* a perdurant; but, the human's life *is* a perdurant. Taking for example a computer process, as in the operating system object in which a piece of software is executed: The process *is not* a perdurant, because if time is frozen such as in a virtual machine snapshot, everything about the process exists; but, the process's execution taking place *is* a perdurant, as is the instant in which the process terminates."@en ;
rdfs:seeAlso
<http://purl.obolibrary.org/obo/BFO_0000003> ,
<https://doi.org/10.1007/978-3-642-41924-9_27>
;
.

core:Relationship
a
owl:Class ,
Expand Down
54 changes: 47 additions & 7 deletions ontology/uco/time/time.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,67 @@
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix time: <https://ontology.unifiedcyberontology.org/uco/time/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix uco-time: <https://ontology.unifiedcyberontology.org/uco/time/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<https://ontology.unifiedcyberontology.org/uco/time>
a owl:Ontology ;
rdfs:label "uco-time"@en ;
owl:backwardCompatibleWith time:1.3.0 ;
rdfs:comment "Discussion of concepts in W3C's OWL-Time pertain to the 2016 edition of OWL-Time and the noted version of the documentation page."@en ;
rdfs:seeAlso
time:2016 ,
<https://www.w3.org/TR/2022/CRD-owl-time-20221115/>
;
owl:backwardCompatibleWith uco-time:1.3.0 ;
owl:imports core:1.4.0 ;
owl:priorVersion time:1.3.0 ;
owl:versionIRI time:1.4.0 ;
owl:priorVersion uco-time:1.3.0 ;
owl:versionIRI uco-time:1.4.0 ;
.

time:Time
uco-time:InstantaneousPerdurant
a owl:Class ;
rdfs:subClassOf core:Perdurant ;
rdfs:comment "An instantaneous perdurant is a perdurant of zero temporal duration. This class corresponds with OWL-Time's time:Instant, but UCO leaves to adopters whether uco-time:InstantaneousPerdurant specializes (i.e., subclasses) time:Instant, or instead links time:Instants as separate time-dimensional objects with time:hasTime."@en ;
rdfs:seeAlso time:Instant ;
owl:disjointWith uco-time:ProperIntervalicPerdurant ;
.

uco-time:InstantaneousPerdurant-disjointWith-ProperIntervalicPerdurant-shape
a sh:NodeShape ;
sh:message "uco-time:InstantaneousPerdurant and uco-time:ProperIntervalicPerdurant are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class uco-time:ProperIntervalicPerdurant ;
] ;
sh:targetClass uco-time:InstantaneousPerdurant ;
.

uco-time:IntervalicPerdurant
a owl:Class ;
rdfs:subClassOf core:Perdurant ;
rdfs:comment "An intervalic perdurant is a perdurant of temporal duration that might or might not be zero. This class corresponds with OWL-Time's time:Interval, but UCO leaves to adopters whether uco-time:IntervalicPerdurant specializes (i.e., subclasses) time:Interval, or instead links time:Intervals as separate time-dimensional objects with time:hasTime."@en ;
rdfs:seeAlso time:Interval ;
.

uco-time:ProperIntervalicPerdurant
a owl:Class ;
rdfs:subClassOf uco-time:IntervalicPerdurant ;
rdfs:comment "A proper-intervalic perdurant is a perdurant of non-zero temporal duration. This class corresponds with OWL-Time's time:ProperInterval, but UCO leaves to adopters whether uco-time:ProperIntervalicPerdurant specializes (i.e., subclasses) time:ProperInterval, or instead links time:ProperIntervals as separate object time-dimensional objects with time:hasTime."@en ;
rdfs:seeAlso time:ProperInterval ;
owl:disjointWith uco-time:InstantaneousPerdurant ;
.

uco-time:Time
a rdfs:Datatype ;
.

time:TimeRange
uco-time:TimeRange
a rdfs:Datatype ;
.

time:Timestamp
uco-time:Timestamp
a rdfs:Datatype ;
.

4 changes: 4 additions & 0 deletions tests/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ all: \
relationship_XFAIL_validation.ttl \
thread_PASS_validation.ttl \
thread_XFAIL_validation.ttl \
time_PASS_validation.ttl \
time_XFAIL_validation.ttl \
uco_thing_XFAIL_validation.ttl

.PRECIOUS: \
Expand Down Expand Up @@ -136,6 +138,8 @@ check: \
relationship_XFAIL_validation.ttl \
thread_PASS_validation.ttl \
thread_XFAIL_validation.ttl \
time_PASS_validation.ttl \
time_XFAIL_validation.ttl \
uco_thing_XFAIL_validation.ttl
source $(top_srcdir)/venv/bin/activate \
&& pytest \
Expand Down
12 changes: 12 additions & 0 deletions tests/examples/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,18 @@ def test_thread_XFAIL_validation() -> None:
}
)

def test_time_PASS_validation() -> None:
confirm_validation_results("time_PASS_validation.ttl", True)

def test_time_XFAIL_validation() -> None:
confirm_validation_results(
"time_XFAIL_validation.ttl",
False,
expected_focus_node_severities={
("http://example.org/kb/Perdurant-6a8bbefc-c1f4-4c87-b5d3-a97e3f195172", str(NS_SH.Violation)),
}
)

def uco_thing_XFAIL_validation() -> None:
confirm_validation_results(
"uco_thing_XFAIL_validation.ttl",
Expand Down
89 changes: 89 additions & 0 deletions tests/examples/time_PASS.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"@context": {
"kb": "http://example.org/kb/",
"uco-action": "https://ontology.unifiedcyberontology.org/uco/action/",
"uco-core": "https://ontology.unifiedcyberontology.org/uco/core/",
"uco-time": "https://ontology.unifiedcyberontology.org/uco/time/"
},
"@graph": [
{
"@id": "kb:Action-077e3e66-3dd5-4dff-bdc7-1b098eb4ebab",
"@type": "uco-action:Action",
"uco-core:description": "An Action."
},
{
"@id": "kb:Action-0a8f65b8-9e27-4c51-a46a-6e7a1ff2183a",
"@type": [
"uco-action:Action",
"uco-time:IntervalicPerdurant"
],
"uco-core:description": "An Action also designated an intervalic perdurant."
},
{
"@id": "kb:Action-217883bc-a585-4310-ba78-b606d0e28d50",
"@type": [
"uco-action:Action",
"uco-time:ProperIntervalicPerdurant"
],
"uco-core:description": "An Action also designated a proper-intervalic perdurant."
},
{
"@id": "kb:Event-2d6df404-20d2-4834-9078-68905e1d9a39",
"@type": "uco-core:Event",
"uco-core:description": "An Event."
},
{
"@id": "kb:Event-6ec5818e-9506-4228-90ad-bdb235db0cf4",
"@type": [
"uco-core:Event",
"uco-time:InstantaneousPerdurant"
],
"uco-core:description": "An Event also designated an instantaneous perdurant."
},
{
"@id": "kb:Event-8e3622c8-ca99-4c1b-95da-eed4916f25df",
"@type": [
"uco-core:Event",
"uco-time:IntervalicPerdurant"
],
"uco-core:description": "An Event also designated an intervalic perdurant."
},
{
"@id": "kb:Event-a9da6121-f344-4ae4-9746-4d0165617f34",
"@type": [
"uco-core:Event",
"uco-time:ProperIntervalicPerdurant"
],
"uco-core:description": "An Event also designated a proper-intervalic perdurant."
},
{
"@id": "kb:Perdurant-05d691fe-77ea-4739-a4db-27b215c1e61e",
"@type": "uco-core:Perdurant",
"uco-core:description": "A perdurant."
},
{
"@id": "kb:Perdurant-45c0e515-a89e-4059-8de0-180a14fd330d",
"@type": "uco-time:InstantaneousPerdurant",
"uco-core:description": "An instantaneous perdurant."
},
{
"@id": "kb:Perdurant-63df6f31-cbc9-4a91-b9fd-860837ddc4de",
"@type": "uco-time:IntervalicPerdurant",
"uco-core:description": "An intervalic perdurant."
},
{
"@id": "kb:Perdurant-6a8bbefc-c1f4-4c87-b5d3-a97e3f195172",
"@type": "uco-time:ProperIntervalicPerdurant",
"uco-core:description": "A proper-intervalic perdurant."
},
{
"@id": "kb:Event-ef6dd72b-f517-459c-95d8-11a97a3bccf6",
"@type": [
"uco-core:Event",
"uco-time:InstantaneousPerdurant",
"uco-time:IntervalicPerdurant"
],
"uco-core:description": "An Event initially also designated an intervalic perdurant, and later found to be instantaneous."
}
]
}
11 changes: 11 additions & 0 deletions tests/examples/time_PASS_validation.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

[]
a sh:ValidationReport ;
sh:conforms "true"^^xsd:boolean ;
.

17 changes: 17 additions & 0 deletions tests/examples/time_XFAIL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"@context": {
"kb": "http://example.org/kb/",
"uco-core": "https://ontology.unifiedcyberontology.org/uco/core/",
"uco-time": "https://ontology.unifiedcyberontology.org/uco/time/"
},
"@graph": [
{
"@id": "kb:Perdurant-6a8bbefc-c1f4-4c87-b5d3-a97e3f195172",
"@type": [
"uco-time:InstantaneousPerdurant",
"uco-time:ProperIntervalicPerdurant"
],
"uco-core:description": "A perdurant declared both instantaneous and proper-intervalic (0-duration and non-0-duration)."
}
]
}
21 changes: 21 additions & 0 deletions tests/examples/time_XFAIL_validation.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix uco-time: <https://ontology.unifiedcyberontology.org/uco/time/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

[]
a sh:ValidationReport ;
sh:conforms "false"^^xsd:boolean ;
sh:result [
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/Perdurant-6a8bbefc-c1f4-4c87-b5d3-a97e3f195172> ;
sh:resultMessage "uco-time:InstantaneousPerdurant and uco-time:ProperIntervalicPerdurant are disjoint classes."@en ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NotConstraintComponent ;
sh:sourceShape uco-time:InstantaneousPerdurant-disjointWith-ProperIntervalicPerdurant-shape ;
sh:value <http://example.org/kb/Perdurant-6a8bbefc-c1f4-4c87-b5d3-a97e3f195172> ;
] ;
.

Loading