diff --git a/interfaces/MDImporterBlacklistInterface.php b/interfaces/MDImporterBlacklistInterface.php new file mode 100644 index 0000000..e1b6959 --- /dev/null +++ b/interfaces/MDImporterBlacklistInterface.php @@ -0,0 +1,21 @@ + + */ +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; +} diff --git a/src/MDConcEventTypes.php b/src/MDConcEventTypes.php index 5750c0a..8454fef 100644 --- a/src/MDConcEventTypes.php +++ b/src/MDConcEventTypes.php @@ -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, diff --git a/src/MDConcFieldRelatedWorksType.php b/src/MDConcFieldRelatedWorksType.php index 78bfd1a..d1f097f 100644 --- a/src/MDConcFieldRelatedWorksType.php +++ b/src/MDConcFieldRelatedWorksType.php @@ -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", diff --git a/src/MDConcLengths.php b/src/MDConcLengths.php index f39508c..c24e319 100644 --- a/src/MDConcLengths.php +++ b/src/MDConcLengths.php @@ -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", diff --git a/src/MDConcLicenses.php b/src/MDConcLicenses.php index 480360f..1d1390c 100644 --- a/src/MDConcLicenses.php +++ b/src/MDConcLicenses.php @@ -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", diff --git a/src/blacklists/MDBlacklistNodaRepositories.php b/src/blacklists/MDBlacklistNodaRepositories.php new file mode 100644 index 0000000..b4c6c88 --- /dev/null +++ b/src/blacklists/MDBlacklistNodaRepositories.php @@ -0,0 +1,59 @@ + + */ +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; + + } +}