Skip to content
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
7 changes: 7 additions & 0 deletions src/main/resources/alma/alma.fix
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ retain(
"alternativeTitle[]",
"bibliographicCitation",
"bibliographicLevel",
"bszId",
"bvbId",
"describedBy",
"description[]",
"disambiguatingDescription[]",
Expand All @@ -107,22 +109,27 @@ retain(
"edition[]",
"exampleOfWork",
"fulltextOnline[]",
"gbvId",
"hasItem[]",
"secondaryForm[]",
"hebisId",
"hbzId",
"id",
"inCollection[]",
"isbn[]",
"issn[]",
"ismn[]",
"isPartOf[]",
"k10PlusId",
"kobvId",
"language[]",
"langNote[]",
"license[]",
"manufacture[]",
"medium[]",
"natureOfContent[]",
"note[]",
"obvId",
"oclcNumber[]",
"otherTitleInformation[]",
"publication[]",
Expand Down
80 changes: 79 additions & 1 deletion src/main/resources/alma/fix/identifiers.fix
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,41 @@ do list(path:"035 ", "var":"$i")
copy_field("$i.a", "dnbId")
end
end
unless exists("bszId")
if all_match("$i.a", "\\(DE-576\\).*?")
copy_field("$i.a", "bszId")
end
end
unless exists("gbvId")
if all_match("$i.a", "\\(DE-601\\).*?")
copy_field("$i.a", "gbvId")
end
end
unless exists("kobvId")
if all_match("$i.a", "\\(DE-602\\).*?")
copy_field("$i.a", "kobvId")
end
end
unless exists("k10PlusId")
if all_match("$i.a", "\\(DE-627\\)\\d{8,9}[0-9X]")
copy_field("$i.a", "k10PlusId")
end
end
unless exists("bvbId")
if all_match("$i.a", "\\((DE-604)\\)BV\\d{9}")
copy_field("$i.a", "bvbId")
end
end
unless exists("hebisId")
if all_match("$i.a", "\\((DE-603)\\)\\d{9,10}")
copy_field("$i.a", "hebisId")
end
end
unless exists("obvId")
if all_match("$i.a", "\\((AT-OBV)\\)AC[\\d]{8}")
copy_field("$i.a", "obvId")
end
end
end

#160 - 016 - National Bibliographic Agency Control Number (R)
Expand All @@ -167,14 +202,57 @@ do list(path:"0167 ", "var":"$i")
end
end

# clean up ZDB & DNB id
# DE-599 as fallback
do list(path:"035 ", "var":"$i")
if all_match("$i.a", "\\(DE-599\\)BSZ.*?")
unless exists("bszId")
copy_field("$i.a", "bszId")
end
elsif all_match("$i.a", "\\(DE-599\\)GBV.*?")
unless exists("gbvId")
copy_field("$i.a", "gbvID")
end
elsif all_match("$i.a", "\\(DE-599\\)OBV.*?")
unless exists("obvId")
copy_field("$i.a", "obvId")
end
elsif all_match("$i.a", "\\(DE-599\\)HEB.*?")
unless exists("hebisId")
copy_field("$i.a", "hebisId")
end
elsif all_match("$i.a", "\\(DE-599\\)BVB.*?")
unless exists("bvbId")
copy_field("$i.a", "bvbId")
end
elsif all_match("$i.a", "\\(DE-599\\)KXP.*?")
unless exists("k10PlusId")
copy_field("$i.a", "k10PlusId")
end
end
end

# clean up ZDB & DNB id & unioncatalogie ids
replace_all("zdbId", "\\(DE-600\\)","")
replace_all("zdbId", "\\(DE-599\\)ZDB","")
replace_all("zdbId", "(\\d{1,7})-* ?-*([Xx\\d])","$1-$2") # CZ entries have incorrect whitespaces sometimes in the zdbId, we need to adjust them so only one "-" separates the first group of numbers from the last number.
unless any_match("zdbId","\\d{1,7}-[Xx\\d]")
remove_field("zdbId")
end
replace_all("dnbId", "\\(DE-101\\)","")
replace_all("gbvId", "\\(DE-601\\)","")
replace_all("gbvId", "\\(DE-599\\)GBV","")
replace_all("bszId", "\\(DE-576\\)","")
replace_all("bszId", "\\(DE-599\\)BSZ","")
replace_all("bvbId", "\\(DE-604\\)","")
replace_all("bvbId", "\\(DE-599\\)BVB","")
replace_all("kobvId", "\\(DE-602\\)","")
replace_all("k10PlusId", "\\(DE-627\\)","")
replace_all("k10PlusId", "\\(DE-599\\)KXP","")
replace_all("hebisId", "\\(DE-603\\)","")
replace_all("hebisId", "\\(DE-599\\)HEB","")
replace_all("obvId", "\\(AT-OBV\\)","")
replace_all("obvId", "\\(599\\)OBV","")


copy_field("almaMmsId","rpbId")
lookup("rpbId","almaMmsId2rpbId",delete:"true")
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/alma-fix/990173607780206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"deprecatedUri" : "http://lobid.org/resources/HT015844659#!",
"isbn" : [ "1553651006", "9781553651000", "1553651332", "9781553651338" ],
"oclcNumber" : [ "315766831" ],
"bszId" : "262030039",
"otherTitleInformation" : [ "Painting toward the light [published on the occasion of David Milne Watercolours: Painting toward Light, the exhibition organized and circulated by the Art Gallery of Ontario, ... coincide with exhibitions held at the British Museum in London, July 7 - Sept. 25, 2005, the Metropolitan Museum of Art, New York, Nov. 8, 2005 - Jan. 29, 2006, and the Art Gallery of Ontario, Toronto, Feb. 25 - May 21, 2006]" ],
"publication" : [ {
"dateStatement" : "2005",
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/alma-fix/990177418660206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"deprecatedUri" : "http://lobid.org/resources/TT050372336#!",
"isbn" : [ "3628748178", "9783628748172" ],
"oclcNumber" : [ "838434577" ],
"gbvId" : "NLM003558266",
"otherTitleInformation" : [ "worin sie unter d. Nahmen Hagiophilae angeführet wird, ihr tägl. Leben nach gegründeter Vollkommenheit einzurichten ." ],
"edition" : [ "3. Dr., verm. u. außgebessert" ],
"publication" : [ {
Expand Down
217 changes: 217 additions & 0 deletions src/test/resources/alma-fix/990183146600206441.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
{
"@context" : "http://lobid.org/resources/context.jsonld",
"id" : "http://lobid.org/resources/990183146600206441#!",
"type" : [ "BibliographicResource", "Book" ],
"medium" : [ {
"label" : "Print",
"id" : "http://rdaregistry.info/termList/RDAproductionMethod/1010"
} ],
"title" : "The flavour thesaurus",
"almaMmsId" : "990183146600206441",
"hbzId" : "HT016612887",
"deprecatedUri" : "http://lobid.org/resources/HT016612887#!",
"isbn" : [ "9780747599777", "0747599777" ],
"oclcNumber" : [ "961276213" ],
"obvId" : "AC11843242",
"otherTitleInformation" : [ "pairings, recipes and ideas for the creative cook" ],
"publication" : [ {
"dateStatement" : "2010",
"startDate" : "2010",
"type" : [ "PublicationEvent" ],
"location" : [ "London [u.a.]" ],
"publishedBy" : [ "Bloomsbury" ]
} ],
"describedBy" : {
"id" : "http://lobid.org/resources/990183146600206441",
"label" : "Webseite der hbz-Ressource 990183146600206441",
"type" : [ "BibliographicDescription" ],
"inDataset" : {
"id" : "http://lobid.org/resources/dataset#!",
"label" : "lobid-resources – Der hbz-Verbundkatalog als Linked Open Data"
},
"resultOf" : {
"type" : [ "CreateAction" ],
"endTime" : "0000-00-00T00:00:00",
"instrument" : {
"id" : "https://github.com/hbz/lobid-resources",
"type" : [ "SoftwareApplication" ],
"label" : "Software lobid-resources"
},
"object" : {
"id" : "https://lobid.org/marcxml/990183146600206441",
"dateCreated" : "2010-12-02",
"dateModified" : "2026-02-15",
"type" : [ "DataFeedItem" ],
"label" : "hbz-Ressource 990183146600206441 im Exportformat MARC21 XML",
"inDataset" : {
"id" : "https://datahub.io/dataset/hbz_unioncatalog",
"label" : "hbz_unioncatalog"
},
"sourceOrganization" : {
"id" : "http://lobid.org/organisations/DE-836#!",
"label" : "FH Münster, Hochschulbibliothek"
},
"provider" : {
"id" : "http://lobid.org/organisations/DE-101#!",
"label" : "Deutsche Nationalbibliothek"
},
"modifiedBy" : [ {
"id" : "http://lobid.org/organisations/DE-605#!",
"label" : "hbz - Hochschulbibliothekszentrum des Landes Nordrhein-Westfalen"
} ]
}
},
"license" : [ {
"id" : "http://creativecommons.org/publicdomain/zero/1.0",
"label" : "Creative Commons-Lizenz CC0 1.0 Universal"
} ]
},
"subject" : [ {
"type" : [ "Concept" ],
"source" : {
"label" : "Library of Congress Subject Headings",
"id" : "https://id.loc.gov/authorities/subjects.html"
},
"label" : "Cooking."
}, {
"type" : [ "ComplexSubject" ],
"label" : "Speise | Zutat | Aroma | Kombination | Thesaurus",
"componentList" : [ {
"type" : [ "SubjectHeading" ],
"label" : "Speise",
"source" : {
"label" : "Gemeinsame Normdatei (GND)",
"id" : "https://d-nb.info/gnd/7749153-1"
},
"id" : "https://d-nb.info/gnd/4136283-4",
"gndIdentifier" : "4136283-4",
"altLabel" : [ "Essen (Zubereitetes Lebensmittel)", "Gericht (Hauswirtschaft)", "Kost" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Zutat",
"source" : {
"label" : "Gemeinsame Normdatei (GND)",
"id" : "https://d-nb.info/gnd/7749153-1"
},
"id" : "https://d-nb.info/gnd/4529758-7",
"gndIdentifier" : "4529758-7",
"altLabel" : [ "Lebensmittel / Zutat", "Lebensmittelzutat" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Aroma",
"source" : {
"label" : "Gemeinsame Normdatei (GND)",
"id" : "https://d-nb.info/gnd/7749153-1"
},
"id" : "https://d-nb.info/gnd/4137070-3",
"gndIdentifier" : "4137070-3",
"altLabel" : [ "Flavor", "Flavour (Lebensmittel)", "Aromen" ]
}, {
"type" : [ "SubjectHeading" ],
"label" : "Kombination",
"source" : {
"label" : "Gemeinsame Normdatei (GND)",
"id" : "https://d-nb.info/gnd/7749153-1"
},
"id" : "https://d-nb.info/gnd/4319923-9",
"gndIdentifier" : "4319923-9"
}, {
"type" : [ "SubjectHeading" ],
"label" : "Thesaurus",
"source" : {
"label" : "Gemeinsame Normdatei (GND)",
"id" : "https://d-nb.info/gnd/7749153-1"
},
"id" : "https://d-nb.info/gnd/4185172-9",
"gndIdentifier" : "4185172-9",
"altLabel" : [ "Deskriptorsprache", "Deskriptor / Verzeichnis" ]
} ]
} ],
"subjectslabels" : [ "Cooking.", "Speise", "Zutat", "Aroma", "Kombination", "Thesaurus" ],
"hasItem" : [ {
"label" : "lobid Bestandsressource",
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "RSGT 12",
"serialNumber" : "0213087",
"currentLibrary" : "FHMF",
"currentLocation" : "Freihand_F",
"heldBy" : {
"isil" : "DE-836",
"id" : "http://lobid.org/organisations/DE-836#!",
"label" : "FH Münster, Hochschulbibliothek"
},
"seeAlso" : [ "https://fhb-muenster.digibib.net/search/katalog/record/(DE-605)HT016612887" ],
"inCollection" : [ {
"id" : "http://lobid.org/organisations/DE-836#!",
"label" : "FH Münster, Hochschulbibliothek",
"type" : [ "Collection" ]
} ],
"id" : "http://lobid.org/items/990183146600206441:DE-836:2332189160006485#!"
}, {
"label" : "lobid Bestandsressource",
"type" : [ "Item", "PhysicalObject" ],
"callNumber" : "51 RSE 51",
"serialNumber" : "51 RSE 51",
"currentLibrary" : "BOX",
"currentLocation" : "TZA_Frei",
"heldBy" : {
"isil" : "DE-A96",
"id" : "http://lobid.org/organisations/DE-A96#!",
"label" : "Hochschulbibliothek der Fachhochschule Aachen"
},
"seeAlso" : [ "https://fhb-aachen.digibib.net/search/katalog/record/(DE-605)HT016612887" ],
"inCollection" : [ {
"id" : "http://lobid.org/organisations/DE-A96#!",
"label" : "Hochschulbibliothek der Fachhochschule Aachen",
"type" : [ "Collection" ]
} ],
"id" : "http://lobid.org/items/990183146600206441:DE-A96:23102165180006444#!"
} ],
"sameAs" : [ {
"id" : "https://hub.culturegraph.org/resource/(DE-605)990183146600206441",
"label" : "Culturegraph-Ressource"
}, {
"id" : "http://worldcat.org/oclc/961276213",
"label" : "OCLC-Ressource"
} ],
"tableOfContents" : [ {
"label" : "Inhaltsverzeichnis",
"id" : "https://digitale-objekte.hbz-nrw.de/storage/2012/12/06/file_137/4840230.pdf"
} ],
"inCollection" : [ {
"id" : "https://nrw.digibib.net/search/hbzvk/",
"label" : "DigiBib hbz Verbundkatalog",
"type" : [ "Collection" ]
}, {
"id" : "http://lobid.org/organisations/DE-655#!",
"label" : "hbz - Hochschulbibliothekszentrum des Landes Nordrhein-Westfalen, Netzwerkzone",
"type" : [ "Collection" ]
}, {
"id" : "https://lobid.org/collections#nrwLastCopies",
"label" : "nrwLastCopies",
"type" : [ "Collection" ]
} ],
"language" : [ {
"id" : "http://id.loc.gov/vocabulary/iso639-2/eng",
"label" : "Englisch"
} ],
"extent" : "399 S. : graph. Darst. ; 23 cm",
"bibliographicLevel" : {
"label" : "Monograph/Item",
"id" : "https://www.loc.gov/marc/bibliographic/bdleader.html#Monograph_Item"
},
"responsibilityStatement" : [ "Niki Segnit" ],
"contribution" : [ {
"agent" : {
"gndIdentifier" : "1015425674",
"id" : "https://d-nb.info/gnd/1015425674",
"label" : "Segnit, Niki",
"type" : [ "Person" ]
},
"role" : {
"id" : "http://id.loc.gov/vocabulary/relators/aut",
"label" : "Autor/in"
},
"type" : [ "Contribution" ]
} ]
}
Loading
Loading