diff --git a/src/MDConcOwnershipStatus.php b/src/MDConcOwnershipStatus.php new file mode 100644 index 0000000..985da33 --- /dev/null +++ b/src/MDConcOwnershipStatus.php @@ -0,0 +1,41 @@ + + */ +declare(strict_types = 1); + +/** + * Provides lists for categorizing spelled out ownership status types. + */ +final class MDConcOwnershipStatus implements MDImporterConcordanceListInterface { + + private const OWNERSHIP_TYPES_VERBOSE = [ + + // 0: No known entry type + "Geschenk" => "owned", + "Dauerleihgabe" => "permanent_loan", + "Kauf" => "owned", + "Fund" => "owned", + "Eigenleistung" => "owned", + + ]; + + /** + * Require a function for getting the concordance target. + * + * @param string $input Input string. + * + * @return string + */ + public static function getConcordanceTarget(string $input):string { + + if (!isset(self::OWNERSHIP_TYPES_VERBOSE[$input])) { + throw new MDImporterMissingConcordance("Unknown ownership type: " . $input); + } + + return self::OWNERSHIP_TYPES_VERBOSE[$input]; + + } +}