From 8fe541c9ca6b796868df968ab707c5099aaad19f Mon Sep 17 00:00:00 2001 From: Tom De Nies Date: Tue, 30 Jun 2026 16:23:43 +0200 Subject: [PATCH 1/4] Make all annotations annotation targets as well. --- config/resources/annotation.lisp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/config/resources/annotation.lisp b/config/resources/annotation.lisp index 5d2afa58..995b5a65 100644 --- a/config/resources/annotation.lisp +++ b/config/resources/annotation.lisp @@ -1,6 +1,14 @@ (in-package :mu-cl-resources) -(define-resource annotation () +(define-resource annotation-target () ;; generic resource class to serve as a target for annotations, to be extended with specific classes +:class (s-prefix "ext:AnnotationTarget") +:has-many `((annotation :via ,(s-prefix "oa:hasTarget") + :as "annotations" + :inverse t)) +:resource-base (s-url "http://data.lblod.info/id/annotation-targets/") +:on-path "annotation-targets") + +(define-resource annotation (annotation-target) :class (s-prefix "oa:Annotation") :properties `((:confidence :number ,(s-prefix "nif:confidence")) (:motivated-by :url ,(s-prefix "oa:motivatedBy"))) @@ -12,14 +20,6 @@ :resource-base (s-url "http://data.lblod.info/id/annotations/") :on-path "annotations") -(define-resource annotation-target () ;; generic resource class to serve as a target for annotations, to be extended with specific classes - :class (s-prefix "ext:AnnotationTarget") - :has-many `((annotation :via ,(s-prefix "oa:hasTarget") - :as "annotations" - :inverse t)) - :resource-base (s-url "http://data.lblod.info/id/annotation-targets/") - :on-path "annotation-targets") - (define-resource annotation-body () ;; generic resource class to serve as a body for annotations, to be extended with specific classes :class (s-prefix "ext:AnnotationBody") :has-one `((annotation :via ,(s-prefix "oa:hasBody") From f1d6409193c7246cfefe56062617eeeca3237f4c Mon Sep 17 00:00:00 2001 From: Tom De Nies Date: Thu, 9 Jul 2026 14:10:24 +0200 Subject: [PATCH 2/4] Add annotation target types as env variable to annotation-review --- compose/validation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/compose/validation.yml b/compose/validation.yml index cae86e8a..3dc19317 100644 --- a/compose/validation.yml +++ b/compose/validation.yml @@ -12,6 +12,7 @@ services: logging: *default-logging environment: DEFAULT_MU_AUTH_SCOPE: 'http://services.semantic.works/annotation-review-service' + ANNOTATION_TARGET_TYPES: 'http://www.w3.org/ns/oa#Annotation,http://mu.semte.ch/vocabularies/ext/AnnotationTarget' TZ: Europe/Brussels volumes: - ../config/annotation-review:/config From 1d741c7fc043503bcd490712a2b30e5e9f9aa0aa Mon Sep 17 00:00:00 2001 From: Tom De Nies Date: Tue, 14 Jul 2026 17:11:56 +0200 Subject: [PATCH 3/4] Add AnnotationTarget to ODRL config --- config/authorization/config.ttl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/authorization/config.ttl b/config/authorization/config.ttl index f3c9e418..e275e77e 100644 --- a/config/authorization/config.ttl +++ b/config/authorization/config.ttl @@ -596,6 +596,10 @@ ext:ExtReviewAnnotationAsset a odrl:Asset, sh:NodeShape ; odrl:partOf ext:decideHumanValidationSlice ; sh:targetClass ext:ReviewAnnotation . +ext:ExtAnnotationTargetAsset a odrl:Asset, sh:NodeShape ; + odrl:partOf ext:decideHumanValidationSlice ; + sh:targetClass ext:AnnotationTarget . + ext:SchemaQuestionAsset a odrl:Asset, sh:NodeShape ; odrl:partOf ext:decideQuestionAnsweringSlice , ext:decideAiSlice ; From 4cc854a0f4bedccdbb4eb686106d7f0e086b2579 Mon Sep 17 00:00:00 2001 From: Tom De Nies Date: Thu, 16 Jul 2026 10:25:48 +0200 Subject: [PATCH 4/4] Fix read access to question-answering for human validation --- config/authorization/config.ttl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/authorization/config.ttl b/config/authorization/config.ttl index e275e77e..d11de69c 100644 --- a/config/authorization/config.ttl +++ b/config/authorization/config.ttl @@ -53,6 +53,7 @@ ext:decideAuthorizationPolicy a odrl:Set ; ext:allowReadForAiSlice , ext:allowReadOsloOrgsForHumanValidation , ext:allowReadForHumanValidation , + ext:allowQuestionAnsweringReadForHumanValidation, ext:allowWriteForHumanValidation , ext:allowReadForQuestionAnswering , ext:allowWriteForQuestionAnswering , @@ -277,6 +278,13 @@ ext:allowReadForHumanValidation a odrl:Permission ; odrl:assignee ext:publicParty ; ext:scope "http://services.semantic.works/annotation-review-service" . +ext:allowQuestionAnsweringReadForHumanValidation a odrl:Permission ; + odrl:action odrl:read ; + odrl:target ext:decideQuestionAnsweringSlice ; + odrl:assigner ext:decideSystem ; + odrl:assignee ext:publicParty ; + ext:scope "http://services.semantic.works/annotation-review-service" . + ext:allowWriteForHumanValidation a odrl:Permission ; odrl:action odrl:modify ; odrl:target ext:decideHumanValidationSlice ;