WIP: start work on schema
authorGalen Charlton <gmc@esilibrary.com>
Fri, 6 Jan 2017 22:43:34 +0000 (17:43 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 6 Jan 2017 22:43:34 +0000 (17:43 -0500)
commitba821441329081fbe67d34e5dfc6cf8e44fa789a
treebf3d3cc63058fe58147f4be8ae9af04b98d55c8b
parent1f98efcbd02cbfc3e0b1982c4fa47b45ae0933c1
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>
Open-ILS/src/sql/Pg/upgrade/YYYY.schema.authority.sql [new file with mode: 0644]