Extend concordance lists
This commit is contained in:
59
src/blacklists/MDBlacklistNodaRepositories.php
Normal file
59
src/blacklists/MDBlacklistNodaRepositories.php
Normal 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;
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user