Concordance lists for automatically categorizing and correcting controlled entry types during imports to museum-digital.
Go to file
Joshua Ramon Enslin f175302627 Merge: Lists for marking positions and types extended
Merge pull request 'ufladerer-patch-1' (#2) from ufladerer-patch-1 into master

Reviewed-on: #2
2024-12-01 22:10:32 +01:00
exceptions Add blacklist for invalid damage types 2023-11-22 13:38:57 +01:00
interfaces Extend concordance lists 2023-10-18 23:13:58 +02:00
src src/MDConcMarkingType.php aktualisiert 2024-11-28 19:37:57 +01:00
tests Add test to ensure all concordance lists throw the same error 2023-06-23 19:19:11 +02:00
LICENSE Add proper attribution to license 2022-04-02 01:33:05 +02:00
README.md Fix link formatting in README 2023-06-24 00:24:49 +02:00

Concordance Lists for Imports to museum-digital

This directory contains concordance lists for accepted values. Where e.g. an entry type may be identified at museum-digital only by its ID, it is not realistic to expect providers of import data (which is to say: museums) to enter the entry type ID from museum-digital's relevant list. Hence, the lists contained in this subdirectory provide human-readable names for the IDs accepted by museum-digital as found in previous imports, so that they can be automatically translated to the IDs and names as used within the context of museum-digital.

The lists are grouped as (private) class constants of their relevant entry type.

  • All class names may be prefixed with MDConc.
  • All concordance list classes implement the MDImporterConcordanceListInterface interface.
    • They can thus all be used using a static function getConcordanceTarget(string $input). E.g.:
      $checkType = MDConcCheckTypes::getConcordanceTarget("Vollständigkeit");
      
  • All concordance lists can be found directly in the /src directory.

Environment and Purpose for Using a Separate Subrepository

This repository is intended to be used as a subrepository of MDImporter. Its full functionality is thus only available with the inclusion of some other subrepositories provided in the context of the importer (e.g. MDAllowedValueSets).

Editing can be done by simply adding to the lists however. It is hoped, that the publication of this subrepository as a standalone repository makes this process easier. Just clone this repository and enter the missing values in the relevant classes in the /src directory.

Testing

Tests exist to ensure that all concordance lists implement the MDImporterConcordanceListInterface interface and throw an MDImporterMissingConcordance exception, if a new, yet unknown value is encountered. If this repository is set up as part of an installation of the MDImporter, they can be run using:

phpunit tests