crkn-rcdr / cihm-metadatabus

Documentation and Docker build environment for key portions of the metadata bus.
BSD 2-Clause "Simplified" License
0 stars 1 forks source link

dmd/flatten: Fully support EDTF Level 0 for MARC264 and fallback MARC260 #72

Closed RussellMcOrmond closed 1 year ago

RussellMcOrmond commented 1 year ago

Extended Date/Time Format (EDTF) Specification

Level 0 requires “extended format” as defined in 8601 which we support, but also time intervals which we don't currently support.

For pubmin/pubmax used by CMR, we first look at 264 - Production, Publication, Distribution, Manufacture, and Copyright Notice (R) and if that doesn't exist, look at 260 - Publication, Distribution, etc. (Imprint)

We put the entire field as a string into the CMR 'pu' field, and then create pubmin/pubmax from "$c - Date of publication, distribution, etc." , "$c - Date of production, publication, distribution, manufacture, or copyright notice".

https://github.com/crkn-rcdr/cihm-metadatabus/blob/main/CIHM-Meta/lib/CIHM/Meta/dmd/flatten.pm

The CIHM::Normalise::iso8601() function tries to strip away unwanted charters and figure something out from dates that aren't encoded in Level 0, but that is not at all the same as Level 1 or Level 2 support. Those levels may be available in future software we adopt, but won't be part of the custom metadatabus/CAP system.

RussellMcOrmond commented 1 year ago

I have looked, and there doesn't seem to be any existing perl modules that support parsing EDTF that are separate from other larger applications. Rather than spending a large amount of time supporting EDTF, I'd like to change the proposal to only ensuring our date parsing code doesn't break when given date ranges in MARC date fields.

The goal is to be able to slowly enhance our existing crosswalk from MARC to CMR to handle enhanced records that are more compatible with Blacklight-marc. This enables the possibility of incremental upgrades to MARC records in a single Descriptive Metadata repository used by both CAP and Blacklight, rather than having to have a completely separate metadata repository during the transition.