Performance Testing Solution: Simple MARC Record Editor (quickMARC)

RolePersonComments
Solution Architect

Java Lead

UI Lead

Product Owner


UXPROD-2272 - Getting issue details... STATUS  - Connect SRS and SMRE for MARC Bibs (SMRE work)

Requirements

Simple MARC Records Editor (SMRE) must be able to access an existing SRS MARC Bib via a button in the Instance (e.g. Edit MARC) and edit the MARC Bib. Once the edits have been made via SMRE, then:

  • The edits are saved to the SRS MARC Bib (including updates to the size of the MARC record in MARC Leader bytes 00-04): (a) the corresponding updates are made to the MARCcat MARC bib automatically (once MARCcat and SRS are integrated); (b) the corresponding updates are made to the Inventory Instance automatically.
  • Current scope for SMRE would be editing existing SRS Bib records only. Not creating new MARC records from Instances or creating new MARC records from scratch.
  • SMRE will use a simple UI, rather than a text editor.
  • The only expected validation is the general structural validation that SRS currently does. Any more rigorous MARC validation would happen in MARCcat or external to FOLIO.
  • If displayed in the SMRE, data in MARC 001 and 999 ff fields would be visible, but not editable
  • Once SRS is expanded to include MARC holdings records, the SMRE may be expanded to allow for editing of MARC holdings also.


Approach & Design

quickMARC application should be implemented as separate micro service in its own module mod-quick-marc. It allows to extend number of use cases in future, for example, for Data Import could involve editing MARC as part of those workflows. Two endpoints must be implemented to meet the requirements for the MARC editor:

MethodPathProvided permissionsRequestResponseDescriptionNotes
GET

records-editor/records?id={recordUUID}

records-editor/records?instanceId={idInstance}

records-editor.records.item.getNA200 OK (compatible-marc-record)Get ui-compatible marc record

{recordId} - marc records UUID

{idInstance} - corresponding instance id

PUTrecords-editor/records/{id}records-editor.records.item.putcompatible-marc-record204 UPDATED (compatible-marc-record)Update an existed marc record{id} - marc records UUID

Module permissions: records-editor.all

The first endpoint is responsible for the delivery and transformation of the MARC record to the client in the required format. The second one is necessary to update the record after corresponding validation and transformation.

(A) Get MARC record

  1. Client makes request to quick-marc GET /records-editor/marc-records/{id}
  2. quickMARC proxies request to source-record-manager*
  3. quickMARC transforms request to appropriate format (accepted by UI)
  4. quickMARC returns response 200 OK

(B) Update MARC record

  1. Client makes request to inventory PUT /records-editor/marc-records/{id}
  2. quickMARC transform record from UI-compatible format to marc-json and updates to the size of the MARC record in MARC Leader bytes 00-04
  3. quickMARC updates corresponding instance in source-record-manager*
  4. quickMARC returns response 204 UPDATED

Integration with SRS/SRM

quickMARC should operate with two endpoints to retrieve and update existed MARC records:

1) GET request to retrieve existing record (errors should be processed on SRS/SRM)

2) PUT to update existing (errors should be processed on SRS/SRM)

Key Components

UI compatible schema for MARC record representation

PropertyTypeDefaultRequiredNotes
idstringNY
leaderstringNY
recordscollection<object>NYAt least 3 items: 001, 008, 999f are required

Draft of UI compatible schema - 001, 008, 999f are locating in the records array as an objects

Schema:

acceptable schema #1
{
  "$id": "https://example.com/arrays.schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A representation of MARC record for QuickMARC",
  "type": "object",
  "properties": {
    "leader": {
      "type": "string"
    },
    "records": {
      "type": "array",
      "items": [
        { 
          "$ref": "#/definitions/record"
        }
      ],
      "minItems" : 3
    }
  },
  "definitions": {
    "record": {
      "type": "object",
    }
  },
   "required" : [
     "leader", "records"
   ]
}

Sample:

acceptable schema #1
{
  "leader": "00714cam a2200205 a 4500",
  "records": [
    {
      "001":"12883376"
    },
    {
      "005": "20030616111422.0"
    },
    {
      "008": [
        {
        	"Type" : "a"
        },
        {
        	"Desc" : "i"
        }
      ]
    }
  ]
}


https://github.com/marc4j/marc4j

*integration with SRS is planned by source-record-manager; API isn't ready yet  UXPROD-2273 - Getting issue details... STATUS