Extend concordance lists

This commit is contained in:
2023-10-18 23:13:58 +02:00
parent e2d2c1b2d1
commit ffc5fd5992
6 changed files with 120 additions and 0 deletions

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;
}
}