From a97557640bf96f9f01d53e0baa2c9ebf0ead94b3 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Wed, 18 Dec 2024 16:58:43 +0100 Subject: [PATCH] Extend concordance lists for measurement types, ownership --- src/MDConcMeasurementTypes.php | 59 ++++++++++++++++++++++++++++++++++ src/MDConcOwnershipStatus.php | 12 +++++++ 2 files changed, 71 insertions(+) diff --git a/src/MDConcMeasurementTypes.php b/src/MDConcMeasurementTypes.php index ecd806c..9524069 100644 --- a/src/MDConcMeasurementTypes.php +++ b/src/MDConcMeasurementTypes.php @@ -150,6 +150,11 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface "Andere", "Prefix", "Auflagekarton Standardformat", + "Bruttomass", + "Kistenmass", + "Kistenmass (Höhe)", + "Kistenmass (Tiefe)", + "Kistenmass (Breite)", "Suffix", "HxBxT", "CC", @@ -163,7 +168,10 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface "Höhe (gesamt)", "Höhe (ausgeklappt)", "height", + "Bruttomass (Höhe)", "Außenmaß (Höhe)", + "Objektmaß (Höhe)", + "Objektmass (Höhe)", "Reliefhöhe" => MDMeasurementType::height, "Länge", @@ -181,6 +189,12 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface "Tiefe (Rahmen)", "Teife", "length", + "Bruttomass (Länge)", + "Bruttomass (Tiefe)", + "Objektmaß (Länge)", + "Objektmaß (Tiefe)", + "Objektmass (Länge)", + "Objektmass (Tiefe)", "depth", "Dicke" => MDMeasurementType::length, @@ -192,6 +206,9 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface "Breite (gesamt)", "width", "Außenmaß (Breite)", + "Bruttomass (Breite)", + "Objektmaß (Breite)", + "Objektmass (Breite)", "Stärke", "Schenkelbreite (Breite)" => MDMeasurementType::width, @@ -208,6 +225,12 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface "Durchmesser Oben", "Durchmesser oben", "Durchmesser unten", + "Durchmesser (Höhe)", + "Durchmesser (Breite)", + "Durchmesser (Tiefe)", + "Durchmesser (Länge)", + "Objektmaß (Durchmesser)", + "Objektmass (Durchmesser)", "d", "Ø" => MDMeasurementType::diameter, @@ -216,11 +239,47 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface "Stärke", "Wandstärke (Durchmesser)" => MDMeasurementType::wall, + "Blattmaß (Höhe)", + "Blattmass (Höhe)" => MDMeasurementType::height_sheet_size, + + "Blattmaß (Breite)", + "Blattmass (Breite)" => MDMeasurementType::width_sheet_size, + + "Blattmaß (Länge)", + "Blattmaß (Tiefe)", + "Blattmass (Länge)", + "Blattmass (Tiefe)" => MDMeasurementType::length_sheet_size, + + "Bildmaß (Höhe)", + "Bildmass (Höhe)" => MDMeasurementType::height_image_size, + + "Bildmaß (Breite)", + "Bildmass (Breite)" => MDMeasurementType::width_image_size, + + "Bildmaß (Länge)", + "Bildmaß (Tiefe)", + "Bildmass (Länge)", + "Bildmass (Tiefe)" => MDMeasurementType::length_image_size, + + "Rahmenmaß (Höhe)", + "Rahmenmass (Höhe)" => MDMeasurementType::height_frame, + + "Rahmenmaß (Breite)", + "Rahmenmass (Breite)" => MDMeasurementType::width_frame, + + "Rahmenmaß (Länge)", + "Rahmenmaß (Tiefe)", + "Rahmenmass (Länge)", + "Rahmenmass (Tiefe)" => MDMeasurementType::length_frame, + "weight", "Gewicht" => MDMeasurementType::weight, "number of pages", "Seitenzahl", + "Seitenzahl (Höhe)", + "Seitenzahl (Breite)", + "Seitenzahl (Tiefe)", "Paginierung" => MDMeasurementType::number_of_parts, "Die Axis", diff --git a/src/MDConcOwnershipStatus.php b/src/MDConcOwnershipStatus.php index babfe02..c4af3d4 100644 --- a/src/MDConcOwnershipStatus.php +++ b/src/MDConcOwnershipStatus.php @@ -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); }