Add ne concordance type for (measurement) precisions
This commit is contained in:
6 files changed
+222
-3
No files matched your search
@@ -0,0 +1,62 @@
|
||||
<?PHP
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Provides the mapping for precision values.
|
||||
*/
|
||||
final class MDConcPrecision implements MDImporterConcordanceListInterface {
|
||||
|
||||
/**
|
||||
* Throws the appropriate error in case of unmatched precision values.
|
||||
*
|
||||
* @param string $input Input string.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
private static function markMissingPrecision(string $input):bool {
|
||||
|
||||
MDImporterMissingConcordance::throw("precision", $input);
|
||||
return false; // Return default in dry-run mode
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Require a function for getting the concordance target.
|
||||
*
|
||||
* @param string $input Input string.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static function getConcordanceTarget(string $input):bool {
|
||||
|
||||
return match($input) {
|
||||
'verso bedruckt',
|
||||
'mm',
|
||||
'cm',
|
||||
'Höhe',
|
||||
'^',
|
||||
'max.',
|
||||
'min.',
|
||||
'Breite',
|
||||
'maximal',
|
||||
'Türblatt',
|
||||
'mit Verschluss',
|
||||
'mit Aufhängung',
|
||||
'max, mit Türklinke',
|
||||
'17,6',
|
||||
'11,5',
|
||||
'Maße ohne Rahmen',
|
||||
"Kassette",
|
||||
"Schöpfkelle",
|
||||
"Vorlegelöffel",
|
||||
"aufgeklappt",
|
||||
'mit Brett',
|
||||
'' => true,
|
||||
'schwer messbar, Schätzung',
|
||||
'ca',
|
||||
'ca.' => false,
|
||||
default => self::markMissingPrecision($input),
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user