Skip to content
Merged
Changes from 1 commit
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
20 changes: 12 additions & 8 deletions middleware/scripts/publiso_conversor.jq
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"@id":
(if has("doi")
then "https://doi.org/" + .doi
else "https://repository.publisso.de/resource/" + .["@id"]
elif has("@id")
then "https://repository.publisso.de/resource/" + .["@id"]
else null
Comment thread
Zalfsten marked this conversation as resolved.
Outdated
end),
"name": (if has("title") then (.title[]) else null end),
"alternativeHeadline": (if has("alternative") then .alternative[0] else null end),
Expand All @@ -20,12 +22,14 @@
"url": ("https://doi.org/" + .doi)
}
else empty end),
{
"@type": "PropertyValue",
"propertyID": "frl-internal",
"value": .["@id"],
"url": ("https://repository.publisso.de/resource/" + .["@id"])
}
(if has("@id") then
{
"@type": "PropertyValue",
"propertyID": "frl-internal",
"value": .["@id"],
"url": ("https://repository.publisso.de/resource/" + .["@id"])
}
else empty end)
Comment thread
Zalfsten marked this conversation as resolved.
Outdated
]),

"creator":
Expand Down Expand Up @@ -79,7 +83,7 @@
],
"distribution":
[
(if has("hasPart") then (.hasPart[] | {"@type":"DataDownload", "@id": ("https://repository.publisso.de/resource/" + ."@id"), "name": .prefLabel}) else null end)
(if has("hasPart") then (.hasPart[] | {"@type":"DataDownload", "@id": (if has("@id") then "https://repository.publisso.de/resource/" + ."@id" else null end), "name": .prefLabel}) else null end)
Comment thread
Zalfsten marked this conversation as resolved.
Outdated
],
"inLanguage":
[
Expand Down