Handle some more real-world edge cases in MDNodaRepository
This commit is contained in:
2 files changed
+9
-1
No files matched your search
@@ -817,7 +817,13 @@ public function validateId(string $id):string|false {
|
||||
self::col => self::validateColId($id),
|
||||
self::cona => self::validateNumericId($id, ['http://vocab.getty.edu/page/cona/', 'https://vocab.getty.edu/page/cona/']),
|
||||
self::editionhumboldtdigital => self::validateGndId($id, ['https://edition-humboldt.de/register/personen/detail.xql?normid=http://d-nb.info/gnd/']),
|
||||
self::gnd => self::validateGndId($id, ['http://d-nb.info/gnd/', 'https://d-nb.info/gnd/', 'https://explore.gnd.network/gnd/', 'htps://d-nb.info/gnd/', 'hjttps://d-nb.info/gnd/']),
|
||||
self::gnd => self::validateGndId($id, [
|
||||
'http://d-nb.info/gnd/',
|
||||
'https://d-nb.info/gnd/',
|
||||
'https://explore.gnd.network/gnd/',
|
||||
'htps://d-nb.info/gnd/',
|
||||
'hjttps://d-nb.info/gnd/'
|
||||
]),
|
||||
self::grobsystematik => self::validateNumericId($id, ['https://term.museum-digital.de/grobsystematik/tag/']),
|
||||
self::iconclass => self::validateIconclassId($id),
|
||||
self::klbb => self::validateNumericId($id, ['https://www.kl-bb.de/artist/', 'https://www.kl-bb.de/?page=actor&subPage=']),
|
||||
|
||||
@@ -126,6 +126,8 @@ public static function bnfIdForValidationProvider():Generator {
|
||||
public static function gndIdForValidationProvider():Generator {
|
||||
|
||||
yield "Full URL, http / 102423008" => ["102423008", "http://d-nb.info/gnd/102423008"];
|
||||
yield "Full URL, http / 120294109" => ["120294109", "http://d-nb.info/gnd/120294109"];
|
||||
yield "Full URL, http / 118847694" => ["118847694", "http://d-nb.info/gnd/118847694"];
|
||||
yield "Full URL, http / 118572636" => ["118572636", "http://d-nb.info/gnd/118572636 "];
|
||||
yield "Full URL, https / 102423008" => ["102423008", "https://d-nb.info/gnd/102423008"];
|
||||
yield "Full URL, http, superfluous spaces / 102423008" => ["102423008", "http://d-nb.info/gnd/ 102423008"];
|
||||
|
||||
Reference in new issue
Block a user