Extend concordance lists

This commit is contained in:
Joshua Ramon Enslin 2023-10-18 23:13:58 +02:00
parent e2d2c1b2d1
commit ffc5fd5992
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
6 changed files with 120 additions and 0 deletions

View File

@ -0,0 +1,21 @@
<?PHP
/**
* Describes a blacklist for the importer.
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Describes a blacklist for the importer.
*/
interface MDImporterBlacklistInterface {
/**
* Checks if the input string is blacklisted.
*
* @param string $input Input string.
*
* @return bool
*/
public static function isBlacklisted(string $input):bool;
}

View File

@ -25,6 +25,8 @@ final class MDConcEventTypes implements MDImporterConcordanceListInterface {
'Leipoldt, J.' => 1,
'Rohleder, Walter, Reichenbach' => 1,
// "Unknown event"
'Aktivität' => 1,
'http://terminology.lido-schema.org/lido00004' => 1,
'Ereignis' => 1,
'http://terminology.lido-schema.org/lido00003' => 1,
@ -45,6 +47,7 @@ final class MDConcEventTypes implements MDImporterConcordanceListInterface {
'http://terminology.lido-schema.org/eventType/publication' => 3,
'Publikation' => 3,
'Publishing' => 3,
'Publication' => 3,
'Publication Event' => 3,
'Publication (Event)' => 3,
@ -101,6 +104,7 @@ final class MDConcEventTypes implements MDImporterConcordanceListInterface {
'Sent' => 13,
'Gesendet' => 13,
'Versendet' => 13,
'Abgeschickt' => 13,
// '14' => Issued
'Issued' => 14,
@ -121,6 +125,7 @@ final class MDConcEventTypes implements MDImporterConcordanceListInterface {
// 20: Copied
'Copied' => 20,
'Kopiert' => 20,
'Abgeschrieben' => 20,
// 21: Lived
'Lived' => 21,
@ -159,9 +164,11 @@ final class MDConcEventTypes implements MDImporterConcordanceListInterface {
// 31 => Modelled
'Modelled' => 31,
'Modelliert' => 31,
// 32 => Autographed/Signed
'Autographed/Signed' => 32,
'Signiert' => 32,
// 33 => Mentioned
'Mentioned' => 33,
@ -210,6 +217,7 @@ final class MDConcEventTypes implements MDImporterConcordanceListInterface {
'Acquisition (Activity)' => 41,
'Bodenreform' => 41,
'Kauf' => 41,
'Gekauft' => 41,
'acquisition_Kauf' => 41,
'acquisition_Diener' => 41,
@ -230,11 +238,13 @@ final class MDConcEventTypes implements MDImporterConcordanceListInterface {
'acquisition_Mehlig' => 42,
'Provenienz' => 42,
'Provenance' => 42,
'Besessen' => 42,
'http://terminology.lido-schema.org/lido00227' => 42,
// 43: Was sold
'was sold' => 43,
'Verkauft' => 43,
'Vertrieb' => 43,
// 44: Restorated
'Restaurierung' => 44,
@ -254,6 +264,7 @@ final class MDConcEventTypes implements MDImporterConcordanceListInterface {
'Nachlass' => 49,
'Übergabe' => 49,
'Stiftung' => 49,
'Gespendet / Geschenkt' => 49,
'acquisition_Schenkung' => 49,
'acquisition_Nachlass' => 49,
'acquisition_Übergabe' => 49,

View File

@ -42,6 +42,9 @@ enum MDConcFieldRelatedWorksType {
"Teil von",
"ist Teil von",
"Gehört zu",
"gehört zu",
"Gehört zu Sammlung",
"gehört zu Sammlung",
"Part of",
"Gesamtwerk",
"part of",
@ -56,6 +59,11 @@ enum MDConcFieldRelatedWorksType {
"ist Version von",
"inhaltlicher Bezug zu",
"Teil",
"Teil 1",
"Teil 2",
"Teil 3",
"Teil 4",
"hat Teil",
"has part",
"Dublette",
"Objektbezug",
@ -103,6 +111,8 @@ enum MDConcFieldRelatedWorksType {
"Blatt",
"Photo",
"Einzelteil",
"verwandt mit",
"Zusammen ein Ganzes bildend mit",
"Vorlage" => self::related_works_freetext,
"Weblink",

View File

@ -60,6 +60,24 @@ final class MDConcLengths implements MDImporterConcordanceListInterface {
"mit Stahlrahmen" => "",
"Pfeilhöhe" => "",
"Klingenbreite" => "",
"bis" => "",
"vorne" => "",
"hinten" => "",
"zwischenund" => "",
"Standring" => "",
"kleinsterDurchmesser" => "",
"größterDurchmesser" => "",
"kleinster Durchmesser" => "",
"größter Durchmesser" => "",
"Klinge" => "",
"Henkel" => "",
"mitFaden" => "",
"mit Faden" => "",
"ohneFaden" => "",
"ohne Faden" => "",
"nichtmessbar" => "",
"nicht messbar" => "",
"Stoffbreite" => "",
// cm
"cn" => "cm",

View File

@ -30,6 +30,7 @@ final class MDConcLicenses implements MDImporterConcordanceListInterface {
"http://creativecommons.org/licenses/by/4.0" => "CC BY",
"https://creativecommons.org/licenses/by/4.0" => "CC BY",
"https://creativecommons.org/licenses/by/4.0/" => "CC BY",
"https://creativecommons.org/licenses/by/4.0/deed.de" => "CC BY",
"CC BY SA" => "CC BY-SA",
"CC BY-SA-" => "CC BY-SA",

View File

@ -0,0 +1,59 @@
<?PHP
/**
* Constains a blacklist for disallowed names of vocabularies (either nonsense
* ones or ones not supported by md).
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Constains a blacklist for disallowed names of vocabularies (either nonsense
* ones or ones not supported by md).
*/
final class MDBlacklistNodaRepositories implements MDImporterBlacklistInterface {
/**
* List of blacklisted repository names.
*/
private const BLACKLIST = [
'',
'actor.xtree',
'akl',
'akl-nummer',
'AKL',
'AKL-Nummer',
'bmpi', // What is this?
'Bildindex-KUE-Datei',
'digitales kunst- und kulturarchiv düsseldorf',
'Digitales Kunst- und Kulturarchiv Düsseldorf',
'digicult.web',
'digiCULT.web',
'digicult.vocnet.org',
'isil',
'ISIL',
'kue.id',
'kue.id.',
'md:term',
'RIA/SMB',
'swd-nummer',
'SWD-Nummer',
'xtree'
];
/**
* Checks if the input string is blacklisted.
*
* @param string $input Input string.
*
* @return boolean
*/
public static function isBlacklisted(string $input):bool {
if (in_array($input, self::BLACKLIST, true)) {
return true;
}
return false;
}
}