Lifecycle Ontology
EKGF Editor's Draft
1. Lifecycle Ontology§
1.1 Overview§
Lifecycle Ontology
| Identifier | Value |
|---|---|
| Ontology IRI / Namespace | https://ekgf.org/ontology/lifecycle# |
| Prefix | ekg-lifecycle |
Everything has a lifecycle: use cases, stories, concepts, personas, outcomes, data products and datasets. This ontology says what a lifecycle is, which lifecycle a thing follows and which state the thing is in. It depends on none of the ontologies that describe those things.
A lifecycle has a name, states and permitted transitions, optionally grouped into phases. Its states and transitions form a directed graph; it does not require a separate RDF named graph. Multiple lifecycles can share an RDF graph, with inLifecycle expressing membership independently of graph placement. State order controls presentation, not which moves are permitted. There can be any number of lifecycles. This ontology defines none: the well-known lifecycles are a dataset (dataset/well-known-lifecycles.ttl), and anyone can define more. The registry uses a separate namespace for each lifecycle to distinguish shared state names such as Draft and Deprecated. This is an IRI naming convention, not a graph-storage requirement; custom lifecycles can use another IRI naming convention.
Which lifecycles a thing follows is decided in this order:
- The complete set of lifecycles the thing names itself, with followsLifecycle.
- Otherwise, the union of lifecycles that apply to its classes (including superclasses), with appliesTo.
A thing has one inState history head per effective lifecycle. Each head is a StateTransition occurrence whose currentState belongs to that lifecycle. priorStateTransition links earlier occurrences; the lifecycle is derived from each state, and optional provenance is recorded on the occurrence.
1.2 Classes§
1.2.1 Lifecycle§
A lifecycle with a name, states and permitted transitions, optionally grouped into phases. Membership is expressed with inLifecycle and does not require a separate RDF named graph.
ekg-lifecycle:Lifecycle | |
https://ekgf.org/ontology/lifecycle#Lifecycle | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Lifecycle |
1.2.2 Phase§
A high-level part of a lifecycle that groups states.
ekg-lifecycle:Phase | |
https://ekgf.org/ontology/lifecycle#Phase | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Phase |
1.2.3 State§
One state of a lifecycle.
ekg-lifecycle:State | |
https://ekgf.org/ontology/lifecycle#State | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | State |
1.2.4 State transition§
An actual state-entry occurrence for one thing in one lifecycle, distinct from a permitted Transition definition. It records exactly one currentState and optionally one priorStateTransition. The first occurrence records an initial state without a predecessor. Occurrences can carry optional PROV-O properties and can be identified by IRIs or blank nodes.
ekg-lifecycle:StateTransition | |
https://ekgf.org/ontology/lifecycle#StateTransition | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | State transition |
owl:disjointWith | ekg-lifecycle:Transition |
1.2.5 Transition§
A permitted directed move between two states of one lifecycle. This describes a possible move, not an occurrence of a state change. Multiple transitions may have the same endpoints and different triggers; loops and branches are explicit.
ekg-lifecycle:Transition | |
https://ekgf.org/ontology/lifecycle#Transition | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:Class |
rdfs:label | Transition |
1.3 Properties§
1.3.1 applies to§
A class whose members follow this lifecycle unless they name another one. This is policy rather than vocabulary: an organization states it in its own data, and can state it differently. It is an annotation property because its values are classes, which are not individuals.
ekg-lifecycle:appliesTo | |
https://ekgf.org/ontology/lifecycle#appliesTo | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:AnnotationProperty |
rdfs:domain | ekg-lifecycle:Lifecycle |
rdfs:label | applies to |
rdfs:range | rdfs:Class |
1.3.2 current state§
The state entered by this occurrence. Its inLifecycle identifies the lifecycle; the occurrence does not duplicate that assignment.
ekg-lifecycle:currentState | |
https://ekgf.org/ontology/lifecycle#currentState | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:FunctionalProperty |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-lifecycle:StateTransition |
rdfs:label | current state |
rdfs:range | ekg-lifecycle:State |
1.3.3 follows lifecycle§
A lifecycle this thing follows. When explicit assignments exist, their complete set replaces the class defaults from appliesTo. A thing can follow several lifecycles.
ekg-lifecycle:followsLifecycle | |
https://ekgf.org/ontology/lifecycle#followsLifecycle | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:ObjectProperty |
rdfs:label | follows lifecycle |
rdfs:range | ekg-lifecycle:Lifecycle |
1.3.4 from state§
The source state of a permitted transition.
ekg-lifecycle:fromState | |
https://ekgf.org/ontology/lifecycle#fromState | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:FunctionalProperty |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-lifecycle:Transition |
rdfs:label | from state |
rdfs:range | ekg-lifecycle:State |
1.3.5 in lifecycle§
The lifecycle that a phase, state or transition belongs to.
ekg-lifecycle:inLifecycle | |
https://ekgf.org/ontology/lifecycle#inLifecycle | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:ObjectProperty |
rdfs:domain | (rdf:type: owl:Class; owl:unionOf: (ekg-lifecycle:Phase, ekg-lifecycle:State, ekg-lifecycle:Transition)) |
rdfs:label | in lifecycle |
rdfs:range | ekg-lifecycle:Lifecycle |
1.3.6 in state§
Links a thing to its current state-entry occurrence, one per effective lifecycle. Earlier occurrences are reached through priorStateTransition. It has no domain because anything can follow lifecycles.
ekg-lifecycle:inState | |
https://ekgf.org/ontology/lifecycle#inState | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:ObjectProperty |
rdfs:label | in state |
rdfs:range | ekg-lifecycle:StateTransition |
1.3.7 is terminal§
True for a state that nothing follows. A lifecycle can end in several ways, such as done, failed or cancelled; each of those is a terminal state, and their order is only the order in which they are listed.
ekg-lifecycle:isTerminal | |
https://ekgf.org/ontology/lifecycle#isTerminal | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:DatatypeProperty |
rdf:type | owl:FunctionalProperty |
rdfs:domain | ekg-lifecycle:State |
rdfs:label | is terminal |
rdfs:range | xsd:boolean |
1.3.8 order§
Display position of a state within its lifecycle. Order does not imply a permitted transition.
ekg-lifecycle:order | |
https://ekgf.org/ontology/lifecycle#order | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:DatatypeProperty |
rdf:type | owl:FunctionalProperty |
rdfs:domain | ekg-lifecycle:State |
rdfs:label | order |
rdfs:range | xsd:integer |
1.3.9 phase§
The phase that a state belongs to.
ekg-lifecycle:phase | |
https://ekgf.org/ontology/lifecycle#phase | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:FunctionalProperty |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-lifecycle:State |
rdfs:label | phase |
rdfs:range | ekg-lifecycle:Phase |
1.3.10 prior state transition§
The immediately preceding occurrence for the same thing and lifecycle. Absent for an initial recorded state. History chains must be acyclic even when permitted state routes contain loops.
ekg-lifecycle:priorStateTransition | |
https://ekgf.org/ontology/lifecycle#priorStateTransition | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:FunctionalProperty |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-lifecycle:StateTransition |
rdfs:label | prior state transition |
rdfs:range | ekg-lifecycle:StateTransition |
1.3.11 to state§
The target state of a permitted transition.
ekg-lifecycle:toState | |
https://ekgf.org/ontology/lifecycle#toState | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:FunctionalProperty |
rdf:type | owl:ObjectProperty |
rdfs:domain | ekg-lifecycle:Transition |
rdfs:label | to state |
rdfs:range | ekg-lifecycle:State |
1.3.12 trigger§
An optional human-readable description of the event that enables a transition. It is not an executable guard or an authorization rule. Omitting it leaves the trigger unspecified.
ekg-lifecycle:trigger | |
https://ekgf.org/ontology/lifecycle#trigger | |
| RDF predicate | Value |
|---|---|
rdf:type | owl:DatatypeProperty |
rdfs:domain | ekg-lifecycle:Transition |
rdfs:label | trigger |
rdfs:range | rdf:langString |
1.4 Shapes§
1.4.1 Current State Shape§
Validates effective lifecycle selection and current history-head assignments, including explicitly selected lifecycles and class defaults.
ekg-lifecycle:CurrentStateShape | |
https://ekgf.org/ontology/lifecycle#CurrentStateShape | |
| RDF predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | Current State Shape |
sh:property | (sh:class: ekg-lifecycle:Lifecycle; sh:path: ekg-lifecycle:followsLifecycle) |
sh:property | (sh:class: ekg-lifecycle:StateTransition; sh:path: ekg-lifecycle:inState) |
sh:sparql | (sh:message: A current history head cannot have a recorded successor.; sh:select: SPARQL SELECT query 1) |
sh:sparql | (sh:message: A current history head must belong to an effective lifecycle.; sh:select: SPARQL SELECT query 2) |
sh:sparql | (sh:message: An object must have only one current history head per lifecycle.; sh:select: SPARQL SELECT query 3) |
sh:sparql | (sh:message: Each effective lifecycle requires a current history head.; sh:select: SPARQL SELECT query 4) |
sh:targetSubjectsOf | rdf:type |
sh:targetSubjectsOf | ekg-lifecycle:followsLifecycle |
sh:targetSubjectsOf | ekg-lifecycle:inState |
1.4.1.1 SPARQL query 1§
A current history head cannot have a recorded successor.
PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
SELECT $this WHERE {
$this lifecycle:inState ?head .
?successor lifecycle:priorStateTransition ?head .
}
1.4.1.2 SPARQL query 2§
A current history head must belong to an effective lifecycle.
PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT $this WHERE {
$this lifecycle:inState/lifecycle:currentState/lifecycle:inLifecycle ?lc .
FILTER NOT EXISTS { $this lifecycle:followsLifecycle ?lc }
FILTER (
EXISTS { $this lifecycle:followsLifecycle ?explicit }
|| NOT EXISTS {
$this rdf:type/rdfs:subClassOf* ?class .
?lc lifecycle:appliesTo ?class .
}
)
}
1.4.1.3 SPARQL query 3§
An object must have only one current history head per lifecycle.
PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
SELECT $this WHERE {
$this lifecycle:inState ?head , ?other .
?head lifecycle:currentState/lifecycle:inLifecycle ?lc .
?other lifecycle:currentState/lifecycle:inLifecycle ?lc .
FILTER (?head != ?other)
}
1.4.1.4 SPARQL query 4§
Each effective lifecycle requires a current history head.
PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT $this WHERE {
{
$this lifecycle:followsLifecycle ?lc .
} UNION {
FILTER NOT EXISTS { $this lifecycle:followsLifecycle ?explicit }
$this rdf:type/rdfs:subClassOf* ?class .
?lc lifecycle:appliesTo ?class .
}
FILTER NOT EXISTS {
$this lifecycle:inState/lifecycle:currentState/lifecycle:inLifecycle ?lc .
}
}
1.4.2 History State Shape§
Validates the State resources referenced by history occurrences, requiring each state to identify exactly one lifecycle.
ekg-lifecycle:HistoryStateShape | |
https://ekgf.org/ontology/lifecycle#HistoryStateShape | |
| RDF predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | History State Shape |
sh:class | ekg-lifecycle:State |
sh:property | (sh:class: ekg-lifecycle:Lifecycle; sh:maxCount: 1; sh:minCount: 1; sh:path: ekg-lifecycle:inLifecycle) |
sh:targetObjectsOf | ekg-lifecycle:currentState |
1.4.3 Legacy State Shape§
Rejects use of the removed hasState predicate. Current assignments use inState with StateTransition occurrences instead.
ekg-lifecycle:LegacyStateShape | |
https://ekgf.org/ontology/lifecycle#LegacyStateShape | |
| RDF predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | Legacy State Shape |
sh:property | (sh:maxCount: 0; sh:message: hasState was removed. Use inState with a StateTransition occurrence.; sh:path: ekg-lifecycle:hasState) |
sh:targetSubjectsOf | ekg-lifecycle:hasState |
1.4.4 State Transition Shape§
Validates a recorded state-transition event, including its current state and predecessor transition where supplied.
ekg-lifecycle:StateTransitionShape | |
https://ekgf.org/ontology/lifecycle#StateTransitionShape | |
| RDF predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | State Transition Shape |
sh:class | ekg-lifecycle:StateTransition |
sh:not | (sh:class: ekg-lifecycle:Transition) |
sh:property | (sh:class: ekg-lifecycle:State; sh:maxCount: 1; sh:minCount: 1; sh:path: ekg-lifecycle:currentState) |
sh:property | (sh:class: ekg-lifecycle:StateTransition; sh:maxCount: 1; sh:path: ekg-lifecycle:priorStateTransition) |
sh:sparql | (sh:message: A state-entry occurrence cannot belong to histories of different objects.; sh:select: SPARQL SELECT query 1) |
sh:sparql | (sh:message: State history must not contain predecessor cycles.; sh:select: SPARQL SELECT query 2) |
sh:sparql | (sh:message: Successive occurrences must follow a permitted transition within the same lifecycle.; sh:select: SPARQL SELECT query 3) |
sh:targetClass | ekg-lifecycle:StateTransition |
sh:targetObjectsOf | ekg-lifecycle:inState |
sh:targetObjectsOf | ekg-lifecycle:priorStateTransition |
sh:targetSubjectsOf | ekg-lifecycle:currentState |
sh:targetSubjectsOf | ekg-lifecycle:priorStateTransition |
1.4.4.1 SPARQL query 1§
A state-entry occurrence cannot belong to histories of different objects.
PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
SELECT $this WHERE {
?object lifecycle:inState/lifecycle:priorStateTransition* $this .
?other lifecycle:inState/lifecycle:priorStateTransition* $this .
FILTER (?object != ?other)
}
1.4.4.2 SPARQL query 2§
State history must not contain predecessor cycles.
PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
SELECT $this WHERE {
$this lifecycle:priorStateTransition+ $this .
}
1.4.4.3 SPARQL query 3§
Successive occurrences must follow a permitted transition within the same lifecycle.
PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT $this WHERE {
$this lifecycle:currentState ?to ;
lifecycle:priorStateTransition/lifecycle:currentState ?from .
FILTER NOT EXISTS {
?from lifecycle:inLifecycle ?lc .
?to lifecycle:inLifecycle ?lc .
?route rdf:type lifecycle:Transition ;
lifecycle:inLifecycle ?lc ;
lifecycle:fromState ?from ;
lifecycle:toState ?to .
}
}
1.4.5 Transition Shape§
Validates a lifecycle transition's lifecycle, source state, destination state, and trigger.
ekg-lifecycle:TransitionShape | |
https://ekgf.org/ontology/lifecycle#TransitionShape | |
| RDF predicate | Value |
|---|---|
rdf:type | sh:NodeShape |
rdfs:label | Transition Shape |
sh:class | ekg-lifecycle:Transition |
sh:property | (sh:class: ekg-lifecycle:State; sh:maxCount: 1; sh:minCount: 1; sh:path: ekg-lifecycle:toState) |
sh:property | (sh:datatype: rdf:langString; sh:path: ekg-lifecycle:trigger) |
sh:property | (sh:class: ekg-lifecycle:State; sh:maxCount: 1; sh:minCount: 1; sh:path: ekg-lifecycle:fromState) |
sh:property | (sh:class: ekg-lifecycle:Lifecycle; sh:maxCount: 1; sh:minCount: 1; sh:path: ekg-lifecycle:inLifecycle) |
sh:sparql | (sh:message: A terminal state cannot be the source of a transition.; sh:select: SPARQL SELECT query 1) |
sh:sparql | (sh:message: Both endpoint states must belong only to the transition's lifecycle.; sh:select: SPARQL SELECT query 2) |
sh:targetClass | ekg-lifecycle:Transition |
sh:targetSubjectsOf | ekg-lifecycle:fromState |
sh:targetSubjectsOf | ekg-lifecycle:toState |
sh:targetSubjectsOf | ekg-lifecycle:trigger |
1.4.5.1 SPARQL query 1§
A terminal state cannot be the source of a transition.
PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
SELECT $this WHERE {
$this lifecycle:fromState ?state .
?state lifecycle:isTerminal true .
}
1.4.5.2 SPARQL query 2§
Both endpoint states must belong only to the transition's lifecycle.
PREFIX lifecycle: <https://ekgf.org/ontology/lifecycle#>
SELECT $this WHERE {
$this lifecycle:inLifecycle ?lifecycle ;
(lifecycle:fromState|lifecycle:toState) ?state .
FILTER (
NOT EXISTS { ?state lifecycle:inLifecycle ?lifecycle }
|| EXISTS {
?state lifecycle:inLifecycle ?other .
FILTER (?other != ?lifecycle)
}
)
}