From 2720adf9edd25aed805aa7b7f1d48746714757ba Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Tue, 29 Aug 2023 20:14:15 +0200 Subject: [PATCH] Limit linking norm data repositories via NodaBatchInserter to those applicable for a given target vocabulary --- src/NodaBatchInserter.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/NodaBatchInserter.php b/src/NodaBatchInserter.php index 42fd96a..599b02a 100644 --- a/src/NodaBatchInserter.php +++ b/src/NodaBatchInserter.php @@ -141,6 +141,11 @@ final class NodaBatchInserter { $noda_source = $nodaLink->source->toDbName(); $noda_id = $nodaLink->id; $noda_link_url = $nodaLink->getEntityLink(); + + if (!in_array($noda_source, MDNodaRepositoriesSet::REPOSITORIES_ACTOR, true)) { + continue; + } + $insertNodaLinkStmt->bind_param("issss", $persinst_id, $noda_source, $noda_id, $noda_link_url, $user_name); $insertNodaLinkStmt->execute(); @@ -179,6 +184,11 @@ final class NodaBatchInserter { $noda_source = $nodaLink->source->toDbName(); $noda_id = $nodaLink->id; $noda_link_url = $nodaLink->getEntityLink(); + + if (!in_array($noda_source, MDNodaRepositoriesSet::REPOSITORIES_PLACE, true)) { + continue; + } + $insertNodaLinkStmt->bind_param("issss", $ort_id, $noda_source, $noda_id, $noda_link_url, $user_name); $insertNodaLinkStmt->execute(); @@ -217,6 +227,11 @@ final class NodaBatchInserter { $noda_source = $nodaLink->source->toDbName(); $noda_id = $nodaLink->id; $noda_link_url = $nodaLink->getEntityLink(); + + if (!in_array($noda_source, MDNodaRepositoriesSet::REPOSITORIES_TAG, true)) { + continue; + } + $insertNodaLinkStmt->bind_param("issss", $tag_id, $noda_source, $noda_id, $noda_link_url, $user_name); $insertNodaLinkStmt->execute();