Skip to content

Commit

Permalink
Use almaMmsId mapping for hasItem.id #1
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Dec 18, 2024
1 parent 4730836 commit bc2e9f5
Show file tree
Hide file tree
Showing 2 changed files with 1,256 additions and 1,244 deletions.
14 changes: 13 additions & 1 deletion mab2De-Sol1Holdings_seq.fix
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
do once("maps")
put_filemap("map/identifier.tsv","hbzId2AlmaMmsId", sep_char:"\t",key_column:"1",value_column:"0",expected_columns:"-1")
put_filemap("map/identifier.tsv","zdbId2AlmaMmsId", sep_char:"\t",key_column:"2",value_column:"0",expected_columns:"-1")
end

copy_field("012.a","almaMmsId")
if any_match("almaMmsId","^[A-Z]{2}.*")
lookup("almaMmsId","hbzId2AlmaMmsId")
else
lookup("almaMmsId","zdbId2AlmaMmsId")
end

set_array("hasItem[]")
set_hash("hasItem[].$append")
paste("hasItem[].$last.id","~http://lobid.org/items/", "~ALMAMMSIDMUSSGEMAPPTWERDEN", "~:","~ITEMMMSIDMUSSERSETZTWERDEN","~#!",join_char:"")
paste("hasItem[].$last.id","~http://lobid.org/items/", "almaMmsId", "~:","~ITEMMMSIDMUSSERSETZTWERDEN","~#!",join_char:"")
copy_field("100.a","hasItem[].$last.callNumber")
set_array("hasItem[].$last.inCollection[]")
add_field("hasItem[].$last.inCollection[].$append.id", "http://lobid.org/organisations/DE-Sol1#!")
Expand Down
Loading

0 comments on commit bc2e9f5

Please sign in to comment.