Skip to content

Commit

Permalink
Merge pull request #338 from libris/feature/authFixedFields
Browse files Browse the repository at this point in the history
Feature/auth fixed fields
  • Loading branch information
klngwll committed May 20, 2019
2 parents 6219c71 + ab7385e commit aa66249
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 16 deletions.
1 change: 1 addition & 0 deletions librisxl-tools/scripts/example_records.tsv
Expand Up @@ -96,6 +96,7 @@ auth/208571 Anders Svensson
auth/213488 Anders Svensson
auth/7673399 Anders Svensson
auth/382890 Anders Svensson
auth/173190 sao - underindelning, i litteraturen

auth/196943 Platon
auth/184982 Eliot T.S.
Expand Down
175 changes: 159 additions & 16 deletions whelk-core/src/main/resources/ext/marcframe.json
Expand Up @@ -15957,12 +15957,16 @@
"fixedDefault": "z"
},
"[7]": null,
"[8]": null,
"[17]": {
"aboutEntity": "?record",
"property": "encodingLevel",
"tokenMap": "AuthorityEncLevelType"
},
"TODO:[18:19]": "NEW: Punctuation policy",
"[18]": {
"fixedDefault": " "
},
"[19]": null,
"_spec": [
{
"originalLeader": "01341cz a2200397n 4500",
Expand Down Expand Up @@ -16012,16 +16016,18 @@
"matchUriToken": "^[abcdefg]$"
},
"[8]": {
"TODO": "Remove when not in records anymore. Also delete terms from vocab",
"aboutEntity": "?record",
"link": "marc:languageOfCatalog",
"uriTemplate": "https://id.kb.se/marc/LanguageOfCatalogType-{_}",
"matchUriToken": "^[bef]$"
"matchUriToken": "^[bef]$",
"fixedDefault": " "
},
"[9]": {
"aboutEntity": "?record",
"link": "marc:kindOfRecord",
"uriTemplate": "https://id.kb.se/marc/KindOfRecordType-{_}",
"matchUriToken": "^[abcdefg]$"
"matchUriToken": "^[abdefg]$"
},
"[10]": {
"aboutEntity": "?record",
Expand All @@ -16048,6 +16054,16 @@
"uriTemplate": "https://id.kb.se/marc/NumberedSeriesType-{_}",
"matchUriToken": "^[abc]$"
},
"[14]": {
"aboutEntity": "?record",
"property": "marc:headingMain",
"tokenMap": {"a": true, "b": false}
},
"[15]": {
"aboutEntity": "?record",
"property": "marc:headingSubject",
"tokenMap": {"a": true, "b": false}
},
"[16]": {
"aboutEntity": "?record",
"property": "marc:headingSeries",
Expand All @@ -16059,6 +16075,7 @@
"uriTemplate": "https://id.kb.se/marc/SubjectSubdivisionType-{_}",
"matchUriToken": "^[abcde]$"
},
"[18:28]": null,
"[28]": {
"aboutEntity": "?record",
"link": "marc:govtAgency",
Expand All @@ -16071,6 +16088,7 @@
"uriTemplate": "https://id.kb.se/marc/ReferenceType-{_}",
"matchUriToken": "^[ab]$"
},
"[30]": null,
"[31]": {
"aboutEntity": "?record",
"link": "marc:recordUpdate",
Expand All @@ -16089,28 +16107,153 @@
"uriTemplate": "https://id.kb.se/marc/LevelType-{_}",
"matchUriToken": "^[abcd]$"
},
"[34:38]": null,
"[38]": {
"aboutEntity": "?record",
"link": "marc:modifiedRecord",
"uriTemplate": "https://id.kb.se/marc/ModifiedRecordType-{_}"
"uriTemplate": "https://id.kb.se/marc/ModifiedRecordType-{_}",
"matchUriToken": "^[sx]$"
},
"[39]": {
"aboutEntity": "?record",
"link": "marc:catalogingSource",
"uriTemplate": "https://id.kb.se/marc/CatalogingSourceType-{_}"
},
"[14]": {
"aboutEntity": "?record",
"property": "marc:headingMain",
"tokenMap": {"a": true, "b": false}
},
"[15]": {
"aboutEntity": "?record",
"property": "marc:headingSubject",
"fixedDefault": "a",
"tokenMap": {"a": true, "b": false}
},
"repeatable": false
"repeatable": false,
"_spec": [
{
"name": "Person - Astrid Lindgren (71639)",
"source": [
{"008": "011206n| ac|nnaabn |n aa "}
],
"normalized": [
{"008": "011206|| ac|||aa|| || aa| ||"}
],
"result": {
"@type": "Record",
"@id": "http://libris.kb.se/auth/140482",
"controlNumber": "140482",
"encodingLevel": "marc:CompleteAuthorityRecord",
"recordStatus": "marc:CorrectedOrRevised",
"created": "2001-12-06T00:00:00.0+01:00",
"descriptionConventions": [{ "@id": "https://id.kb.se/marc/CatalogingRulesType-c" }],
"marc:headingMain": true,
"marc:headingSubject" : true,
"marc:kindOfRecord" : {"@id" : "https://id.kb.se/marc/KindOfRecordType-a"},
"marc:numberedSeries" : {"code" : "n"},
"marc:personalName": {"@id": "https://id.kb.se/marc/PersonalNameType-a"},
"marc:recordUpdate": {"@id": "https://id.kb.se/marc/RecordUpdateType-a"},
"marc:reference": {"code": "n"},
"marc:subdivision" : {"code" : "n"},
"marc:subjectSubdivision": {"code": "n"},
"marc:typeOfSeries" : {"code" : "n"},
"mainEntity": { }
},
"addOnRevert": {
"mainEntity": {"@type": "Person"}
}
},
{
"name": "Organization - Riksarkivet (201454)",
"source": [
{"008": "011206n| ac|nnaabn fn ana "}
],
"normalized": [
{"008": "011206|| ac|||aa|| f| a|a ||"}
],
"result": {
"@type": "Record",
"@id": "http://libris.kb.se/auth/140482",
"controlNumber": "140482",
"encodingLevel": "marc:CompleteAuthorityRecord",
"recordStatus": "marc:CorrectedOrRevised",
"created": "2001-12-06T00:00:00.0+01:00",
"descriptionConventions": [{ "@id": "https://id.kb.se/marc/CatalogingRulesType-c" }],
"marc:govtAgency" : {"@id" : "https://id.kb.se/marc/GovtAgencyType-f"},
"marc:headingMain": true,
"marc:headingSubject" : true,
"marc:kindOfRecord" : {"@id" : "https://id.kb.se/marc/KindOfRecordType-a"},
"marc:level" : {"@id" : "https://id.kb.se/marc/LevelType-a"},
"marc:numberedSeries" : {"code" : "n"},
"marc:personalName": {"code" : "n"},
"marc:recordUpdate": {"@id": "https://id.kb.se/marc/RecordUpdateType-a"},
"marc:reference": {"code": "n"},
"marc:subdivision" : {"code" : "n"},
"marc:subjectSubdivision": {"code": "n"},
"marc:typeOfSeries" : {"code" : "n"},
"mainEntity": { }
},
"addOnRevert": {
"mainEntity": {"@type": "Organization"}
}
},
{
"name": "Topic - Hästar (71639)",
"source": [
{"008": "020409 | anznnbabn |n ana "}
],
"normalized": [
{"008": "020409|| a|||||a|| || a|a ||"}
],
"result": {
"@type": "Record",
"@id": "http://libris.kb.se/auth/140482",
"controlNumber": "140482",
"encodingLevel": "marc:CompleteAuthorityRecord",
"recordStatus": "marc:CorrectedOrRevised",
"created": "2002-04-09T00:00:00.0+02:00",
"descriptionConventions": [{"code": "n"}],
"marc:headingSubject": true,
"marc:level": {"@id": "https://id.kb.se/marc/LevelType-a"},
"marc:numberedSeries" : {"code" : "n"},
"marc:kindOfRecord" : {"@id" : "https://id.kb.se/marc/KindOfRecordType-a"},
"marc:personalName": {"code": "n"},
"marc:recordUpdate": {"@id": "https://id.kb.se/marc/RecordUpdateType-a"},
"marc:reference": {"code": "n"},
"marc:subjectSubdivision": {"code": "n"},
"marc:subjectHeading": {"code": "z"},
"marc:typeOfSeries" : {"code" : "n"},
"mainEntity": { }
},
"addOnRevert": {
"mainEntity": {"@type": "Topic"}
}
},
{
"name": "Work - Antikrists mirakler (340686)",
"source": [
{"008": "110119nb ac|nnaaba n aaa "}
],
"normalized": [
{"008": "110119|b ac|||aa|a || aaa ||"}
],
"result": {
"@type": "Record",
"@id": "http://libris.kb.se/auth/140482",
"controlNumber": "140482",
"encodingLevel": "marc:CompleteAuthorityRecord",
"recordStatus": "marc:CorrectedOrRevised",
"created": "2011-01-19T00:00:00.0+01:00",
"descriptionConventions": [{"@id": "https://id.kb.se/marc/CatalogingRulesType-c"}],
"marc:headingMain": true,
"marc:headingSubject": true,
"marc:level": {"@id": "https://id.kb.se/marc/LevelType-a"},
"marc:numberedSeries" : {"code" : "n"},
"marc:kindOfRecord" : {"@id" : "https://id.kb.se/marc/KindOfRecordType-a"},
"marc:personalName": {"@id": "https://id.kb.se/marc/PersonalNameType-a"},
"marc:recordUpdate": {"@id": "https://id.kb.se/marc/RecordUpdateType-a"},
"marc:reference": {"code": "n"},
"marc:romanization": {"@id": "https://id.kb.se/marc/RomanizationType-b"},
"marc:subdivision": {"code": "n"},
"marc:subjectSubdivision": {"@id": "https://id.kb.se/marc/SubjectSubdivisionType-a"},
"marc:typeOfSeries" : {"code" : "n"},
"mainEntity": { }
},
"addOnRevert": {
"mainEntity": {"@type": "Work"}
}
}
]
},

"010": {
Expand Down

0 comments on commit aa66249

Please sign in to comment.