From 556d5f24844e43c5b451aa19fe11f1289ecf51a7 Mon Sep 17 00:00:00 2001 From: David de Boer Date: Thu, 16 Nov 2023 14:44:19 +0100 Subject: [PATCH] feat: Store registration URL for each dataset (#825) --- README.md | 7 ++++--- src/graphdb.ts | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d2cf8b5c..c586a83a 100644 --- a/README.md +++ b/README.md @@ -143,9 +143,10 @@ Each dataset that is found at the [`schema:EntryPoint`](#schemaentrypoint) regis `schema:Dataset` to the [Registrations graph](https://triplestore.netwerkdigitaalerfgoed.nl/resource?uri=https:%2F%2Fdemo.netwerkdigitaalerfgoed.nl%2Fregistry%2Fregistrations&role=context). -| Property | Description | -| -------- | ----------- | -| [`schema:dateRead`](https://schema.org/dateRead) | When the dataset was last read by the application. | +| Property | Description | +|----------------------------------------------------|----------------------------------------------------| +| [`schema:dateRead`](https://schema.org/dateRead) | When the dataset was last read by the application. | +| [`schema:subjectOf`](https://schema.org/subjectOf) | From which registration URL the dataset was read. | ### `dcat:Dataset` diff --git a/src/graphdb.ts b/src/graphdb.ts index 172a9676..9e479027 100644 --- a/src/graphdb.ts +++ b/src/graphdb.ts @@ -186,6 +186,12 @@ export class GraphDbRegistrationStore implements RegistrationStore { factory.namedNode('http://schema.org/Dataset'), factory.namedNode(this.registrationsGraph) ), + factory.quad( + factory.namedNode(datasetIri.toString()), + factory.namedNode('http://schema.org/subjectOf'), + factory.namedNode(registration.url.toString()), + factory.namedNode(this.registrationsGraph) + ), ]; if (registration.dateRead !== undefined) { datasetQuads.push(