Extend concordance lists for measurement types, ownership
This commit is contained in:
@@ -14,6 +14,7 @@ final class MDConcOwnershipStatus implements MDImporterConcordanceListInterface
|
||||
private const OWNERSHIP_TYPES_VERBOSE = [
|
||||
|
||||
// 0: No known entry type
|
||||
"Eigentum" => "owned",
|
||||
"Geschenk" => "owned",
|
||||
"Besitz" => "owned",
|
||||
"Dauerleihe" => "permanent_loan",
|
||||
@@ -23,6 +24,14 @@ final class MDConcOwnershipStatus implements MDImporterConcordanceListInterface
|
||||
"Eigenleistung" => "owned",
|
||||
"Eigentum des Museums" => "owned",
|
||||
|
||||
// Permanent loans
|
||||
"Dauerleihe" => "permanent_loan",
|
||||
"Dauerleihgabe" => "permanent_loan",
|
||||
|
||||
// Loans
|
||||
"Leihe" => "borrowed",
|
||||
"Leihgabe" => "borrowed",
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -35,6 +44,9 @@ final class MDConcOwnershipStatus implements MDImporterConcordanceListInterface
|
||||
public static function getConcordanceTarget(string $input):string {
|
||||
|
||||
if (!isset(self::OWNERSHIP_TYPES_VERBOSE[$input])) {
|
||||
if (isset(self::OWNERSHIP_TYPES_VERBOSE[trim($input)])) {
|
||||
return self::OWNERSHIP_TYPES_VERBOSE[trim($input)];
|
||||
}
|
||||
throw new MDImporterMissingConcordance("Unknown ownership type: " . $input);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user