From 45b453134cb7a1b81e9933bcb4aab6a85e1d2962 Mon Sep 17 00:00:00 2001 From: jh-RLI Date: Mon, 15 Jun 2026 00:56:48 +0200 Subject: [PATCH 01/18] Add oekg.registry package Co-Authored-By: Claude Opus 4.8 (1M context) --- oekg/registry/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 oekg/registry/__init__.py diff --git a/oekg/registry/__init__.py b/oekg/registry/__init__.py new file mode 100644 index 000000000..85dae9538 --- /dev/null +++ b/oekg/registry/__init__.py @@ -0,0 +1,4 @@ +""" +SPDX-FileCopyrightText: 2026 Jonas Huber © Reiner Lemoine Institut +SPDX-License-Identifier: AGPL-3.0-or-later +""" # noqa: 501 From a943d618046d1871d5ae7dec07c5e89259c504a4 Mon Sep 17 00:00:00 2001 From: jh-RLI Date: Mon, 15 Jun 2026 00:56:50 +0200 Subject: [PATCH 02/18] Add Dimension Property Registry (harmonized comparison vocabulary) Co-Authored-By: Claude Opus 4.8 (1M context) --- .../registry/dimension_property_registry.yaml | 295 ++++++++++++++++++ 1 file changed, 295 insertions(+) create mode 100644 oekg/registry/dimension_property_registry.yaml diff --git a/oekg/registry/dimension_property_registry.yaml b/oekg/registry/dimension_property_registry.yaml new file mode 100644 index 000000000..af0058525 --- /dev/null +++ b/oekg/registry/dimension_property_registry.yaml @@ -0,0 +1,295 @@ +# ============================================================================= +# Dimension Property Registry +# ----------------------------------------------------------------------------- +# Single source of truth for the harmonized RDF vocabulary used by the scenario +# comparison service. It maps each comparable DIMENSION to: +# - the CONCEPT it annotates (the class an oemetadata `isAbout` resolves to), +# - the PREDICATE used in the generated triple (the object property), +# - whether the object is an IRI or a literal (+ datatype), +# - and, for controlled vocabularies, the value space (code -> IRI). +# +# Read by BOTH: +# * the mapping generator (separate repo) -> replaces its hardcoded +# `concept -> predicate` lookup; supplies `property_url`. +# * the comparison UI (factsheet/frontend/.../quantitativeView.jsx) -> today +# these predicates are hardcoded there; the UI should read them from here. +# +# RESOLUTION MODEL (what is curated here vs resolved from the TIB TS): +# * CURATED HERE -> the `dimensions` list = dimension -> predicate association. +# This is a MODELLING choice, not ontology data: the TIB Terminology Service +# cannot derive "which object property attaches a data point to this concept" +# (property-by-label search is unreliable). Small + stable -> fine to maintain. +# * RESOLVED FROM TS -> all term/concept IRIs (the `value_spaces` below). Do NOT +# hand-author these as truth. Use oekg/registry/resolve_terms.py against +# https://api.terminology.tib.eu (e.g. /api/search?q=