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

Make mapping for 856 less strict #2070 #2071

Merged
merged 3 commits into from
Sep 13, 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
6 changes: 3 additions & 3 deletions src/main/resources/alma/fix/identifiers.fix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ end
# 1. Indicator: 4 = HTTP
set_array("@urnLinks")

do list(path:"8564?", "var":"$i")
do list(path:"856??", "var":"$i")
if all_match("$i.u", "^http.*(urn=|\\.(org|de)/)urn:.+$") # This should ignore repository links like: https://sammlungen.ulb.uni-muenster.de/urn/urn:nbn:de:hbz:6-85659520092
copy_field("$i.u", "urn[].$append")
copy_field("$i.u", "@urnLinks.$append")
Expand Down Expand Up @@ -100,12 +100,12 @@ end
# Sometimes dois are not set in 024 then we could pick up the missing from 856.
# 856 - Electronic Location and Access (R) - Subfield: $u (R) $3 (NR)
# 1. Indicator: 4 = HTTP
do list(path:"8564?", "var":"$i")
do list(path:"856??", "var":"$i")
if all_match("$i.u", ".*doi.org.*(10\\.(\\d)+/(\\S)+).*") # Volltext
copy_field("$i.u", "doi[].$append")
replace_all("doi[].$last", ".*doi.org.*(10\\.(\\d)+/(\\S)+).*", "$1")
end
end
replace_all("doi[].*", ".*doi.org.*(10\\.(\\d)+/(\\S)+).*", "$1")
uniq("doi[]")

# 035 - System Control Number (R) - Subfield: $a (NR)
Expand Down
16 changes: 8 additions & 8 deletions src/main/resources/alma/fix/relatedRessourcesAndLinks.fix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ do list(path: "rpbId", "var": "$i")
end

# DBIS
do list(path: "8564?", "var":"$i")
do list(path: "856??", "var":"$i")
if exists("$i.u")
if all_match("$i.x", ".*DBIS.*")
copy_field("$i.u", "sameAs[].$append.id")
Expand Down Expand Up @@ -254,7 +254,7 @@ replace_all("secondaryForm[].*.id", "^\\(DE-600\\)(.*)$", "http://lobid.org/reso

set_array("tableOfContents[]")

do list(path: "8564?", "var":"$i")
do list(path: "856??", "var":"$i")
if all_match("$i.3", "^[Ii][Nn][Hh][aA][lL][tT][sS][vV].*") # Inhaltsverzeichnis
copy_field("$i.3", "tableOfContents[].$append.label")
copy_field("$i.u", "tableOfContents[].$last.id")
Expand All @@ -263,7 +263,7 @@ end

set_array("description[]")

do list(path: "8564?", "var":"$i")
do list(path: "856??", "var":"$i")
if all_match("$i.3", "^[Ii][Nn][Hh][aA][lL][tT][sS][tT].*") # Inhaltstext
copy_field("$i.3", "description[].$append.label")
copy_field("$i.u", "description[].$last.id")
Expand All @@ -272,7 +272,7 @@ end

set_array("seeAlso[]")

do list(path: "8564?", "var":"$i")
do list(path: "856??", "var":"$i")
if all_match("$i.3", "^[zZ][uU][sS].*") # Zusätzliche Angaben
copy_field("$i.3", "seeAlso[].$append.label")
copy_field("$i.u", "seeAlso[].$last.id")
Expand All @@ -281,7 +281,7 @@ end

set_array("fulltextOnline[]")

do list(path: "8564?", "var":"$i")
do list(path: "856??", "var":"$i")
if exists("$i.u")
unless any_match("$i.u",".*(doi.org|urn=urn:|\\.(org|de)/urn:).*") # This should not skip repository links like: https://sammlungen.ulb.uni-muenster.de/urn/urn:nbn:de:hbz:6-85659520092
if all_equal("$i.z", "kostenfrei") # kostenfrei, added Digitalisierung not only Verlag or Agentur as filter
Expand Down Expand Up @@ -439,7 +439,7 @@ end

# 856 - Electronic Location and Access (R) - Subfield: $x - Nonpublic note (R)
# TODO: Check if src/test/resources/alma-fix/(CKB)5280000000199164.xml is also an EZB titel even when it has no 865.
do list(path:"8564?", "var":"$i")
do list(path:"856??", "var":"$i")
if any_equal("$i.x","EZB") # can test x and x.*
add_field("inCollection[].$append.id", "http://lobid.org/resources/HT016356466#!")
add_field("inCollection[].$last.label", "Elektronische Zeitschriftenbibliothek (EZB)")
Expand All @@ -452,7 +452,7 @@ end

# edoweb

do list(path:"8564?", "var":"$i")
do list(path:"856??", "var":"$i")
if any_match("$i.u","^.*edoweb.*") # can test x and x.*
add_field("inCollection[].$append.id", "http://lobid.org/resources/HT016925914#!")
add_field("inCollection[].$last.label", "Edoweb Rheinland-Pfalz")
Expand All @@ -463,7 +463,7 @@ end


# TODO: AlephMorph checked for ellinet in "078r1.a" but publisso is also stated in the Link URI is that enough?
do list(path:"8564?", "var":"$i")
do list(path:"856??", "var":"$i")
if any_match("$i.u","^.*publisso.*") # can test x and x.*
add_field("inCollection[].$append.id", "http://repository.publisso.de")
add_field("inCollection[].$last.label", "Fachrepositorium Lebenswissenschaften")
Expand Down
Loading
Loading