-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmab2De-Sol1Holdings_seq.fix
36 lines (30 loc) · 1.58 KB
/
mab2De-Sol1Holdings_seq.fix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
# Lookup MMS Ids for the old HT Numbers or ZDB IDs.
copy_field("012.a","almaMmsId")
if any_match("almaMmsId","^[A-Z]{2}.*")
lookup("almaMmsId","hbzId2AlmaMmsId")
else
lookup("almaMmsId","zdbId2AlmaMmsId")
end
# Only create holdings for Records with ME as Format. The other are the local records.
# Each ME Record is one holding. They need to be aggregated.
# Holdings are created not as arrays but as objects,
# so that they can be combined into in hasItem in a later stage of the MF Workflow.do
if any_equal("FMT","ME")
set_hash("holding")
paste("holding.id","~http://lobid.org/items/", "almaMmsId", "~:DE-Sol1:", "001.a","~#!",join_char:"") # Checken ob 001 als Item Id genutzt werden soll.
copy_field("100.a","holding.callNumber")
set_array("holding.inCollection[]")
add_field("holding.inCollection[].$append.id", "http://lobid.org/organisations/DE-Sol1#!")
add_field("holding.inCollection[].$last.label", "Stadtarchiv Solingen, Bibliothek")
add_field("holding.heldBy.isil", "DE-Sol1")
add_field("holding.heldBy.id", "http://lobid.org/organisations/DE-Sol1#!")
add_field("holding.label", "Stadtarchiv Solingen, Bibliothek")
set_array("holding.type[]")
add_field("holding.type[].$append", "Item")
add_field("holding.type[].$append", "PhysicalObject") # Wie kann man andere Publikationstypen mappen?
end
retain("almaMmsId", "holding")