Skip to content

Commit

Permalink
Remove redundant code (#1823)
Browse files Browse the repository at this point in the history
  • Loading branch information
Petra Maier committed Feb 15, 2024
1 parent d05f66f commit d3bcd0c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 23 deletions.
13 changes: 0 additions & 13 deletions src/main/resources/alma/fix/otherFields.fix
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,6 @@ end
lookup("language[].*.label","ISO639-2-to-GND")
prepend("language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/")

unless exists("130??|240??")
set_array("lang_temp")
copy_field("041[ 01] .[hk]", "lang_temp.$append")
set_array("exampleOfWork.language[]")
do list(path:"lang_temp", "var": "$i")
copy_field("$i","exampleOfWork.language[].$append.id")
copy_field("$i","exampleOfWork.language[].$last.label")
end
lookup("exampleOfWork.language[].*.label","ISO639-2-to-GND")
prepend("exampleOfWork.language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/")
end


# 300 - Physical Description (R)
# We reuse the introx transformation here.

Expand Down
20 changes: 10 additions & 10 deletions src/main/resources/alma/fix/relatedRessourcesAndLinks.fix
Original file line number Diff line number Diff line change
Expand Up @@ -612,17 +612,17 @@ end
replace_all("exampleOfWork.label","<<|>>","")

# 041 h|k - Language code of original and/or intermediate translations of text
if exists("130??|240??")
set_array("lang_temp")
copy_field("041[ 01] .[hk]", "lang_temp.$append")
set_array("exampleOfWork.language[]")
do list(path:"lang_temp", "var": "$i")
copy_field("$i","exampleOfWork.language[].$append.id")
copy_field("$i","exampleOfWork.language[].$last.label")
end
lookup("exampleOfWork.language[].*.label","ISO639-2-to-GND")
prepend("exampleOfWork.language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/")

set_array("lang_temp")
copy_field("041[ 01] .[hk]", "lang_temp.$append")
set_array("exampleOfWork.language[]")
do list(path:"lang_temp", "var": "$i")
copy_field("$i","exampleOfWork.language[].$append.id")
copy_field("$i","exampleOfWork.language[].$last.label")
end
lookup("exampleOfWork.language[].*.label","ISO639-2-to-GND")
prepend("exampleOfWork.language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/")



# following only with second indicator 2 for analytical entries:
Expand Down

0 comments on commit d3bcd0c

Please sign in to comment.