Limit linking norm data repositories via NodaBatchInserter to those

applicable for a given target vocabulary
This commit is contained in:
Joshua Ramon Enslin 2023-08-29 20:14:15 +02:00
parent 67f7bf9fab
commit 2720adf9ed
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -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();