WIP: start work on schema
This patch starts work on the configuration tables, seed data,
and functions for extracting headings from authority records based on
(usually) the MARCXML to MADS XSLT. For the purpose of the WIP, everything
is being stuck in the same upgrade script; this will be broken out later.
TODO:
* verify that MARC and MADS will produce results that are the same
for uniform titles
* add hooks for assigning normalizers
* see if there is a reasonable way for the MADS stylesheet to
generate http://www.loc.gov/mads/rdf/v1#authoritativeLabel values
for display purposes
* work out how to extract standard identifiers in the face of
the typical 001/035 => 035$a during authority ingest (note that
the default MARCXML2MADS stylesheet does *not* consider the 035)
* fully populate the seed data
* make per-heading thesaurus extraction smarter. *Most* of the time,
variant and related headings will be in the same thesaurus as the
main heading; if they're not, they explicitly will have overrides.
Some implementation notes:
* The authority.variant_heading_type and authority.related_heading_type
enums are arguably too strict, but may protect us against errors
later
* The configuration tables are a lie. By this, I mean that authority.heading_field
will likely embed assumptions that the format will always be MADS-like;
while the mechanism should be flexible enough to accommodate MADS
extensions and new headings types, there will undoubtedly be
edge cases that will live in store procedure code.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>