Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1864-database #2053

Merged
merged 6 commits into from
Aug 15, 2024
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
29 changes: 20 additions & 9 deletions src/main/resources/alma/fix/mediumAndType.fix
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ end

paste("@leaderTyp+008","@leaderTyp","008", join_char:"")

# Collects Portfolio resource types
set_array("@PORtype")
do list(path: "POR ","var":"$i")
copy_field("$i.f","@PORtype.$append")
end

# medium (Mappings based on old ALEPH-morph, Introx Mapping and 050 Mapping from Verbund)
# https://service-wiki.hbz-nrw.de/display/VDBE/ALT+-+Mapping+MAB2+-+MARC+21+-++Segmente+0---%2C+001+-+088+-+Kurzform

Expand Down Expand Up @@ -398,6 +404,17 @@ end

# TODO: HT018860300 should also be tagged as Biography but it seems that 008 has no info for Biografie and is not transformed properly.

# type: "Database
if any_match("@leaderTyp+008", "(Continuing Resources)(.{21})d.*") # Pos21 # d - Updating database
add_field("type[].$append","Database")
elsif any_match("natureOfContent[].*.label", ".*[Da]tenbank.*")
add_field("type[].$append", "Database")
elsif any_equal("@PORtype","DATABASE")
add_field("type[].$append","Database")
elsif any_match("090 .g", "a")
add_field("type[].$append","Database")
end

# type: "EditedVolume"

if any_match("natureOfContent[].*.label", ".*Aufsatzsammlung.*")
Expand Down Expand Up @@ -571,15 +588,9 @@ elsif any_match("natureOfContent[].*.label", "(?i).*(Zeitschrift|Periodical).*")
add_field("type[].$append", "Periodical")
elsif any_equal("906", "JOURNAL")
add_field("type[].$append","Periodical")
else
set_array("@PORtype")
do list(path: "POR ","var":"$i")
copy_field("$i.f","@PORtype.$append")
end
if any_equal("@PORtype","JOURNAL")
unless any_equal("@PORtype","BOOK")
add_field("type[].$append","Periodical")
end
elsif any_equal("@PORtype","JOURNAL")
unless any_equal("@PORtype","BOOK")
add_field("type[].$append","Periodical")
end
end

Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/labels/context-labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -1012,5 +1012,11 @@
"name": "Thesis",
"multilangLabel": {},
"uri": "http://purl.org/ontology/bibo/Thesis"
},
{
"name": "Database",
"uri": "http://vivoweb.org/ontology/core#Database",
"label": "Datenbank",
"multilangLabel": {}
}
]
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/990133067580206441.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context" : "http://lobid.org/resources/context.jsonld",
"id" : "http://lobid.org/resources/990133067580206441#!",
"type" : [ "BibliographicResource", "Bibliography", "Periodical" ],
"type" : [ "BibliographicResource", "Bibliography", "Database", "Periodical" ],
"medium" : [ {
"label" : "Datenträger",
"id" : "http://rdaregistry.info/termList/RDAMediaType/1003"
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/schemas/type.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"Image",
"Map",
"Standard",
"MusicalRecording"
"MusicalRecording",
"Database"
]
}
}
Loading