Add new measurement types for min / max length, width, etc.

Close #35
This commit is contained in:
Joshua Ramon Enslin 2025-03-19 15:03:29 +01:00
parent 60483d897b
commit 04c378675c
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
3 changed files with 61 additions and 18 deletions

2
l18n

@ -1 +1 @@
Subproject commit 26d1fa33655556c605a238e8d8964c96bd11c0ce Subproject commit d00a827babf2de5fd23cef828ad48e47319af40b

View File

@ -37,6 +37,14 @@ enum MDMeasurementType implements MDValueEnumInterface, JsonSerializable {
case length_frame; case length_frame;
case height_frame; case height_frame;
case width_frame; case width_frame;
case length_min;
case length_max;
case height_min;
case height_max;
case width_min;
case width_max;
case diameter_min;
case diameter_max;
/** /**
* Returns a value of this type based on a string. * Returns a value of this type based on a string.
@ -69,6 +77,14 @@ enum MDMeasurementType implements MDValueEnumInterface, JsonSerializable {
'length_frame' => self::length_frame, 'length_frame' => self::length_frame,
'height_frame' => self::height_frame, 'height_frame' => self::height_frame,
'width_frame' => self::width_frame, 'width_frame' => self::width_frame,
'length_min' => self::length_min,
'length_max' => self::length_max,
'height_min' => self::height_min,
'height_max' => self::height_max,
'width_min' => self::width_min,
'width_max' => self::width_max,
'diameter_min' => self::diameter_min,
'diameter_max' => self::diameter_max,
default => throw new MDpageParameterNotFromListException("Unknown measurement type"), default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
}; };
@ -105,6 +121,14 @@ enum MDMeasurementType implements MDValueEnumInterface, JsonSerializable {
19 => self::length_frame, 19 => self::length_frame,
20 => self::height_frame, 20 => self::height_frame,
21 => self::width_frame, 21 => self::width_frame,
22 => self::length_min,
23 => self::length_max,
24 => self::height_min,
25 => self::height_max,
26 => self::width_min,
27 => self::width_max,
28 => self::diameter_min,
29 => self::diameter_max,
default => throw new MDpageParameterNotFromListException("Unknown measurement type"), default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
}; };
@ -161,6 +185,14 @@ enum MDMeasurementType implements MDValueEnumInterface, JsonSerializable {
self::length_frame => self::length, self::length_frame => self::length,
self::height_frame => self::height, self::height_frame => self::height,
self::width_frame => self::width, self::width_frame => self::width,
self::length_min => self::length,
self::length_max => self::length,
self::height_min => self::height,
self::height_max => self::height,
self::width_min => self::width,
self::width_max => self::width,
self::diameter_min => self::diameter,
self::diameter_max => self::diameter,
# default => throw new MDpageParameterNotFromListException("Unknown measurement type"), # default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
}; };
@ -195,6 +227,14 @@ enum MDMeasurementType implements MDValueEnumInterface, JsonSerializable {
self::length_frame => 19, self::length_frame => 19,
self::height_frame => 20, self::height_frame => 20,
self::width_frame => 21, self::width_frame => 21,
self::length_min => 22,
self::length_max => 23,
self::height_min => 24,
self::height_max => 25,
self::width_min => 26,
self::width_max => 27,
self::diameter_min => 28,
self::diameter_max => 29,
# default => throw new MDpageParameterNotFromListException("Unknown measurement type"), # default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
}; };

View File

@ -53,23 +53,26 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
return match($input) { return match($input) {
'allgemein' => self::allgemein, // General link to a good source 'allgemein' => self::allgemein, // General link to a good source
'AAT-ID',
'aat' => self::aat, 'aat' => self::aat,
'ackerbau' => self::ackerbau, 'ackerbau' => self::ackerbau,
'bne' => self::bne, 'bne' => self::bne,
'bnf' => self::bnf, 'bnf' => self::bnf,
'cona' => self::cona, 'cona' => self::cona,
'edition humboldt digital' => self::editionhumboldtdigital, 'edition humboldt digital' => self::editionhumboldtdigital,
'gnd' => self::gnd, 'gnd',
'GND' => self::gnd, 'GND',
'o-gnd' => self::gnd, 'o-gnd',
'O-GND' => self::gnd, 'O-GND',
'pnd' => self::gnd, 'GND-Identnummer',
'http://d-nb.info/' => self::gnd, // This is technically wrong, but used in practice... 'GND-Nummer',
'http://d-nb.info/gnd' => self::gnd, 'pnd',
'http://d-nb.info/gnd/' => self::gnd, 'http://d-nb.info/', // This is technically wrong, but used in practice...
'd-nb.info' => self::gnd, 'http://d-nb.info/gnd',
'd-nb' => self::gnd, 'http://d-nb.info/gnd/',
'https://portal.dnb.de' => self::gnd, 'd-nb.info',
'd-nb',
'https://portal.dnb.de',
'https://explore.gnd.network/gnd/' => self::gnd, 'https://explore.gnd.network/gnd/' => self::gnd,
'grobsystematik' => self::grobsystematik, 'grobsystematik' => self::grobsystematik,
'iconclass' => self::iconclass, 'iconclass' => self::iconclass,
@ -81,12 +84,12 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
'loc' => self::loc, // Duplicate? 'loc' => self::loc, // Duplicate?
'mindat.org' => self::mindatorg, 'mindat.org' => self::mindatorg,
'moebeltypologie' => self::moebeltypologie, 'moebeltypologie' => self::moebeltypologie,
'ndb/adb' => self::ndb_adb, 'ndb/adb',
'NDB/ADB' => self::ndb_adb, 'NDB/ADB' => self::ndb_adb,
'ndl' => self::ndl, 'ndl' => self::ndl,
'ndp-ikmk' => self::ndp_ikmk, 'ndp-ikmk' => self::ndp_ikmk,
'ndp-ikmk-persons' => self::ndp_ikmk_persons, 'ndp-ikmk-persons' => self::ndp_ikmk_persons,
'nomisma' => self::nomisma, 'nomisma',
'nomisma.org' => self::nomisma, 'nomisma.org' => self::nomisma,
'npg' => self::npg, 'npg' => self::npg,
'oberbegriffsdatei' => self::oberbegriffsdatei, 'oberbegriffsdatei' => self::oberbegriffsdatei,
@ -97,11 +100,11 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
'rkd' => self::rkd, 'rkd' => self::rkd,
'ulan' => self::ulan, 'ulan' => self::ulan,
'ULAN' => self::ulan, 'ULAN' => self::ulan,
'viaf' => self::viaf, 'viaf',
'VIAF' => self::viaf, 'VIAF' => self::viaf,
'wikidata' => self::wikidata, 'wikidata',
'Wikidata' => self::wikidata, 'Wikidata',
'www.wikidata.org' => self::wikidata, 'www.wikidata.org',
'WIKIDATA' => self::wikidata, 'WIKIDATA' => self::wikidata,
default => throw new MDpageParameterNotFromListException("Unknown norm data repository: '" . $input . "'"), default => throw new MDpageParameterNotFromListException("Unknown norm data repository: '" . $input . "'"),
}; };