diff --git a/ontology/uco/action/action.ttl b/ontology/uco/action/action.ttl index 80b67a3d..84498939 100644 --- a/ontology/uco/action/action.ttl +++ b/ontology/uco/action/action.ttl @@ -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 ; diff --git a/ontology/uco/core/core.ttl b/ontology/uco/core/core.ttl index b4f59e84..b34f2a43 100644 --- a/ontology/uco/core/core.ttl +++ b/ontology/uco/core/core.ttl @@ -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 ; @@ -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 + , + + ; + . + core:Relationship a owl:Class , diff --git a/ontology/uco/time/time.ttl b/ontology/uco/time/time.ttl index 66a9db41..d5ad9e4b 100644 --- a/ontology/uco/time/time.ttl +++ b/ontology/uco/time/time.ttl @@ -4,27 +4,67 @@ @prefix owl: . @prefix rdf: . @prefix rdfs: . -@prefix time: . +@prefix sh: . +@prefix time: . +@prefix uco-time: . @prefix xsd: . 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 , + + ; + 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 ; . diff --git a/tests/examples/Makefile b/tests/examples/Makefile index 441fce4e..bbc0d9ea 100644 --- a/tests/examples/Makefile +++ b/tests/examples/Makefile @@ -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: \ @@ -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 \ diff --git a/tests/examples/test_validation.py b/tests/examples/test_validation.py index b8f051e0..06f81c50 100644 --- a/tests/examples/test_validation.py +++ b/tests/examples/test_validation.py @@ -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", diff --git a/tests/examples/time_PASS.json b/tests/examples/time_PASS.json new file mode 100644 index 00000000..a857b999 --- /dev/null +++ b/tests/examples/time_PASS.json @@ -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." + } + ] +} diff --git a/tests/examples/time_PASS_validation.ttl b/tests/examples/time_PASS_validation.ttl new file mode 100644 index 00000000..33496ff0 --- /dev/null +++ b/tests/examples/time_PASS_validation.ttl @@ -0,0 +1,11 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + . + diff --git a/tests/examples/time_XFAIL.json b/tests/examples/time_XFAIL.json new file mode 100644 index 00000000..8734387f --- /dev/null +++ b/tests/examples/time_XFAIL.json @@ -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)." + } + ] +} diff --git a/tests/examples/time_XFAIL_validation.ttl b/tests/examples/time_XFAIL_validation.ttl new file mode 100644 index 00000000..18f9706b --- /dev/null +++ b/tests/examples/time_XFAIL_validation.ttl @@ -0,0 +1,21 @@ +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix uco-time: . +@prefix xsd: . + +[] + a sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + a sh:ValidationResult ; + sh:focusNode ; + 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 ; + ] ; + . +