From f19973d20eaf5d13b4a4d1eb781d2498dc4fd714 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Wed, 25 Sep 2024 14:33:45 +0200 Subject: [PATCH] Remove noda repository MBL, add list of full names to the vocabs for improved frontend display Close #33 --- src/MDNodaRepositoriesSet.php | 1 - src/enums/MDNodaRepository.php | 49 +++++++++++++++++++++++++++++----- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/src/MDNodaRepositoriesSet.php b/src/MDNodaRepositoriesSet.php index 8651061..2da45e3 100644 --- a/src/MDNodaRepositoriesSet.php +++ b/src/MDNodaRepositoriesSet.php @@ -21,7 +21,6 @@ final class MDNodaRepositoriesSet extends MDValueSet { 'kl-bb', 'lcsh', 'loc', - 'MBL', 'NDB/ADB', 'ndl', 'ndp-ikmk-persons', diff --git a/src/enums/MDNodaRepository.php b/src/enums/MDNodaRepository.php index e752b4c..79ff287 100644 --- a/src/enums/MDNodaRepository.php +++ b/src/enums/MDNodaRepository.php @@ -24,7 +24,6 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable { case klbb; case lcsh; case loc; // Duplicate? - case mbl; case mindatorg; case moebeltypologie; case ndb_adb; @@ -77,8 +76,6 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable { 'kl-bb' => self::klbb, 'lcsh' => self::lcsh, 'loc' => self::loc, // Duplicate? - 'mbl' => self::mbl, - 'MBL' => self::mbl, 'mindat.org' => self::mindatorg, 'moebeltypologie' => self::moebeltypologie, 'ndb/adb' => self::ndb_adb, @@ -151,7 +148,6 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable { self::klbb => 'kl-bb', self::lcsh => 'lcsh', self::loc => 'loc', - self::mbl => 'MBL', self::mindatorg => 'mindat.org', self::moebeltypologie => 'moebeltypologie', self::ndb_adb => 'NDB/ADB', @@ -173,6 +169,48 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable { } + /** + * Returns the name as stored in the DB. + * + * @return string + */ + public function toFullName():string { + + return match($this) { + self::allgemein => 'General', // General link to a good source + self::aat => 'Art & Architecture Thesaurus (AAT)', + self::ackerbau => 'Ackerbau-Thesaurus', + self::bne => 'Biblioteca Nacional de España (BNE)', + self::bnf => 'Bibliothèque nationale de France (BNF)', + self::cona => 'Cultural Objects Name Authority (CONA)', + self::editionhumboldtdigital => 'Edition Humboldt Digital', + self::gnd => 'GND (Gemeinsame Normdatei)', + self::grobsystematik => 'Grobsystematik', + self::iconclass => 'Iconclass', + self::klbb => 'Berlin-Brandenburgisches Künstlerlexikon', + self::lcsh => 'Library of Congress Subject Headings (LCSH)', + self::loc => 'Library of Congress (LOC)', + self::mindatorg => 'mindat.org', + self::moebeltypologie => 'Möbeltypologie', + self::ndb_adb => 'Neue / Allgemeine Deutsche Biographie', + self::ndl => 'National Diet Library, Japan (NDL)', + self::ndp_ikmk => 'IKMK (Places)', + self::ndp_ikmk_persons => 'IKMK (Persons)', + self::nomisma => 'Nomisma', + self::npg => 'National Portrait Gallery', + self::oberbegriffsdatei => 'Oberbegriffsdatei', + self::orcid => 'ORCID (Open Researcher and Contributor ID)', + self::osm => 'OpenStreetMap', + self::pim => 'Petőfi Irodalmi Múzeum', + self::pleiades => 'Pleiades', + self::rkd => 'RKDartists ID', + self::ulan => 'Union List of Artist Names', + self::viaf => 'VIAF (Virtual International Authority File)', + self::wikidata => 'Wikidata', + }; + + } + /** * Returns the URL prefix for the current repository. * @@ -194,7 +232,6 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable { self::klbb => 'https://www.kl-bb.de/artist/', self::lcsh => 'http://id.loc.gov/authorities/names/', self::loc => 'http://id.loc.gov/authorities/names/', - self::mbl => 'http://www.uni-magdeburg.de/mbl/PHP_Skripte/mbl_verwaltung/mbl_verw_anzeige_biog.php?auswahl=3&liste_biog_name=', self::mindatorg => 'https://www.mindat.org/min-', // Has suffix self::moebeltypologie => 'https://term.museum-digital.de/moebel/tag/', self::ndb_adb => 'https://www.deutsche-biographie.de/pnd', @@ -256,7 +293,6 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable { self::lcsh => 'https://id.loc.gov/search/?q=cs:http://id.loc.gov/authorities/subjects&q=' . urlencode($searchTerm), self::klbb => 'https://www.kl-bb.de/gezielte-suche?page=gezielte-suche&artist_name=' . urlencode($searchTerm), self::loc => 'http://id.loc.gov/authorities/names/' . urlencode($searchTerm), - self::mbl => 'http://www.uni-magdeburg.de/mbl/PHP_Skripte/mbl_verwaltung/mbl_verw_anzeige_biog.php?auswahl=7&suchbegriffe=' . urlencode($searchTerm) . '&methode=or&schreibung=nein', self::mindatorg => 'https://www.mindat.org/search.php?search=' . urlencode($searchTerm) . '&q_s=1', self::moebeltypologie => 'https://term.museum-digital.de/redir.php?search=' . urlencode($searchTerm) . '&kind=tag|moebel', self::ndb_adb => 'https://www.deutsche-biographie.de/search?name=' . urlencode($searchTerm), @@ -631,7 +667,6 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable { self::klbb => self::validateNumericId($id, ['https://www.kl-bb.de/artist/', 'https://www.kl-bb.de/?page=actor&subPage=']), self::lcsh => self::validateLcshId($id), self::loc => self::validateLocId($id), - self::mbl => self::validateNumericId($id, ['http://www.uni-magdeburg.de/mbl/PHP_Skripte/mbl_verwaltung/mbl_verw_anzeige_biog.php?auswahl=3&liste_biog_name=', 'http://www.uni-magdeburg.de/mbl/Biografien/', '.htm']), self::mindatorg => self::validateNumericId($id, ['https://www.mindat.org/min-', '.html']), self::moebeltypologie => self::validateNumericId($id, ['https://term.museum-digital.de/moebel/tag/']), self::ndb_adb => self::validateGndId($id, ['https://www.deutsche-biographie.de/pnd', '.html', '#adbcontent', '#ndbcontent', '#indexcontent']),