Uploaded image for project: 'mod-oai-pmh'
  1. mod-oai-pmh
  2. MODOAIPMH-108

Make deleted instance records support configurable

    XMLWordPrintable

Details

    • Gulfstream Sprint 5
    • 8
    • Gulfstream

    Description

      Allow repository.deletedRecords to be configured as

      • no - deleted records aren’t revealed in the feed.
      • persistent - deleted records are shown in the feed with status = “deleted” and no metadata presented.
      • transient - behaviour is same as “persistent” while deleted records are stored, but might be “no” in case deletion history was cleared.

      Implement behavior as described in official specification

      To define if an SRS record is deleted, accept the leader in the MARC record "as is". MARC Leader 05 - Record status will identify what is marked for deletion (Record status equals "d", "s" or "x") and what is not. Also "deleted" field can be used for this purpose (see json example below).

      {
        "id": "1a03ec27-a5e0-4043-ac9f-c0bfd4ab3220",
        "snapshotId": "5143d9ff-ad38-45a9-80d6-c85561227b56",
        "matchedId": "1a03ec27-a5e0-4043-ac9f-c0bfd4ab3220",
        "generation": 0,
        "recordType": "MARC",
        "rawRecord": {
          "id": "7177455e-8348-4933-994a-f66e66ffb683",
          "content": ...MARC record...
        },
        "parsedRecord": {
          "id": "7ad906f2-23b7-4764-839f-08b3a3e702a9",
          "content": {
            "fields": [
             ...MARC fields in json format... 
            ],
            "leader": "03077dam a2200421 i 4500"
          }
        },
        "deleted": true,
        "order": 0,
        "externalIdsHolder": {
          "instanceId": "0e51a2a1-cb1f-4e3b-8a31-e9448e89275b"
        },
        "additionalInfo": {
          "suppressDiscovery": false
        },
        "metadata": {
          "createdDate": "2020-03-27T10:27:06.921+0000",
          "createdByUserId": "de892cf1-bce3-5fdf-b36e-7e825084d799",
          "updatedDate": "2020-03-27T10:27:07.493+0000",
          "updatedByUserId": "de892cf1-bce3-5fdf-b36e-7e825084d799"
        }
      }
      

      "updatedDate" field can be used to identify the date of deletion.
      Just instance records stored in SRS are in the scope of this story.

      Acceptance criteria:

      • repository.deletedRecords is configurable and access-able for front-end, default value is "no"
      • Deleted records support is implemented as per OAI-PMH documentation for ListRecords, ListIdentifiers and GetRecord verbs
      • Deleted records are defined by MARC Leader 05 in ("d", "s", "x") or json field "deleted"=true: if either of these checks is true, the record should be considered as deleted.
      • OAI-PMH includes deleted records in the feed regardless of suppressDiscovery flag value for the next configuration (see details in MODOAIPMH-126):
        • Suppressed records processing = Skip suppressed from discovery records
        • Deleted records support = Persistent or Transient

      Check the cases below and flow diagram for understanding dependency between suppressed and deleted records attached.

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Anastasiia Zakharova Anastasiia Zakharova (Inactive)
                Anastasiia Zakharova Anastasiia Zakharova (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases