From 78f11380ac10e490cdb7a7d164db89dfc1dc5064 Mon Sep 17 00:00:00 2001 From: Elena Poelman Date: Tue, 23 Jul 2024 11:48:32 +0200 Subject: [PATCH] fix issue with decision extraction --- models/decision.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/models/decision.js b/models/decision.js index df214e9..8ce00f4 100644 --- a/models/decision.js +++ b/models/decision.js @@ -12,7 +12,9 @@ export default class Decision { const decisionUris = triples .filter( (t) => - t.predicate === 'a' && + (t.predicate === 'a' || + t.predicate === + 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type') && t.object === 'http://data.vlaanderen.be/ns/besluit#Besluit' ) .map((b) => b.subject); @@ -37,7 +39,11 @@ export default class Decision { ); const description = descriptionTriple?.object; const types = triples - .filter((t) => t.predicate === 'a') + .filter( + (t) => + t.predicate === 'a' || + t.predicate === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' + ) .map((type) => type.object); const uri = triples[0].subject; return new Decision({ title, description, types, uri });