Compare commits

..

42 Commits

Author SHA1 Message Date
d8d59adb66 Fix variable comment 2025-11-13 10:28:34 +01:00
cb0684da05 Collect unmapped entries in dry-run mode
See museum-digital/importer#235
2025-11-13 00:28:24 +01:00
db3a659fa9 Extend mapping for MDConcObjectTagRelTypes 2025-11-11 18:19:19 +01:00
36803da776 Add type / value to MDImporterMissingConcordance 2025-11-11 13:27:27 +01:00
21c25ff3f3 Extend mapping for source types 2025-10-27 16:43:24 +01:00
c03a60d05a Allow public access to MDConcCertainty::MAPPING 2025-10-27 16:29:08 +01:00
000b8db862 Extend concordance list for actor roles 2025-10-27 15:45:14 +01:00
5aa2980600 Update concordance lists 2025-10-17 12:35:03 +02:00
d6a3c50e2a Merge branch 'master' of gitea:museum-digital/MDImporterConcordanceLists 2025-10-17 10:47:13 +02:00
e88a7ef43c Extend mapping in MDConcMeasurementTypes 2025-10-17 10:44:24 +02:00
a35262428e Update marking type, measurement type concordance lists 2025-10-11 12:02:33 +02:00
0fb9743328 Add marking type "handschriftlich - Beschriftung durch Hersteller*in" 2025-10-11 02:24:49 +02:00
183e4b2e08 Extend concordance lists 2025-10-07 14:25:33 +02:00
5b0da66287 Extend concordance lists 2025-10-05 11:46:30 +02:00
821a6b4e6d Extend MDConcMeasurementTypes 2025-09-30 14:47:35 +02:00
9568f58b7b Update MDConcMeasurementTypes 2025-09-30 11:38:13 +02:00
1cbf0dec8a Extend MDConcMeasurementTypes 2025-09-17 13:43:15 +02:00
da8dfe079e Extend concordance lists 2025-09-02 16:51:29 +02:00
b6b883420c Map literature type "Weiteres" 2025-09-02 13:14:48 +02:00
c63e9df9b3 Extend mappings 2025-09-02 11:54:04 +02:00
7e57ee2363 Map ownership type "Deakzessiert" 2025-09-02 11:18:46 +02:00
a0f4a2b159 Map ownership status for deaccession 2025-09-01 14:28:45 +02:00
f83b1aeb9f Update concordance lists 2025-08-14 21:45:43 +02:00
b323e10d9b Update MDConcMeasurementTypes 2025-08-14 16:22:21 +02:00
52f861c739 Map Länge (Griff) to length 2025-08-13 14:42:52 +02:00
50772ae02f Extend list of marking type concordances 2025-08-06 14:55:08 +02:00
46817aca32 Map Halsweite (Unterlage) as measurement type 2025-07-29 12:29:42 +02:00
b2a5bec110 Add marking position and two actor roles 2025-07-29 00:36:35 +02:00
e3db74e734 Extend marking position and tag relation type concordances 2025-07-25 17:25:58 +02:00
0555dcd94f Extend MDConcMarkingType 2025-07-25 01:31:39 +02:00
091f5016aa Add new concordances for height and width 2025-07-21 13:52:56 +02:00
3bb3ba4d70 Merge branch 'master' of gitea:museum-digital/MDImporterConcordanceLists 2025-07-18 13:05:14 +02:00
c2a433588f Extend concordance list 2025-07-18 13:03:30 +02:00
399f345888 Extend mappings for currencies and entry types 2025-07-15 10:39:02 +02:00
1d85ab3921 Map new sizes for blades 2025-07-14 17:17:51 +02:00
5796322692 Map concordance for license statement "Keine Verwendung erlaubt" 2025-07-11 21:08:08 +02:00
f9c94926c8 Extend MDConcMeasurementTypes 2025-07-09 14:46:56 +02:00
1635d4130a Add exception mode to redirect from object-tag relation type to
object-event relation (generic, e.g. if the tag is actually a time)
2025-06-26 14:34:18 +02:00
b7330634d7 Extend marking types list 2025-06-26 01:22:14 +02:00
a7ed284c26 Extend MDConcEntryTypes 2025-06-23 16:20:32 +02:00
d28e70d6c1 Merge pull request 'src/MDConcMarkingType.php aktualisiert' (#16) from ufladerer-patch-1 into master
Reviewed-on: #16
2025-06-12 17:20:48 +02:00
ca7ca028d2 src/MDConcMarkingType.php aktualisiert 2025-06-12 09:45:07 +02:00
26 changed files with 750 additions and 39 deletions

View File

@@ -5,6 +5,55 @@ declare(strict_types = 1);
* Exception thrown in case an update failed.
*/
final class MDImporterMissingConcordance extends Exception {
public string $target_type;
public string $value_to_map;
/** @var array<string, array<string>> */
private static array $_missing_concordances = [];
/**
* Sets up an error.
*
* @param string $target_type Target type (e.g. "measurements").
* @param string $value_to_map Value to map.
*
* @return void
*/
public static function throw(string $target_type, string $value_to_map):void {
if (class_exists("MD_IMPORTER_CONF") && MD_IMPORTER_CONF::$dry_run === true) {
if (empty(self::$_missing_concordances)) {
// Register printing at the end
register_shutdown_function(function() {
echo PHP_EOL . PHP_EOL . "There are unmapped concordances. Please map them before proceeding." . PHP_EOL . "You may use https://concordance.museum-digital.org/ to do the mapping" . PHP_EOL . PHP_EOL;
foreach (self::$_missing_concordances as $key => $values) {
sort($values);
echo PHP_EOL . PHP_EOL . $key . PHP_EOL . PHP_EOL;
echo implode(PHP_EOL, array_unique($values));
}
});
}
if (!isset(self::$_missing_concordances[$target_type])) {
self::$_missing_concordances[$target_type] = [];
}
self::$_missing_concordances[$target_type][] = $value_to_map;
return;
}
$exception = new MDImporterMissingConcordance("Unmapped specific value of type " . $target_type . ": " . $value_to_map);
$exception->target_type = $target_type;
$exception->value_to_map = $value_to_map;
throw $exception;
}
/**
* Error message.
*

View File

@@ -0,0 +1,9 @@
<?PHP
declare(strict_types = 1);
/**
* Exception thrown in case a name entered for the relation between tag
* and object is actually an event type.
*/
final class MDImporterTagRelationTypeIsEventType extends Exception {
}

View File

@@ -32,6 +32,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Ausstellung von Bezugsscheinen" => 1,
"Bearbeiter" => 1,
"Bearbeiterin" => 1,
"Konstruktion" => 1,
"Bearbeiter*in" => 1,
"Bearbeitende" => 1,
"Bindung" => 1,
@@ -55,6 +56,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Creator" => 1,
"creator" => 1,
"deutscher Baumeister, Ingenieur, Holzschneider, Kupferstecher, Zeichner, Topograph und Militärschrif" => 1,
"Drechsler" => 1,
"Elfenbeindrechsler" => 1,
"Elfenbeindrechslerin" => 1,
"Elfenbeindrechsler*in" => 1,
@@ -62,6 +64,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Elfenbeinschnitzerin" => 1,
"Elfenbeinschnitzer*in" => 1,
"Elfenbeinschnitzerei" => 1,
"Emailleur" => 1,
"Entwurf und Ausführung" => 1,
"Fabrik" => 1,
"Fayencemanufaktur" => 1,
@@ -135,6 +138,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Interviewer" => 1,
"Interviewerin" => 1,
"Interviewer*in" => 1,
"Juwelier" => 1,
"Juwelier und Uhrmacher" => 1,
"Katograf" => 1,
"Keramiker" => 1,
@@ -192,6 +196,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Papiermacherin" => 1,
"Papiermacher*in" => 1,
'Papierverarbeitungswerk' => 1, // created by
'Plattner' => 1, // created by
"Porzellanhersteller" => 1,
"Porzellanherstellerin" => 1,
"Porzellanhersteller*in" => 1,
@@ -215,15 +220,18 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Regisseuer*in" => 1,
"Reparatur" => 1,
"Reproduktion" => 1,
"Schäfter" => 1,
"Scherenschneider" => 1,
"Scherenschneiderin" => 1,
"Scherenschneider*in" => 1,
"Schlossschmied" => 1,
"Schneider" => 1,
"Schneiderin" => 1,
"Schneider*in" => 1,
"Schnitzer" => 1,
"Schnitzerin" => 1,
"Schnitzer*in" => 1,
"Seidensticker" => 1,
"Silberschmied" => 1,
"Silberschmiedin" => 1,
"Silberschmied*in" => 1,
@@ -238,6 +246,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Steinbildhauer*in" => 1,
"Steinmetz" => 1,
"Steinmetzin" => 1,
"Steinschneider" => 1,
"Steinmetz*in" => 1,
"Steingutfabrik" => 1,
"Stempelschneider" => 1,
@@ -350,6 +359,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Datsrellung" => 5,
"Dastellung" => 5,
"Dartsellung" => 5,
"Dargestellte Person" => 5,
"dargestellt" => 5,
"Dargestellt" => 5,
"Dargestellte Personen" => 5,
@@ -553,6 +563,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
// 11: Received
"Adressat" => 11,
'Adressat/in' => 11, // received by
"Beschenkter" => 11,
"Beschenkte Person" => 11,
"Beschenkte Person (Geburtstag)" => 11,
"Beschenkte Person (Hochzeitstag)" => 11,
@@ -645,6 +656,7 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Zeichnerin" => 19,
"Zeichner*in" => 19,
'Zeichner/in' => 19, // drawn by
'Zeichnung' => 19, // drawn by
"Zeichner / Inventor" => 19,
"Zeichner, Autor der Dekoration" => 19,
"Zeichner und Grafiker" => 19,
@@ -661,6 +673,8 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
"Zeichner u. Stecher" => 19,
// 20: Copied
"Abgeschrieben" => 20,
"Kopist" => 20,
"Übersetzer" => 20,
"Übersetzerin" => 20,
"Übersetzer*in" => 20,
@@ -1264,7 +1278,8 @@ final class MDConcActor implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):int {
if (!isset(self::ACTOR_ROLES_TO_EVENT_TYPE[$input])) {
throw new MDImporterMissingConcordance("Unknown actor role: " . $input);
MDImporterMissingConcordance::throw("actor role", $input);
return 1; // Return default in dry-run mode
}
return self::ACTOR_ROLES_TO_EVENT_TYPE[$input];

View File

@@ -11,22 +11,24 @@ declare(strict_types = 1);
*/
final class MDConcCertainty implements MDImporterConcordanceListInterface {
private const MAPPING = [
// Public for access in concordance.museum-digital.org
public const MAPPING = [
// Uncertain
'fraglich' => false,
'nach' => false,
'Umkreis von' => false,
'möglicherweise von' => false,
'alternative Zuschreibung' => false,
'Art des' => false,
'Atelier von' => false,
'ehemals zugeschrieben' => false,
'fraglich' => false,
'möglicherweise von' => false,
'nach' => false,
'nach Literatur UND alternativ' => false,
'Stil des' => false,
'Schule von' => false,
'Schule des' => false,
'traditionelle Zuschreibung' => false,
'Umkreis von' => false,
'Werkstatt von' => false,
'zugeschriebe' => false,
'zugeschrieben' => false,
@@ -35,6 +37,8 @@ final class MDConcCertainty implements MDImporterConcordanceListInterface {
// Certain
'sicher' => true,
'gesichert' => true,
'nach Passepartoutnotiz' => true,
'Zusammenarbeit mit' => true,
'überarbeitet von' => true,
'Nachfolger von' => true,
@@ -52,7 +56,8 @@ final class MDConcCertainty implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):bool {
if (!isset(self::MAPPING[$input])) {
throw new MDImporterMissingConcordance("Unknown certainty identifier: " . $input);
MDImporterMissingConcordance::throw("certainty identifier", $input);
return true; // Return default in dry-run mode
}
return self::MAPPING[$input];

View File

@@ -25,7 +25,8 @@ final class MDConcCheckTypes implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):MDObjectCheckType {
if (!isset(self::CHECK_TYPES[$input])) {
throw new MDImporterMissingConcordance("Unknown check type: " . $input);
MDImporterMissingConcordance::throw("check", $input);
return MDObjectCheckType::completeness_check; // Return default in dry-run mode
}
return self::CHECK_TYPES[$input];

View File

@@ -45,7 +45,8 @@ final class MDConcCloserLocationTypes implements MDImporterConcordanceListInterf
public static function getConcordanceTarget(string $input):string {
if (!isset(self::LOCATION_TYPES_VERBOSE[$input])) {
throw new MDImporterMissingConcordance("Unknown location type: " . $input);
MDImporterMissingConcordance::throw("location", $input);
return "3"; // Return default in dry-run mode
}
return self::LOCATION_TYPES_VERBOSE[$input];

View File

@@ -26,7 +26,8 @@ final class MDConcColors implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):string {
if (!isset(self::COLORS_LIST[$input])) {
throw new MDImporterMissingConcordance("Unknown color: " . $input);
MDImporterMissingConcordance::throw("color", $input);
return "black"; // Return default in dry-run mode
}
return self::COLORS_LIST[$input];

View File

@@ -24,7 +24,13 @@ final class MDConcCurrencies implements MDImporterConcordanceListInterface {
"23.117,55" => "",
"15.01.1900" => "",
"Belarussischer Rubel" => 'by-BYN',
// Schweizer Franken / Swiss Franc
"SFR" => "ch-CHF",
"CHF" => "ch-CHF",
"Swiss franc" => "ch-CHF",
// Deutsche Mark
"DM" => "de-DM",
"dM" => "de-DM",
"Dm" => "de-DM",
@@ -35,10 +41,17 @@ final class MDConcCurrencies implements MDImporterConcordanceListInterface {
"Mark" => "de-DM",
"de-DM" => "de-DM",
"Deutsche Mark" => "de-DM",
// Reichsmark (Deutschland)
"RM" => "de-RM",
"Reichsmark" => "de-RM",
"Reichsmark (Deutsches Reich)" => "de-RM",
"Reichsmark (Deutsches Reich" => "de-RM",
// Franc (France)
"French Franc" => "fr-FF",
// Forint
"Forint" => "hu-Ft",
"FT" => "hu-Ft",
"Korona" => "hu-Korona",
@@ -86,7 +99,8 @@ final class MDConcCurrencies implements MDImporterConcordanceListInterface {
if (in_array($input, MDCurrenciesSet::CURRENCIES, true)) {
return $input;
}
throw new MDImporterMissingConcordance("Unknown currency: " . $input);
MDImporterMissingConcordance::throw("currency", $input);
return "eu-EUR"; // Return default in dry-run mode
}
return self::CURRENCIES_LIST[$input];

View File

@@ -37,7 +37,8 @@ final class MDConcDamageTypes implements MDImporterConcordanceListInterface {
throw new MDImporterBlacklistedConcordanceTerm("Invalid damage type: " . $input);
}
throw new MDImporterMissingConcordance("Unknown damage type: " . $input);
MDImporterMissingConcordance::throw("damage", $input);
return MDObjectDamageType::desiccation; // Return default in dry-run mode
}
return self::DAMAGE_TYPES[$input];

View File

@@ -195,6 +195,7 @@ final class MDConcEntryTypes implements MDImporterConcordanceListInterface {
"Excavation" => "3",
"Feltárás" => "3",
"Grabung" => "3",
"Grabungsfund" => "3",
"Grabungsfund Arch. Landesamt" => "3",
"Bergung" => "3",
@@ -303,6 +304,8 @@ final class MDConcEntryTypes implements MDImporterConcordanceListInterface {
"Dauerausleihe" => "16",
"Dauerleihgabe von Privat" => "16",
"Letét" => "16",
"Permanent loan" => "16",
"permanent loan" => "16",
"Tartós leltét" => "16",
// 98: Old belongings
@@ -335,6 +338,7 @@ final class MDConcEntryTypes implements MDImporterConcordanceListInterface {
"Global" => "99",
"Zurückgegeben" => "99",
"Übernahme" => "99",
"Übernahme 1986" => "99",
"Übernahme von Betrieb" => "99",
"Teilbetrag" => "99",
"mitgenommen" => "99",
@@ -343,6 +347,8 @@ final class MDConcEntryTypes implements MDImporterConcordanceListInterface {
"unbekant" => "99",
"Ünernahme" => "99",
"Übergabe" => "99",
"Unbezeichnet" => "99",
"unbezeichnet" => "99",
"Übergabe abgeschr.B. DHM" => "99",
"gyűjtés" => "99",
"sch" => "99",
@@ -370,7 +376,8 @@ final class MDConcEntryTypes implements MDImporterConcordanceListInterface {
return self::ENTRY_TYPES_VERBOSE[$inputTrimmed];
}
throw new MDImporterMissingConcordance("Unknown entry type: " . $input);
MDImporterMissingConcordance::throw("entry (to museum)", $input);
return "99"; // Return default in dry-run mode
}
}

View File

@@ -64,6 +64,7 @@ vermuteter Herstellungsort' => 1,
'vermuteter Herstellungsort Fassung' => 1,
'Kupferstecher' => 1,
'Herstellungsort Fassung' => 1,
'Herstellungsort Hose' => 1,
'Herstellungsort Münze' => 1,
'Herstellung oder Vertrieb' => 1,
'Herstellung zugeschrieben' => 1,
@@ -396,7 +397,8 @@ vermuteter Herstellungsort' => 1,
public static function getConcordanceTarget(string $input):int {
if (!isset(self::EVENT_TYPE_NAMES_TO_ID[$input])) {
throw new MDImporterMissingConcordance("Unknown event type: '" . $input . "'");
MDImporterMissingConcordance::throw("event", $input);
return 1; // Return default in dry-run mode
}
return self::EVENT_TYPE_NAMES_TO_ID[$input];

View File

@@ -28,7 +28,7 @@ enum MDConcFieldRelatedWorksType {
*/
public static function fromString(string $input):MDConcFieldRelatedWorksType {
return match($input) {
$output = match($input) {
"Dokumentiert in",
"dokumentiert in",
@@ -170,6 +170,10 @@ enum MDConcFieldRelatedWorksType {
'hat Bezug zu',
'Abzug',
'weiterer Abzug',
"Teil desselben Werkprozesses",
"part of the same work process",
"ist Abzug von Druckform",
"hat physischen Teil",
'exemplifies',
'bezogen auf',
'http://terminology.lido-schema.org/lido00263',
@@ -195,8 +199,15 @@ enum MDConcFieldRelatedWorksType {
"" => self::undefined,
default => throw new MDpageParameterNotFromListException("Unknown target field for related works type: " . $input),
default => null,
};
if ($output === null) {
MDImporterMissingConcordance::throw("related work type", $input);
return self::undefined; // Return default in dry-run mode
}
return $output;
}
}

View File

@@ -86,7 +86,8 @@ final class MDConcLanguages implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):string {
if (!isset(self::LANGUAGES_LIST[$input])) {
throw new MDImporterMissingConcordance("Unknown language type: " . $input);
MDImporterMissingConcordance::throw("language", $input);
return "de"; // Return default in dry-run mode
}
return self::LANGUAGES_LIST[$input];

View File

@@ -139,6 +139,7 @@ final class MDConcLicenses implements MDImporterConcordanceListInterface {
"http://www.europeana.eu/rights/rr-r/" => "RR-R",
"https://www.europeana.eu/rights/rr-r/" => "RR-R",
"Keine Verwendung erlaubt" => "RR-R",
'PDM' => 'Public Domain Mark',
'Public Domain Mark 1.0' => 'Public Domain Mark',
@@ -162,7 +163,8 @@ final class MDConcLicenses implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):string {
if (!isset(self::LICENSES_LIST[$input])) {
throw new MDImporterMissingConcordance("Unknown licence type: " . $input);
MDImporterMissingConcordance::throw("licence", $input);
return "RR-F"; // Return default in dry-run mode
}
return self::LICENSES_LIST[$input];

View File

@@ -31,7 +31,8 @@ final class MDConcLoanTypes implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):string {
if (!isset(self::LOAN_TYPES[$input])) {
throw new MDImporterMissingConcordance("Unknown loan type: " . $input);
MDImporterMissingConcordance::throw("loan", $input);
return "outgoing"; // Return default in dry-run mode
}
return self::LOAN_TYPES[$input];

View File

@@ -20,8 +20,10 @@ final class MDConcMarkingPosition implements MDImporterConcordanceListInterface
"Vorderseite, mittig" => "center",
"beidseitig mittig" => "center",
"untere Passpartoutkante, mittig" => "center",
"Mitte" => "center",
"vorn am Kasten, mittig, einseitig" => "center",
"an Gehäuse mittig" => "center",
'mitte' => 'center', // Center
// Left
"Links" => "left",
@@ -34,6 +36,7 @@ final class MDConcMarkingPosition implements MDImporterConcordanceListInterface
"Waagebalken links" => "left",
"Vorderseite links (Brusthöhe)" => "left",
"an Skala links und am Gehäuse Fronseite" => "left",
'mitte links' => 'left', // Left
// Right
"mittig rechts" => "right",
@@ -42,18 +45,24 @@ final class MDConcMarkingPosition implements MDImporterConcordanceListInterface
"rechts neben Bildnis" => "right",
"Rechter Bildrand" => "right",
"Balken rechts" => "right",
'Mitte rechts' => 'right', // Right
// Bottom
"unten" => "bottom",
'Mitte unten' => 'bottom', // Bottom
'unten links u. rechts' => 'bottom', // Bottom
'unten rechts/links' => 'bottom', // Bottom
"unter der Zeichnung" => "bottom",
"unter der Bild" => "bottom",
"unterer Bildrand" => "bottom",
"Unterer Bildrand" => "bottom",
"unterer Bildrand, mittig" => "bottom",
"unten mitte" => "bottom",
"Unterkante Bild" => "bottom",
"Boden, unten" => "bottom",
"unterer Blattrand" => "bottom",
"Boden" => "bottom",
"Bodenmarke" => "bottom",
"Boden und Standring" => "bottom",
"untere Passpartoutkante und untere linke Ecke auf Foto" => "bottom",
"Unterboden" => "bottom",
@@ -89,6 +98,7 @@ final class MDConcMarkingPosition implements MDImporterConcordanceListInterface
// Bottom right
"im Bild unten rechts" => "bottom_right",
"rechts unten Signatur" => "bottom_right",
"verso unten rechts" => "bottom_right",
"unterer Bildrand rechts" => "bottom_right",
"Bildrand rechts unten" => "bottom_right",
"Rechts unten" => "bottom_right",
@@ -162,6 +172,7 @@ final class MDConcMarkingPosition implements MDImporterConcordanceListInterface
"Rückseite Keilrahmen" => "rear_side",
"Rükseite" => "rear_side",
"Rückseite, unter Doublierung" => "rear_side",
'verso' => 'rear_side', // Rear side
// rear_bottom
"Rückseite unten" => "rear_bottom",
@@ -275,6 +286,8 @@ final class MDConcMarkingPosition implements MDImporterConcordanceListInterface
"auf Skala" => "other",
"Vorderseite Eisengestell" => "other",
"Außenwand" => "other",
"Wandung" => "other",
"Ansichtsseite" => "other",
"Aufkleber" => "other",
"unter Ausgußtülle" => "other",
"Glasaußenseite" => "other",
@@ -421,11 +434,17 @@ final class MDConcMarkingPosition implements MDImporterConcordanceListInterface
"Waage" => "other",
"Weiteres" => "other",
"auf Kunststoffhülle (für Kleinbildfilmstreifen)" => "other",
"Signatur" => "other",
"Legende" => "other",
"Schriftband" => "other",
"Textplatte" => "other",
"oberer Holzkasten" => "other",
"Verso" => "other",
"In Bild Beschriftung" => "other",
"Bauch" => "other",
"Avers" => "other",
"Text" => "other",
"auf dem Original-Fotobox" => "other",
];
/**
@@ -438,7 +457,8 @@ final class MDConcMarkingPosition implements MDImporterConcordanceListInterface
public static function getConcordanceTarget(string $input):string {
if (!isset(self::MARKING_POSITIONS_VERBOSE[$input])) {
throw new MDImporterMissingConcordance("Unknown marking position: " . $input);
MDImporterMissingConcordance::throw("marking position", $input);
return "other"; // Return default in dry-run mode
}
return self::MARKING_POSITIONS_VERBOSE[$input];

View File

@@ -16,6 +16,7 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
// Default: Handwritten
"-" => "handwritten",
"x" => "handwritten",
'Handschriftlich mit Bleistift - Signatur' => 'handwritten', // Handwritten
"schwarz" => "handwritten",
"braun" => "handwritten",
"Leinenarbeit" => "handwritten",
@@ -32,7 +33,11 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"rot gemasert" => "handwritten",
"ornamentiert" => "handwritten",
"handschriftlich; aufgeklebt" => "handwritten",
"handschriftlich mit Bleistift" => "handwritten",
"mit schwarzer Kreide" => "handwritten",
"mit schwarzer Kreide - Signatur" => "handwritten",
"Beschriftung auf Plakette (handschriftlich)" => "handwritten",
"handschriftlich - Beschriftung durch Hersteller*in" => "handwritten",
"Beschriftung" => "handwritten",
"Beschriftung (handschriftlich)" => "handwritten",
"Beschriftung (spiegelverkehrt und gedreht)" => "handwritten",
@@ -45,12 +50,33 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"Titel (handschriftlich)" => "handwritten",
"Widmung (handschriftlich)" => "handwritten",
"Text" => "handwritten",
"im Stein" => "handwritten",
"im Stein - Beschriftung" => "handwritten",
# Handwriting
"aufgemalt/geschrieben" => "handwritten",
"Aufschrift" => "handwritten",
"Aufschrift (Bleistift)" => "handwritten",
'handschirftlich - Handschrift' => 'handwritten', // Handwritten
'handschirftlich mit Bleistift - Signatur' => 'handwritten', // Handwritten
'handschriflich mit Bleistift - Handschrift' => 'handwritten', // Handwritten
'handschriflich mit Bleistift - Signatur' => 'handwritten', // Handwritten
'handschrifltich mit Bleistift - Signatur' => 'handwritten', // Handwritten
'handschriftich mit Bleistift - Signatur' => 'handwritten', // Handwritten
'handschriftlich - Handschrift' => 'handwritten', // Handwritten
'handschriftlich mit Bleisift - Signatur' => 'handwritten', // Handwritten
'handschriftlich mit Bleistift - Beschriftung' => 'handwritten', // Handwritten
'handschriftlich mit Bleistift - Handschrift' => 'handwritten', // Handwritten
'handschriftlich mit Feder - Signatur' => 'handwritten', // Handwritten
'handschriftlich mit Kohle - Signatur' => 'handwritten', // Handwritten
'handschriftlich mit Kugelschreiber - Handschrift' => 'handwritten', // Handwritten
'handschriftlich mit schwarzer Kreide - Signatur' => 'handwritten', // Handwritten
'handschriftliche Dedikation - Handschrift' => 'handwritten', // Handwritten
'handschriftllich mit Bleistift - Handschrift' => 'handwritten', // Handwritten
'handschriftllich mit Bleistift - Signatur' => 'handwritten', // Handwritten
'hanschriftlich mit Bleistift - Signatur' => 'handwritten', // Handwritten
'marking' => 'handwritten', // Handwritten
"Aufschrift mit Tinte" => "handwritten",
"Beischrift" => "handwritten",
"Benennung" => "handwritten",
@@ -98,7 +124,6 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"geschrieben (schwarzer Filzstift)" => "handwritten",
"geschrieben mit schwarzer Ölfarbe" => "handwritten",
"geschrieben mit schwarzer Farbe" => "handwritten",
"Künstlersignatur" => "handwritten",
"Kugelschreiber,Bleistift" => "handwritten",
"Kugelschreiber" => "handwritten",
"Kulibeschriftung auf der Rückseite" => "handwritten",
@@ -128,7 +153,7 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"signiert und datiert" => "handwritten",
"Signiert" => "handwritten",
"signiert, mit Bleistift geschrieben" => "handwritten",
"Signatur mit Kugelschreiber" => "handwritten",
"handschriftlich mit Bleistift - Marke" => "handwritten",
"signiert, mit blauer Tinte geschrieben" => "handwritten",
"signiert, mit schwarzer Tinte geschrieben" => "handwritten",
"Tinte" => "handwritten",
@@ -145,7 +170,6 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
# Scratchings
"Beschriftung (geritzt)" => "scratch",
"Signatur (geritzt)" => "scratch",
"kratzen, Filzstift" => "scratch",
"gekratzt" => "scratch",
"eingeritztes Kreuzchen" => "scratch",
@@ -159,6 +183,7 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"Bemalung" => "painted",
"bemalt" => "painted",
"gemalt" => "painted",
"Gemalt" => "painted",
"signiert, gemalt" => "painted",
"Wappen (gemalt)" => "painted",
@@ -180,6 +205,7 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"Etikett" => "glued", // This whole value doesn't make sense
"Etiketten" => "glued",
"etikettiert" => "glued",
"schriftlich - Aufkleber" => "glued",
"Adressaufkleber des Voreigentümers" => "glued",
"Klebezettel (maschienengeschrieben)" => "glued",
@@ -224,9 +250,16 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"Druck, weiße Schrift" => "overprint",
"gedruckt und geprägt" => "overprint",
"gdruckt" => "overprint",
'gedruckt - Inschrift' => 'overprint', // Overprint
'gedruckt - Signatur' => 'overprint', // Overprint
'gedruckt - Stempel' => 'overprint', // Overprint
'gedruckt im Stein - Beschriftung' => 'overprint', // Overprint
'gedruckt im Stein - Inschrift' => 'overprint', // Overprint
'gedruckt im Stein - Signatur' => 'overprint', // Overprint
"gerduckt" => "overprint",
"goldener Druck mit Ornamenten und Zierrahmen" => "overprint",
"Golddruck" => "overprint",
"Titel mit Signatur (gedruckt)" => "overprint",
"Bechriftung (gedruckt)" => "overprint",
"Seriennummer" => "overprint",
"Textaufdruck" => "overprint",
@@ -245,6 +278,7 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"schwarzer Aufdruck" => "overprint",
"schwwarzer Aufdruck" => "overprint",
"geplottert" => "overprint",
"gedruckt - Beschriftung" => "overprint",
"gedruckt und eingeschoben" => "overprint",
"gedruckt und eingeschoben, kursiv" => "overprint",
"Druckerei-Vermerk" => "overprint",
@@ -253,7 +287,6 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"Beschriftung auf Rückseitenschutz (gedruckt)" => "overprint",
"Beschriftung auf Schmuckrahmen (gedruckt)" => "overprint",
"Datierung (gedruckt)" => "overprint",
"Signatur mit Datum (gedruckt)" => "overprint",
"Titel (gedruckt)" => "overprint",
"Wappen (gedruckt)" => "overprint",
"Widmung (gedruckt)" => "overprint",
@@ -292,11 +325,15 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"schwarz gestempelt" => "stamp",
"Signaturenstempel" => "stamp",
"stamped" => "stamp",
'gestemnpelt - Stempel' => 'stamp', // Stamped
'gestempelt - Signatur' => 'stamp', // Stamped
'gestempelt - Stempel' => 'stamp', // Stamped
"Stempel" => "stamp",
"Stempel (rund)" => "stamp",
"Stempel,Kugelschreiber" => "stamp",
"Stempel eingeprägt" => "stamp",
"Stempelaufdruck" => "stamp",
'Signatur gestempelt - Signatur' => 'stamp', // Stamped
"Beschriftung (gestempelt)" => "stamp",
"Beschriftung auf Montierung (gestempelt)" => "stamp",
@@ -392,6 +429,14 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"eingeritzt" => "scarified",
"handschliff" => "scarified",
"Schliff" => "scarified",
'Signatur geritzt - Signatur' => 'scarified', // Scarified
'Signatur geritzt in der Platte - Signatur' => 'scarified', // Scarified
'geritzt - Beschriftung' => 'scarified', // Scarified
'geritzt - Inschrift' => 'scarified', // Scarified
'geritzt - Marke' => 'scarified', // Scarified
'geritzt - Signatur' => 'scarified', // Scarified
'geritzt in der Platte - Beschriftung' => 'scarified', // Scarified
'geritzt in der Platte - Signatur' => 'scarified', // Scarified
# Hallmarked
"gepunzt" => "hallmarked",
@@ -409,19 +454,38 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
"Signatur" => "signature",
"signiert" => "signature",
"farbig bemalt und glasiert" => "signature",
'geruckt - Signatur' => 'signature', // Signature
"gemalt und glasiert" => "signature",
'Signatur gedruckt im Stein - Signatur' => 'signature', // Signature
"Signatur (handschriftlich)" => "signature",
"Signatur (gedruckt)" => "signature",
"Signatur (gemalt)" => "signature",
"Signatur (gezeichnet)" => "signature",
"Gez. u. gest. v. F. Foltz in Darmstadt., Andernach." => "signature",
"Signatur mit Datierung (handschriftlich)" => "signature",
"Signatur mit Datierung (gedruckt)" => "signature",
"Signatur mit Datierung (gemalt)" => "signature",
"Signatur mit Datierung (gestempelt)" => "signature",
"Signatur mit Datierung (gezeichnet)" => "signature",
"Signatur mit Datum (handschriftlich)" => "signature",
"Signatur mit Datum (gedruckt)" => "signature",
"Signatur mit Datum (gemalt)" => "signature",
"Signatur mit Datum (gestempelt)" => "signature",
"Signatur mit Datum (gezeichnet)" => "signature",
'signatur im Holzstock - Signatur' => 'signature', // Signature
'signatur im Stein - Signatur' => 'signature', // Signature
"Künstlersignatur" => "signature",
"Signatur (geritzt)" => "signature",
"Signatur mit Kugelschreiber" => "signature",
"handschriftlich mit Bleistift - Signatur" => "signature",
"im Stein - Signatur" => "signature",
'Signatur im Holzstock - Signatur' => "signature",
'Signatur im Stein - Signatur' => "signature",
'Signatur in der Platte - Signatur' => "signature",
# Watermark
"Wasserzeichen" => "watermark",
'Wasserzeichen - Wasserzeichen' => 'watermark', // Watermark
];
@@ -435,7 +499,8 @@ final class MDConcMarkingType implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):string {
if (!isset(self::MARKING_TYPES_VERBOSE[$input])) {
throw new MDImporterMissingConcordance("Unknown marking type: " . $input);
MDImporterMissingConcordance::throw("marking", $input);
return "marking"; // Return default in dry-run mode
}
return self::MARKING_TYPES_VERBOSE[$input];

View File

@@ -19,7 +19,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
*/
public static function getConcordanceTarget(string $input):MDMeasurementType|false {
return match($input) {
$output = match($input) {
// Just list entries
"Allgemein",
@@ -64,6 +64,10 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"base",
"target",
"Modell",
"Rundformat",
"Quadratisch",
"Bauch",
"Oval",
"",
"Plattengröße (Höhe x Breite)",
"Sockel (Höhe x Tiefe x Breite)",
@@ -100,9 +104,12 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Bemalte Bildfläche (Höhe x Breite)",
"Plattengröße (Foto)",
"Andere Maße",
"Halsweite (Unterlage)",
"Format",
"Stichhöhe",
"Maße Transport",
"Querformat",
"Hochformat",
"Länge x Breite x Höhe",
"Länge x Breite x Tiefe",
"Länge x Breite",
@@ -158,6 +165,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Kistenmass",
"Kistenmass (Höhe)",
"Lichtmass",
"Randdurchmesser",
"Kistenmass (Tiefe)",
"Kistenmass (Breite)",
"Suffix",
@@ -166,6 +174,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"CC",
"Eisen",
"mm",
"Bauchdurchmesser",
"Größe",
"CdV",
"Stichhöhe (Höhe x Breite)" => false,
@@ -174,19 +183,77 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"(Höhe)",
" (Höhe)",
"Höhe (gesamt)",
"Höhe (Gesamtmaß)",
"Höhe (Objekt)",
"Höhe (Etui)",
"Höhe (Heft)",
"Höhe (Foto)",
"Höhe (Dose)",
"Höhe (netto)",
"Höhe (a mit b-d)",
"Höhe (e)",
"Höhe (S 6289/5a)",
"Höhe (S 6289/5b)",
"Höhe (S 6291/3)",
"Höhe (S 6291/4)",
"Höhe (S 6291/5)",
"Höhe (S 6291/6)",
"Höhe (S 6295/3)",
"Höhe (S 6295/4)",
"Höhe (S 6295/5)",
"Höhe (S 6316/1)",
"Höhe (S 6316/2)",
"Höhe (S 6316/3)",
"Höhe (S 6316/4)",
"Höhe (S 6316/5)",
"Höhe (S 6418a)",
"Höhe (aufgeklappt)",
"Höhe (S 6419a)",
"Höhe (a)",
"Höhe (a mit b)",
"Höhe (S 6519/1)",
"Höhe (S 6530/1)",
"Höhe (S 6542/1)",
"Höhe (S 6549/1-3)",
"Höhe (S 6552/1-5)",
"Höhe (je Band)",
"Höhe (ohne Schnur)",
"Höhe (S 6560/1a-c =)",
"Höhe (S 6561/10 = größter)",
"Höhe (S 6561/13, andere)",
"Höhe (S 6561/18,)",
"Höhe (Nadel auf Papier)",
"Höhe (Hose in Ver-)",
"Höhe (einzelnes Tütchen)",
"Höhe (1)",
"Höhe (a-c)",
"Höhe (Kanne)",
"Höhe (S 6832/1)",
"Höhe (a und b)",
"Höhe (je Bild)",
"Höhe (S 6844/1)",
"Höhe (S 6844/2)",
"Höhe (je Liste)",
"Höhe (je Plan außer 3b)",
"Höhe (Platte in Hülle)",
"Höhe (S 6852/1)",
"Höhe (Druckstock)",
"Höhe (Blatt/Platte)",
"Höhe (ausgeklappt)",
"Höhe (Velinpapier)",
"Höhe (Chinapapier)",
"Höhe (Blindplatte)",
"Höhe größtes Stück",
"height",
"height (overall)",
"Höhe (Trägermaterial)",
"Lichtmass (Höhe)",
"Bruttomass (Höhe)",
"Kartierung (Höhe)",
"Masstab (Höhe)",
"Sitzhöhe (Höhe)",
"Höhe (Platte)",
'Höhe (Untersatzkarton)',
"Außenmaß (Höhe)",
"Objektmaß (Höhe)",
"Objektmass (Höhe)",
@@ -195,6 +262,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
'Höhe (Buchblock)',
'Höhe (Buchblock ohne Einband)',
'Höhe (Buchblock mit Einband)',
'Höhe (Darstellung ohne Schrift)',
'Höhe (Stein)',
'Höhe (Schuber)',
'Höhe (Karton)',
@@ -225,11 +293,143 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
'Höhe (Einleger 22)',
'Höhe (Einleger 23)',
'Höhe (Einleger 24)',
"Höhe (S 6530/2)",
"Höhe (S 6542/2)",
"Höhe (S 6549/4-5)",
"Höhe (S 6552/6)",
"Höhe (S 6832/2)",
"Höhe (S 6845/3b)",
"Höhe (S 6852/2a-b)",
"Höhe (S 6877/3)",
"Höhe (S 6914/2)",
"Höhe (S 6931/2)",
"Höhe (S 6941/2)",
"Höhe (S 6962/7)",
"Höhe (S 7083/2)",
"Höhe (S 7135/1b)",
"Höhe (5)",
"Höhe (S 6561/11)",
"Höhe (S 6542/5)",
"Höhe (S 7135/3)",
"Höhe (S 7141/2)",
"Höhe (Springerle in Tüte)",
"Höhe (b)",
"Höhe (e und f)",
"Höhe (eine Glühbirne)",
"Höhe (gesamter Stapel)",
"Höhe (gesamter Stapel)[67/4521]",
"Höhe (S 6877/1 u. 2)",
"Höhe (je Album)",
"Höhe (1)",
"Höhe (Griff, beide Hälften)",
"Höhe (1)",
"Höhe (S 6914/1)",
"Höhe (gesamter Bogen)",
"Höhe (Springerle)",
"Höhe (S 6931/1)",
"Höhe (S 6941/1)",
"Höhe (S 6962/1-6, je)",
"Höhe (a mit b)",
"Höhe (je Ziegel)",
"Höhe (S 6519/7)",
"Höhe (S 6519/8)",
"Höhe (S 6519/9)",
"Höhe (1-4)",
"Höhe (je)",
"Höhe (Tafel)",
"Höhe (Plakette)",
"Höhe (a)",
"Höhe (Insgesamt)",
"Höhe (S 7083/1)",
"Höhe (Stich ohne Rahmen)",
"Höhe (pro Plombe)",
"Höhe (3)",
"Höhe (3-4)",
"Höhe (Haube)",
"Höhe (S 6519/4)",
"Höhe (S 6542/4)",
"Höhe (S 7135/2)",
"Höhe (d)",
"Höhe (a-b)",
"Höhe (1)",
"Höhe (1)",
"Höhe (je Tuch)",
"Höhe (a)",
"Höhe (1 und 2, je a-b)",
"Höhe (S 7135/1a)",
"Höhe (S 7141/1)",
"Höhe (je Vierer-Bogen)",
"Höhe (a und b)",
"Höhe (a)",
"Höhe (b und d)",
"Höhe (S 7408/2)",
"Höhe (je Teller)",
"Höhe (a)",
"Höhe (a und c)",
"Höhe (Eimerchen)",
"Höhe (S 7408/1)",
"Höhe (a mit b)",
"Höhe (m. Rahmeninkl.Aufhä.)",
"Höhe (a)",
"Höhe (a mit b)",
'Höhe (Passepartout)',
'Höhe (Unterlage)',
'Höhe (Buch)',
'Höhe (Jeder Druck)',
'Höhe (Gesamthöhe)',
"Höhe (1 Tassengedeck)",
"Höhe (1 und 2, je c-e)",
"Höhe (2)",
"Höhe (5-6)",
"Höhe (Nadeln in Verpack.)",
"Höhe (S 6418b)",
"Höhe (S 6419b)",
"Höhe (S 6542/3)",
"Höhe (S 6877/4)",
"Höhe (S 6914/3)",
"Höhe (S 6962/8)",
"Höhe (S 7083/3)",
"Höhe (S 7135/1c)",
"Höhe (Höhe)",
"Höhe (Mappe)",
"Höhe (c)",
"Höhe (g mit h)",
"Reliefhöhe" => MDMeasurementType::height,
"Länge",
"Länge OT",
"Länge H",
"Länge (1)",
"Länge (2)",
"Länge (3)",
"Länge (4)",
"Länge (5)",
"Länge (6)",
"Länge (7)",
"Länge (8)",
"Länge (a)",
"Länge (b)",
"Länge (c)",
"Länge (d)",
"Länge (e)",
"Länge (f)",
"Länge (g)",
"Länge (8)",
"Länge (1c)",
"Länge (Mappe)",
"Tiefe (Mappe)",
"Länge (S 6514/3)",
"Länge (S 6519/3)",
"Länge (S 7139/3)",
"Tiefe (S 6553/2)",
"Länge (S 6398/21)",
"Länge (S 6398/22)",
"Länge (1f)",
"Länge (S 6519/6)",
"Länge (S 7139/6)",
"Länge (S 7139/7)",
"Länge (S 7139/8)",
"Länge (S 7139/9)",
"Länge (ausgeklappt)",
"length",
"(Länge)",
@@ -242,6 +442,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Tiefe (mit Hinterrad in Fahrtrichtung)",
"Tiefe (zusammengeklappt)",
"Tiefe (Etui)",
"Tiefe (Heft)",
"Tiefe (mit eingeklapptem Hinterrad)",
"Tiefe/Länge",
"Tiefe min",
@@ -250,6 +451,16 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Außenmaß (Tiefe)",
"Teife",
"length",
"Länge (1b)",
"Länge (S 6424/4)",
"Länge (S 6514/2)",
"Länge (S 6519/2)",
"Länge (S 6795/2a und b)",
"Länge (S 7069b)",
"Länge (S 7081/3)",
"Länge (S 7139/2)",
"Tiefe (S 6553/1)",
"Tiefe (per Päckchen)",
"Bruttomass (Länge)",
"Bruttomass (Tiefe)",
"Kartierung (Länge)",
@@ -260,6 +471,10 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Sitzhöhe (Tiefe)",
"Länge (Platte)",
"Tiefe (Platte)",
"Länge (Griff)",
"Tiefe (Griff)",
"Länge (Parierstange)",
"Tiefe (Parierstange)",
"Objektmaß (Länge)",
"Objektmaß (Tiefe)",
"Objektmass (Länge)",
@@ -288,6 +503,33 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
'Tiefe (Einleger 2)',
'Länge (Einleger 3)',
'Tiefe (Einleger 3)',
'Länge (Passepartout)',
'Tiefe (Passepartout)',
'Länge (Unterlage)',
'Tiefe (Unterlage)',
'Länge (Buch)',
'Tiefe (Buch)',
'Länge (Dose)',
'Tiefe (Dose)',
"Länge (1a)",
"Länge (S 7081/1-2)",
"Länge (S 7139/1)",
"Länge (S 6519/8a-e)",
"Länge (S 6514/1)",
"Länge (S 6424/3)",
"Länge (mit Kordel)",
"Länge (S 6795/1a und b)",
"Länge (1d)",
"Länge (S 6419c)",
"Länge (S 7139/4)",
"Länge (mit Handhabe)",
"Länge (1e)",
"Länge (S 6519/5)",
"Länge (S 6560/1b = Samtband)",
"Länge (S 7139/5)",
"Tiefe (kleinerer Größe)",
"Tiefe (etwas kleiner)",
"Tiefe (ähnlicher Größe)",
"depth",
"Dicke" => MDMeasurementType::length,
@@ -295,25 +537,60 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Breite OT",
"Breite H",
"Breite (ausgeklappt)",
"Breite (Jeder Druck)",
"Breite (Etui)",
"Breite (Heft)",
"Breite (netto)",
"Breite (Foto)",
"Breite (a)",
"Breite (S 7069a)",
"Breite (aufgeschlagen)",
"Breite (S 6799/1)",
"Breite größtes Stück",
"Breite (gesamt)",
"Breite (Druckstock)",
"Breite (Gesamtmaß)",
"Breite (Objekt)",
"Breite (Platte)",
'Breite (Darstellung ohne Schrift)',
'Breite (China)',
'Breite (Untersatzkarton)',
"(Breite)",
"Lichtmass (Breite)",
" (Breite)",
"Breite (ein Nagel)",
"width",
"Breite (Breite)",
"Breite (Mappe)",
"Breite (S 6576/1)",
"Breite (mit Griffen)",
"Breite (mit Handhabe)",
"Breite (BH, S 6561/1 - 9 mit)",
"Breite (Ensemble im Kästchen)",
"Breite (Hüfthalter)",
"Breite (S 6561/19-20 mit)",
"Breite (S 6576/2a-b)",
"Breite (S 6799/2a-b)",
"Breite (S 7069a und b)",
"Breite (a-d)",
"Breite (b)",
"Breite (c)",
"Breite (gesamt mit Handhabe)",
"Breite (mit Henkel)",
"Breite (packung)",
"width (overall)",
"Breite (Griff)",
"Außenmaß (Breite)",
"Breite (Trägermaterial)",
"Bruttomass (Breite)",
"Objektmaß (Breite)",
"Objektmass (Breite)",
"Kartierung (Breite)",
"Masstab (Breite)",
"Sitzhöhe (Breite)",
"Breite (Velinpapier)",
"Breite (Chinapapier)",
"Breite (Blindplatte)",
'Breite (Holzstock)',
'Breite (Untersatzbogen)',
'Breite (Buchblock)',
@@ -322,6 +599,8 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
'Breite (Buchblock mit Einabnd)',
'Breite (Stein)',
'Breite (Schuber)',
"Breite (S 6560/1a = Anhänger)",
"Breite (vergleichbarer od.)",
'Breite (Karton)',
'Breite (Einleger)',
'Breite (Einleger 1)',
@@ -349,16 +628,76 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
'Breite (Einleger 19)',
'Breite (Einleger 20)',
'Breite (Einleger 21)',
'Breite (Passepartout)',
'Breite (Unterlage)',
'Breite (Buch)',
'Breite (Dose)',
"Stärke",
"Schenkelbreite (Breite)" => MDMeasurementType::width,
"Durchmesser",
"Durchmesser (Schaft)",
"Durchm.",
"Durchmesser (mit Dicke)",
"Durchmesser (Boden)",
"Mündung (Durchmesser)",
"Rahmenaußenmaß Durchmesser",
"diameter",
"Durchmesser (a)",
"Durchmesser (b)",
"Durchmesser (c)",
"Durchmesser (d)",
"Durchmesser (e)",
"Durchmesser (f)",
"Durchmesser (g)",
"Durchmesser (1)",
"Durchmesser (2)",
"Durchmesser (3)",
"Durchmesser (4)",
"Durchmesser (S 7133/1)",
"Durchmesser (S 7133/3)",
"Durchmesser (S 7133/4)",
"Durchmesser (S 7134/1)",
"Durchmesser (S 7139/10)",
"Durchmesser (S 7139/11)",
"Durchmesser (S 6406/9a)",
"Durchmesser (S 6406/10a)",
"Durchmesser (S 6406/11a)",
"Durchmesser (S 6406/12a)",
"Durchmesser (S 6406/13a)",
"Durchmesser (S 6406/14a)",
"Durchmesser (S 6406/15a)",
"Durchmesser (S 6406/16a)",
"Durchmesser (S 6406/17a)",
"Durchmesser (S 6406/10c)",
"Durchmesser (S 6406/11c)",
"Durchmesser (S 6406/12c)",
"Durchmesser (S 6406/13c)",
"Durchmesser (S 6406/14c)",
"Durchmesser (S 6406/15b)",
"Durchmesser (S 6406/16b)",
"Durchmesser (S 6406/17b)",
"Durchmesser (S 6406/9c)",
"Durchmesser (S 6406/9d)",
"Durchmesser (S 6406/9e)",
"Durchmesser (S 6406/9f)",
"Durchmesser (S 6406/9g)",
"Durchmesser (Haube)",
"Durchmesser (S 6406/10d)",
"Durchmesser (S 6406/11d)",
"Durchmesser (Stand)",
"Durchmesser (Fuß)",
"Durchmesser (Rand /2)",
"Durchmesser (S 6406/10b)",
"Durchmesser (S 6406/11b)",
"Durchmesser (S 6406/12b)",
"Durchmesser (S 6406/13b)",
"Durchmesser (S 6406/14b)",
"Durchmesser (S 6406/9b)",
"Durchmesser (S 7133/2)",
"Durchmesser (S 7133/5)",
"Durchmesser (oberer Rand)",
"Durchmesser (Rand /1)",
"Durchmesser (Foto)",
"Außenmaß (Durchmesser)",
"Durchmesser in Richtung Bohrung",
"Durchmesser quer zur Bohrung",
@@ -368,10 +707,12 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Durchmesser unten",
"Durchmesser (Höhe)",
"Durchmesser (Breite)",
"Durchmesser (Tiefe)",
"Durchmesser (Länge)",
"Durchmesser (Dose)",
"Objektmaß (Durchmesser)",
"Objektmass (Durchmesser)",
"Durchmesser (Blatt)",
"Durchmesser (Platte)",
"d",
"Ø" => MDMeasurementType::diameter,
@@ -392,10 +733,16 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Höhe (Blatt)",
"Blattmaß (Höhe)",
"Höhe (Blatt/Platte)",
"Höhe (Blatt (mittig gefalzt))",
"Blattmass (Höhe)" => MDMeasurementType::height_sheet_size,
"Breite (Blatt)",
"Blattmaß (Breite)",
"Breite (Batt)",
"Breite (Blatt/Platte)",
"Breite (Blattplatte)",
"Breite (Blatt (mittig gefalzt))",
"Blattmass (Breite)" => MDMeasurementType::width_sheet_size,
"Blattmaß (Länge)",
@@ -406,18 +753,41 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Höhe (Bild)",
"Höhe (Darstellung)",
"Höhe (Darsetllung)",
"Höhe (Blatt/Darstellung)",
"Bildmaß (Höhe)",
"Höhe (Grafik ohne Pass.)",
"Höhe (Grafik ohne Pass.)",
"Höhe (Grafik ohne Pass.)",
"Höhe (Grafik ohne Pass.)",
"Höhe (Grafik ohne Pass.)",
"Höhe (Grafik ohne Passep.)",
"Höhe (Grafik ohne Passep.)",
"Höhe (Platte/Bild)",
"Höhe (Druckstock/Bild)",
"Höhe max (Darstellung)",
"Höhe (Chine collé)",
"Höhe (Batt)",
"Bildmass (Höhe)" => MDMeasurementType::height_image_size,
"Breite (Bild)",
"Breite (Darstellung)",
"Breite (Darsetllung)",
"Breite (Blatt/Darstellung)",
"Bildmaß (Breite)",
"Breite (Platte/Bild)",
"Breite (Bild/Platte)",
"Breite (Druckstock/Bild)",
"Breite max (Darstellung)",
"Breite (Chine collé)",
"Bildmass (Breite)" => MDMeasurementType::width_image_size,
"Bildmaß (Länge)",
"Bildmaß (Tiefe)",
"Tiefe (Darstellung)",
"LängLängee (Darstellung)",
"Länge (Druckstock/Bild)",
"Tiefe (Druckstock/Bild)",
"Bildmass (Länge)",
"Bildmass (Tiefe)" => MDMeasurementType::length_image_size,
@@ -437,6 +807,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Höhe min.",
'Höhe min (Blatt)',
'Höhe min (Platte)',
'Höhe min (Einleger)',
'Höhe min (Einleger 1)',
'Höhe min (Einleger 2)',
@@ -444,8 +815,10 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
'Höhe min (Einleger 4)',
'Höhe min (Einleger 5)',
'Höhe min (Schuber)' => MDMeasurementType::height_min,
"Höhe max.",
'Höhe max (Blatt)',
'Höhe max (Platte)',
'Höhe max (Einleger)',
'Höhe max (Einleger 1)',
'Höhe max (Einleger 2)',
@@ -465,10 +838,14 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"Breite min.",
'Breite min (Blatt)',
'Breite min (Platte)',
'Breite min (Einleger)',
'Breite min (Darstellung)',
'Breite min (Schuber)' => MDMeasurementType::width_min,
"Breite max.",
'Breite max (Blatt)',
'Breite max (Platte)',
'Breite max (Einleger)',
'Breite max (Einleger 1)',
'Breite max (Einleger 2)',
@@ -476,6 +853,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
'Breite max (Einleger 4)',
'Breite max (Einleger 5)',
'Breite max (Einleger 4-6)',
'Breite max (Darstellung)',
'Breite max (Schuber)' => MDMeasurementType::width_max,
"Diameter min." => MDMeasurementType::diameter_min,
@@ -485,6 +863,7 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"weight",
"Gewicht (Höhe)",
"Lauf (Gewicht)",
"Gewicht (Breite)",
"Gewicht (Tiefe)",
"Gewicht (Länge)",
@@ -502,9 +881,35 @@ final class MDConcMeasurementTypes implements MDImporterConcordanceListInterface
"orientation",
"Stempelstellung" => MDMeasurementType::die_axis,
default => throw new MDImporterMissingConcordance("Unmapped specific measurement type: " . $input),
"Länge (Klinge)" => MDMeasurementType::length_blade,
"Breite (Klinge)" => MDMeasurementType::width_blade,
"Höhe (Klinge)" => MDMeasurementType::height_blade,
"Durchmesser (Darstellung)",
"Durchmesser (Bild)" => MDMeasurementType::diameter_image_size,
"Bodenhöhe",
"Höhe (Boden)" => MDMeasurementType::height_of_base,
"Bodenbreite",
"Breite (Boden)" => MDMeasurementType::width_of_base,
"Bodenlänge",
"Länge (Boden)" => MDMeasurementType::length_of_base,
"Bodendurchmesser",
"Durchmesser (Boden)" => MDMeasurementType::diameter_of_base,
default => null,
};
if ($output === null) {
MDImporterMissingConcordance::throw("measurements", $input);
return MDMeasurementType::diameter_of_base; // Return default in dry-run mode
}
return $output;
}
}

View File

@@ -26,7 +26,8 @@ final class MDConcObjectForms implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):string {
if (!isset(self::FORMS_LIST[$input])) {
throw new MDImporterMissingConcordance("Unknown form type: " . $input);
MDImporterMissingConcordance::throw("form/shape", $input);
return 'cube'; // Return default in dry-run mode
}
return self::FORMS_LIST[$input];

View File

@@ -21,21 +21,72 @@ final class MDConcObjectTagRelTypes implements MDImporterConcordanceListInterfac
'Assoziation' => 'tag',
'assoziation' => 'tag',
'description' => 'tag',
'Druckvorlage' => 'tag',
'emotion' => 'tag',
'atmosphäre' => 'tag',
'schwarz-grau' => 'tag',
'schwarzgrau' => 'tag',
'schwarz' => 'tag',
'hellbraun' => 'tag',
'schwarz-grau fleckig' => 'tag',
'schwarzbraun' => 'tag',
'rötlich' => 'tag',
'graubraun' => 'tag',
'schlagwort hist.ereignis' => 'tag',
'schlagwort thema' => 'tag',
'Objektart' => 'object_type',
'objektart' => 'object_type',
'object_type' => 'object_type',
"motive" => "display_subject",
"motiv" => "display_subject",
"display" => "display_subject",
"Bildelement" => "display_subject",
"display_subject" => "display_subject",
"material" => "material",
"technique" => "technique",
"technik" => "technique",
'thema' => 'topic',
'topic' => 'topic',
'erwähnt' => 'mentioned',
'mentioned' => 'mentioned',
'taxon' => 'taxon',
];
// Maps to event type
private const RELATION_TYPES_MAPPED_TO_EVENTS = [
'\'datierung\'' => ['event_type' => 24, 'target_section' => 'time'],
'datierung' => ['event_type' => 24, 'target_section' => 'time'],
'schlagwort zeitraum' => ['event_type' => 24, 'target_section' => 'time'],
'person' => ['event_type' => 23, 'target_section' => 'actor'],
];
/**
* Returns the mapped event type and event type target
* of a supposed tag-object relationship name.
*
* @param string $input Input string (relation type name).
*
* @return array{event_type: int, target_section: 'time'|'actor'|'place'}
*/
public static function getMappedEventType(string $input):array {
if (isset(self::RELATION_TYPES_MAPPED_TO_EVENTS[strtolower($input)])) {
return self::RELATION_TYPES_MAPPED_TO_EVENTS[strtolower($input)];
}
MDImporterMissingConcordance::throw("object-tag relationship", $input);
return ['event_type' => 24, 'target_section' => 'time'];
}
/**
* Require a function for getting the concordance target.
*
@@ -48,11 +99,16 @@ final class MDConcObjectTagRelTypes implements MDImporterConcordanceListInterfac
if (isset(self::RELATION_TYPE_NAMES[$input])) {
return self::RELATION_TYPE_NAMES[$input];
}
if (isset(self::RELATION_TYPE_NAMES[strtolower($input)])) {
return self::RELATION_TYPE_NAMES[strtolower($input)];
if (isset(self::RELATION_TYPE_NAMES[trim(strtolower($input))])) {
return self::RELATION_TYPE_NAMES[trim(strtolower($input))];
}
throw new MDImporterMissingConcordance("Unknown object-tag relationship type: " . $input);
if (isset(self::RELATION_TYPES_MAPPED_TO_EVENTS[strtolower($input)])) {
throw new MDImporterTagRelationTypeIsEventType("Tag-object relationship type is signifies not tags, but an event component.");
}
MDImporterMissingConcordance::throw("object-tag relationship", $input);
return 'tag'; // Return default in dry-run mode
}
}

View File

@@ -17,6 +17,8 @@ final class MDConcOwnershipStatus implements MDImporterConcordanceListInterface
"Eigentum" => "owned",
"Geschenk" => "owned",
"Besitz" => "owned",
"Owned" => "owned",
"owned" => "owned",
"Kauf" => "owned",
"Fund" => "owned",
"Eigenleistung" => "owned",
@@ -28,6 +30,8 @@ final class MDConcOwnershipStatus implements MDImporterConcordanceListInterface
// Permanent loans
"Dauerleihe" => "permanent_loan",
"Dauerleihgabe" => "permanent_loan",
"Permanent loan" => "permanent_loan",
"permanent loan" => "permanent_loan",
// Loans
"Leihe" => "borrowed",
@@ -39,6 +43,13 @@ final class MDConcOwnershipStatus implements MDImporterConcordanceListInterface
'Third party property' => 'third_party_property',
'Fremdeigentum' => 'third_party_property',
// Deaccessed
'Deaccessed' => 'deaccessed',
'deakzessioniert' => 'deaccessed',
'Deakzessioniert' => 'deaccessed',
'Deakzession' => 'deaccessed',
'Deakzessiert' => 'deaccessed',
];
/**
@@ -54,7 +65,8 @@ final class MDConcOwnershipStatus implements MDImporterConcordanceListInterface
if (isset(self::OWNERSHIP_TYPES_VERBOSE[trim($input)])) {
return self::OWNERSHIP_TYPES_VERBOSE[trim($input)];
}
throw new MDImporterMissingConcordance("Unknown ownership type: " . $input);
MDImporterMissingConcordance::throw("ownership", $input);
return 'deaccessed'; // Return default in dry-run mode
}
return self::OWNERSHIP_TYPES_VERBOSE[$input];

View File

@@ -28,6 +28,7 @@ final class MDConcPlace implements MDImporterConcordanceListInterface {
'Herstellungsland' => 1,
'Herstellung' => 1,
'Entstehungsort' => 1,
'Herstellungsort Hose' => 1,
'Münzstätte' => 1,
// 2: Finding / was found
@@ -107,7 +108,8 @@ final class MDConcPlace implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):int {
if (!isset(self::PLACE_ROLES_TO_EVENT_TYPE[$input])) {
throw new MDImporterMissingConcordance("Unknown place type: " . $input);
MDImporterMissingConcordance::throw("place (in event)", $input);
return 1; // Return default in dry-run mode
}
return self::PLACE_ROLES_TO_EVENT_TYPE[$input];

View File

@@ -13,6 +13,7 @@ final class MDConcSex implements MDImporterConcordanceListInterface {
private const SEXES_LIST = [
'Männlich' => 'male',
'Weiblich' => 'female',
'diverse' => 'other',
];
@@ -26,7 +27,8 @@ final class MDConcSex implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):string {
if (!isset(self::SEXES_LIST[$input])) {
throw new MDImporterMissingConcordance("Unknown sex type: " . $input);
MDImporterMissingConcordance::throw("sex", $input);
return 'other'; // Return default in dry-run mode
}
return self::SEXES_LIST[$input];

View File

@@ -21,9 +21,34 @@ final class MDConcSourceTypes implements MDImporterConcordanceListInterface {
"buch" => "book",
"literatur" => "book",
"document]book" => "book",
'Buchpublikation' => 'book', // Book
'Produkthandbuch' => 'book', // Book
'Produkthandbuch/ Zusatzmaterial??' => 'book', // Book
'Produkthandbuch ' => 'book', // Book
'Buchpublikation ' => 'book', // Book
'Produkthandbuch (Objektart Missing)' => 'book', // Book
'Ausstellungskatalog' => 'book', // Book
'Comicbuch' => 'book', // Book
'Katalog' => 'book', // Book
// Misc
"Weiteres" => "misc",
"document]avm" => "misc",
'Keine Angabe' => 'misc', // Miscelaneous
'Handschriften' => 'misc', // Miscelaneous
'Divers' => 'misc', // Miscelaneous
'Handschrift' => 'misc', // Miscelaneous
'Flyer/Poster' => 'misc', // Miscelaneous
'Comic' => 'misc', // Miscelaneous
'Ordner' => 'misc', // Miscelaneous
'Diskette' => 'misc', // Miscelaneous
'Wissenschaftliche Hausarbeit' => 'misc', // Miscelaneous
// Periodical
'Magazin' => 'periodical', // Periodical
// Proceedings
'Tagungsunterlagen' => 'proceedings', // Proceedings
];
@@ -43,7 +68,8 @@ final class MDConcSourceTypes implements MDImporterConcordanceListInterface {
return self::SOURCE_TYPES[strtolower($input)];
}
throw new MDImporterMissingConcordance("Unknown source type: " . $input);
MDImporterMissingConcordance::throw("source", $input);
return 'proceedings'; // Return default in dry-run mode
}
}

View File

@@ -54,7 +54,8 @@ final class MDConcTime implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):int {
if (!isset(self::TIME_ROLES_TO_EVENT_TYPE[$input])) {
throw new MDImporterMissingConcordance("Unknown time type: " . $input);
MDImporterMissingConcordance::throw("time (in event)", $input);
return 1; // Return default in dry-run mode
}
return self::TIME_ROLES_TO_EVENT_TYPE[$input];

View File

@@ -45,7 +45,8 @@ final class MDConcTitleTypes implements MDImporterConcordanceListInterface {
public static function getConcordanceTarget(string $input):string {
if (!isset(self::TITLE_TYPES[$input])) {
throw new MDImporterMissingConcordance("Unknown title type: " . $input);
MDImporterMissingConcordance::throw("title", $input);
return "Dialect"; // Return default in dry-run mode
}
return self::TITLE_TYPES[$input];