Script to update tenant mapping rules to include mapping for Canceled LCCN, Date type, Subject Source and Subject Type

MODSOURMAN-1189: Change script and wiki page to refer to "Canceled LCCN" instead of "Cancelled LCCN"Closed

MODSOURMAN-1224: Modify script to update tenant mapping rules to include mapping for Subject source, Subject type, Date typeClosed

Overview

The CLI tool is designed perform following changes:

  1. Inject new mapping rules for the following fields:

    • 010$z Canceled LCCN.

    • 008 Date type.

  2. Inject new mapping rules with the following Subject types based on field number:

    • 653 - Uncontrolled

    • 654 - Faceted Topical Terms

    • 656 - Occupation

    • 657 - Function

    • 658 - Curriculum Objective

    • 662 - Hierarchical Place Name

    • 688 - Type of Entity Unspecified

  3. Update default mapping for Subject types based on field

    • 600 - Personal name

    • 610 - Corporate name

    • 611 - Meeting name

    • 630 - Uniform title

    • 647 - Named event

    • 648 - Chronological term

    • 650 - Topical term

    • 651 - Geographic name

    • 655 - Genre/Form

 

The CLI tool/script does not change existing mapping rules on the target host, but it only extends existing rules.

Script execution

CLI tool executable artifact for Ramsons:

java -jar folio-mapping-rules-update-ramsons.jar configuration.json

CLI tool/script requirements:

  • Java 17

In order to run the CLI tool you need the following:

  1. Create JSON file with configuration (see: configuration file)

  2. Open terminal (Mac OS or UNIX Systems) or Power shell (Windows) 

  3. Go to the folder where the CLI tool executable artifact is located

  4. Run the CLI tool/script with the configuration file path parameter (just file name if the script is located in the same folder)

 

image-20241023-124956.png

 

Configuration file 

  • okapiUrl          - your library okapi url. (Can be seen in the app settings → software versions → okapi services → okapi)

  • tenant             - target tenant

  • username        - admin user name

  • password        - admin user name password

Configuration file example:

{   "okapiUrl": "https://folio-snapshot-okapi.dev.folio.org",   "tenant": "diku",   "username": "admin",   "password": "secret" }

for consortia tenants add, additional centralTenant field in configuration.json

{   "okapiUrl": "https://folio-snapshot-okapi.dev.folio.org",   "tenant": "diku", "centralTenant":"consortia_admin"   "username": "consortia_admin",   "password": "consortia_secret" }