Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ArchivalTerms in LDR #1388

Merged
merged 4 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 4 additions & 27 deletions whelk-core/src/main/resources/ext/marcframe.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@
"1": "marc:JurisdictionName",
"2": "marc:NameInDirectOrder"
},

"NOTE-TypeOfRecordType": "Position b OBSOLETE since 1995 (was ArchivalUnit)",
"TypeOfRecordType": {
"a": "Text",
"b": "ArchivalUnit",
"c": "NotatedMusic",
"d": "ManuscriptNotatedMusic",
"e": "Cartography",
Expand Down Expand Up @@ -315,12 +314,9 @@
"property": "issuanceType"
},
"[8]": {
"aboutEntity": "?record",
"link": "marc:typeOfControl",
"uriTemplate": "https://id.kb.se/marc/TypeOfControlType-{_}",
"matchUriToken": "^[a]$",
"fixedDefault": " ",
"TODO": "BF2: I - rdf:type - Archival"
"NOTE": "Type of control - # - No specified type (was marc:typeOfControl marc:TypeOfControlType-{_})",
"ignored": true,
"fixedDefault": " "
},
"[9]": {
"NOTE": "Character coding scheme - a - UCS/Unicode",
Expand Down Expand Up @@ -416,25 +412,6 @@
}
}
},
{
"name": "@type ArchivalUnit",
"originalLeader": "00887cbm a2200277 a 4500",
"source": {"leader": " cbm a a 4500", "fields": [{"001": "0000000"}]},
"result": {
"@type": "Record",
"@id": "http://libris.kb.se/bib/0000000",
"recordStatus": "marc:CorrectedOrRevised",
"descriptionConventions": [{"@id": "https://id.kb.se/marc/CatFormType-a"}],
"controlNumber": "0000000",
"encodingLevel": "marc:FullLevel",
"mainEntity": {
"@type": "Instance",
"issuanceType": "Monograph",
"@id": "http://libris.kb.se/resource/bib/0000000",
"instanceOf": {"@type": "ArchivalUnit"}
}
}
},
{
"name": "@type NotatedMusic",
"originalLeader": "00887ccm a2200277 a 4500",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* This removes marc:typeOfControl from all bib adminMetadata (4.9k+). Most are invalid values.
*
* See FMT-229 for more info.
*
*/

selectBySqlWhere("""
collection = 'bib' AND
data#>>'{@graph,0,marc:typeOfControl}' IS NOT NULL
""") { data ->

def (record, thing) = data.graph

record.remove('marc:typeOfControl')

data.scheduleSave()
}
Loading