Skip to content

Commit

Permalink
Adjust macro and fallback for provenance metadata #2106
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Jan 10, 2025
1 parent d80e576 commit 21e2186
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/main/resources/alma/fix/describedBy.fix
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,10 @@ add_array("describedBy.resultOf.object.modifiedBy[]")

end

call_macro("provenanceLinks",field: "describedBy.resultOf.object.sourceOrganization.id")
copy_field("describedBy.resultOf.object.sourceOrganization.id","describedBy.resultOf.object.sourceOrganization.label")
lookup("describedBy.resultOf.object.sourceOrganization.label","lobidOrgLabels",delete:"true")
call_macro("provenanceLinks",field: "describedBy.resultOf.object.provider.id")
copy_field("describedBy.resultOf.object.provider.id","describedBy.resultOf.object.provider.label")
lookup("describedBy.resultOf.object.provider.label","lobidOrgLabels",delete:"true")
call_macro("provenanceLinks",field: "describedBy.resultOf.object.sourceOrganization.id",label: "describedBy.resultOf.object.sourceOrganization.label")
call_macro("provenanceLinks",field: "describedBy.resultOf.object.provider.id",label: "describedBy.resultOf.object.provider.label")
do list(path:"describedBy.resultOf.object.modifiedBy[]","var":"$i")
call_macro("provenanceLinks",field: "$i.id")
copy_field("$i.id","$i.label")
call_macro("provenanceLinks",field: "$i.id",label:"$i.label")
end
lookup("describedBy.resultOf.object.modifiedBy[].*.label","lobidOrgLabels",delete:"true")

uniq("describedBy.resultOf.object.modifiedBy[]")
7 changes: 7 additions & 0 deletions src/main/resources/alma/fix/macros.fix
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,13 @@ do put_macro("provenanceLinks")
end
prepend("$[field]", "http://lobid.org/organisations/")
append("$[field]", "#!")
copy_field("$[field]","$[label]")
lookup("$[label]","lobidOrgLabels",delete:"true")
unless exists("$[label]")
if any_contain("$[field]","lobid")
add_field("$[label]","lobid Organisation")
end
end
end


Expand Down

0 comments on commit 21e2186

Please sign in to comment.