Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 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
44 changes: 43 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,21 @@ do list(path:"0167 ", "var":"$i")
end
end

# clean up ZDB & DNB id
# 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("bszId", "\\(DE-576\\)","")
replace_all("bvbId", "\\(DE-604\\)","")
replace_all("kobvId", "\\(DE-602\\)","")
replace_all("k10PlusId", "\\(DE-627\\)","")
replace_all("hebisId", "\\(DE-603\\)","")
replace_all("obvId", "\\(AT-OBV\\)","")

copy_field("almaMmsId","rpbId")
lookup("rpbId","almaMmsId2rpbId",delete:"true")
Expand Down
36 changes: 36 additions & 0 deletions src/main/resources/alma/fix/relatedRessourcesAndLinks.fix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,42 @@ do list(path: "dnbId", "var": "$i")
add_field("sameAs[].$last.label","DNB-Ressource")
end

# bvb

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As written in another comment, we should leave out sameAs for now.

do list(path: "bvbId", "var": "$i")
paste("sameAs[].$append.id","~https://gateway-bayern.de/", "$i", join_char:"")
add_field("sameAs[].$last.label","BVB-Ressource")
end

# kobv
do list(path: "kobvId", "var": "$i")
paste("sameAs[].$append.id","~https://portal.kobv.de/uid.do?query=", "$i", "~&index=internal&plv=2", join_char:"")
add_field("sameAs[].$last.label","kobv-Ressource")
end

# k10Plus
do list(path: "kobvId", "var": "$i")
paste("sameAs[].$append.id","~https://opac.k10plus.de/DB=2.299/PPNSET?PPN=", "$i", "~&PRS=HOL&INDEXSET=21", join_char:"")
add_field("sameAs[].$last.label","K10plus-Ressource")
end

# k10Plus
do list(path: "k10PlusId", "var": "$i")
paste("sameAs[].$append.id","~https://opac.k10plus.de/DB=2.299/PPNSET?PPN=", "$i", "~&PRS=HOL&INDEXSET=21", join_char:"")
add_field("sameAs[].$last.label","K10plus-Ressource")
end

# hebis
do list(path: "hebisId", "var": "$i")
paste("sameAs[].$append.id","~http://cbsopac.rz.uni-frankfurt.de/DB=2.1/PPNSET?PPN=", "$i", join_char:"")
add_field("sameAs[].$last.label","hebis-Ressource")
end

# obv
do list(path: "obvId", "var": "$i")
paste("sameAs[].$append.id","~https://permalink.obvsg.at/", "$i", join_char:"")
add_field("sameAs[].$last.label","obv-Ressource")
end

# rpb
do list(path: "rpbId", "var": "$i")
paste("sameAs[].$append.id","~https://rpb.lbz-rlp.de/", "$i",join_char:"")
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
220 changes: 220 additions & 0 deletions src/test/resources/alma-fix/990183146600206441.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
{
"@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"
}, {
"id" : "https://permalink.obvsg.at/AC11843242",
"label" : "obv-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