From 79288808b685586287b7d0adce1dd8e78bc0647b Mon Sep 17 00:00:00 2001 From: felix Date: Wed, 16 Sep 2026 00:25:57 +0200 Subject: [PATCH] more elaborate low --- config/authorization/config.lisp | 10 ++++ config/report-profiles/codes-en-schemas.ttl | 61 +++++++++++++++++++++ config/report-profiles/erediensten.ttl | 2 +- 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 config/report-profiles/codes-en-schemas.ttl diff --git a/config/authorization/config.lisp b/config/authorization/config.lisp index 7242593..be54556 100644 --- a/config/authorization/config.lisp +++ b/config/authorization/config.lisp @@ -403,6 +403,16 @@ :to-graph (public shared) :for-allowed-group "public") +;; natural-language-report-service reads the public graph under its own +;; scope during refinement (code lists, lookup_values). The service passes +;; this scope with mu's query(q, { scope }); sparql-parser then uses only +;; this grant, so the LLM reads public data and nothing beyond it. +;; Execution (run_report) still runs as the caller's session. +(with-scope "http://services.semantic.works/natural-language-report" + (grant (read) + :to-graph public + :for-allowed-group "public")) + (grant (read write) :to-graph (reports jobs system-jobs) :for-allowed-group "o-admin-rwf") diff --git a/config/report-profiles/codes-en-schemas.ttl b/config/report-profiles/codes-en-schemas.ttl new file mode 100644 index 0000000..4cd2f78 --- /dev/null +++ b/config/report-profiles/codes-en-schemas.ttl @@ -0,0 +1,61 @@ +# Profiel "Codes en schemas": skos:Concept en skos:ConceptScheme. +# De codelijsten van de andere profielen zijn skos:Concept-instanties die bij +# een schema horen via skos:inScheme. Met dit profiel kan de LLM een schema +# opzoeken en de concepten eruit tonen (bijvoorbeeld om een filterwaarde te +# kiezen). De andere profielen verwijzen naar ent:Concept via sh:node; dit +# profiel maakt van die entiteiten zelfstandig bevraagbare rapportonderwerpen. +# +# Rapporten hier zijn leeslijsten: een lijst van de concepten van één schema, +# of van schemas zelf. Ze landen in de publieke grafiek. +@prefix sh: . +@prefix rdfs: . +@prefix xsd: . +@prefix owl: . +@prefix dct: . +@prefix skos: . +@prefix ent: . + + + a owl:Ontology ; + dct:title "Codes en schemas" ; + sh:prefixes [ + sh:declare [ sh:prefix "skos" ; sh:namespace "http://www.w3.org/2004/02/skos/core#"^^xsd:anyURI ] ; + sh:declare [ sh:prefix "dct" ; sh:namespace "http://purl.org/dc/terms/"^^xsd:anyURI ] ; + sh:declare [ sh:prefix "rdfs" ; sh:namespace "http://www.w3.org/2000/01/rdf-schema#"^^xsd:anyURI ] ; + sh:declare [ sh:prefix "xsd" ; sh:namespace "http://www.w3.org/2001/XMLSchema#"^^xsd:anyURI ] ; + ] . + +ent:Concept + a sh:NodeShape ; + rdfs:label "concept" ; + sh:targetClass skos:Concept ; + sh:property [ sh:path skos:prefLabel ; sh:name "naam" ; + sh:datatype xsd:string ] ; + sh:property [ sh:path skos:altLabel ; sh:name "andere naam" ; + sh:datatype xsd:string ] ; + sh:property [ sh:path skos:notation ; sh:name "notatie" ; + sh:datatype xsd:string ] ; + sh:property [ sh:path skos:definition ; sh:name "definitie" ; + sh:datatype xsd:string ] ; + sh:property [ sh:path sh:order ; sh:name "volgorde" ; + sh:datatype xsd:decimal ] ; + sh:property [ sh:path skos:inScheme ; sh:name "in schema" ; + sh:description "Filter hiermee op één codeschema." ; + sh:node ent:ConceptSchema ] ; + sh:property [ sh:path skos:topConceptOf ; sh:name "top van schema" ; + sh:node ent:ConceptSchema ] ; + sh:property [ sh:path skos:exactMatch ; sh:name "exacte match" ; + sh:node ent:Concept ] . + +ent:ConceptSchema + a sh:NodeShape ; + rdfs:label "conceptschema" ; + sh:targetClass skos:ConceptScheme ; + sh:property [ sh:path skos:prefLabel ; sh:name "naam" ; + sh:datatype xsd:string ] ; + sh:property [ sh:path rdfs:label ; sh:name "label" ; + sh:datatype xsd:string ] ; + sh:property [ sh:path dct:title ; sh:name "titel" ; + sh:datatype xsd:string ] ; + sh:property [ sh:path skos:notation ; sh:name "notatie" ; + sh:datatype xsd:string ] . \ No newline at end of file diff --git a/config/report-profiles/erediensten.ttl b/config/report-profiles/erediensten.ttl index c8e8dfe..6ddcec3 100644 --- a/config/report-profiles/erediensten.ttl +++ b/config/report-profiles/erediensten.ttl @@ -16,7 +16,7 @@ # Niet opgenomen (geen rapportvelden): harvest-velden en vendor-relaties. @prefix sh: . @prefix rdfs: . -prefix owl: . +@prefix owl: . @prefix xsd: . @prefix dct: . @prefix skos: .