|
1 | | -..[] | { |
| 1 | +.[] | { |
2 | 2 | "@context": { |
3 | 3 | "@language": "en", |
4 | 4 | "@vocab":"https://schema.org/"}, |
5 | 5 | "@type": "Dataset", |
6 | | - "@id": ("https://doi.org/" + .doi), |
| 6 | + "@id": |
| 7 | + (if has("doi") |
| 8 | + then "https://doi.org/" + .doi |
| 9 | + else "https://repository.publisso.de/resource/" + .["@id"] |
| 10 | + end), |
7 | 11 | "name": (if has("title") then (.title[]) else null end), |
8 | 12 | "alternativeHeadline": (if has("alternative") then .alternative[0] else null end), |
9 | 13 | "description": (if has("description") then (.description[]) else null end), |
10 | | - "identifier": (if has("doi") then (.doi | {"@type":"PropertyValue", "value":., "propertyID": "https://registry.identifiers.org/registry/doi", "url": ("https://doi.org/" + .)}) else null end), |
11 | | - "creator": |
12 | | - [ |
13 | | - |
14 | | - (if has("creator") then |
15 | | - (.creator[] |
16 | | - | { |
17 | | - "@type": "Person", |
18 | | - "familyName": (.prefLabel | split(", ")[0]), |
19 | | - "givenName": (.prefLabel | split(", ")[1: ] | join(" ")), |
20 | | - "identifier": ."@id" |
| 14 | + "identifier": ([ |
| 15 | + (if has("doi") then |
| 16 | + { |
| 17 | + "@type": "PropertyValue", |
| 18 | + "propertyID": "https://registry.identifiers.org/registry/doi", |
| 19 | + "value": .doi, |
| 20 | + "url": ("https://doi.org/" + .doi) |
| 21 | + } |
| 22 | + else empty end), |
| 23 | + { |
| 24 | + "@type": "PropertyValue", |
| 25 | + "propertyID": "frl-internal", |
| 26 | + "value": .["@id"], |
| 27 | + "url": ("https://repository.publisso.de/resource/" + .["@id"]) |
21 | 28 | } |
22 | | - ) |
23 | | - else null end) |
24 | | - ], |
| 29 | + ]), |
| 30 | + |
| 31 | + "creator": |
| 32 | + [ |
| 33 | + (if has("creator") then |
| 34 | + (.creator[] |
| 35 | + | { |
| 36 | + "@type": "Person", |
| 37 | + "familyName": (.prefLabel | split(", ")[0]), |
| 38 | + "givenName": (.prefLabel | split(", ")[1: ] | join(" ")), |
| 39 | + "identifier": ."@id" |
| 40 | + } |
| 41 | + ) |
| 42 | + else null end) |
| 43 | + ], |
25 | 44 | "contributor": |
26 | 45 | [ |
27 | | - (if has("contributor") then |
28 | | - (.contributor[] |
29 | | - | { |
30 | | - "@type": "Person", |
31 | | - "familyName": (.prefLabel | split(", ")[0]), |
32 | | - "givenName": (.prefLabel | split(", ")[1: ] | join(" ")), |
33 | | - "identifier": ."@id" |
34 | | - } |
35 | | - ) |
36 | | - else null end) |
37 | | -], |
| 46 | + (if has("contributor") then |
| 47 | + (.contributor[] |
| 48 | + | { |
| 49 | + "@type": "Person", |
| 50 | + "familyName": (.prefLabel | split(", ")[0]), |
| 51 | + "givenName": (.prefLabel | split(", ")[1: ] | join(" ")), |
| 52 | + "identifier": ."@id" |
| 53 | + } |
| 54 | + ) |
| 55 | + else null end) |
| 56 | + ], |
38 | 57 | "sourceOrganization": |
39 | 58 | [ |
40 | 59 | (if has("institution") then (.institution[] | {"@type":"Organization", "@id": ."@id", "name": .prefLabel}) else null end) |
|
46 | 65 | (if has("ddc") then (.ddc[] | {"@type":"DefinedTerm", "name": .prefLabel, "identifier": ."@id", "inDefinedTermSet": "https://www.oclc.org/en/dewey.html"}) else null end), |
47 | 66 | (if has("subject") then (.subject[] | {"@type":"DefinedTerm", "name": .prefLabel, "identifier": ."@id"}) else null end) |
48 | 67 | ], |
49 | | - "measurementTechnique": |
| 68 | + "measurementTechnique": |
50 | 69 | [ |
51 | 70 | (if has("dataOrigin") then (.dataOrigin[] | {"@type":"DefinedTerm", "name": .prefLabel, "identifier": ."@id"}) else null end) |
52 | 71 | ], |
|
56 | 75 | ], |
57 | 76 | "funding": |
58 | 77 | [ |
59 | | - (if has("joinedFunding") then (.joinedFunding[] | {"@type":"Grant", "name": .fundingProgramJoined, "funder": .fundingJoined | {"@type":"Organization", "@id": ."@id", "name": .prefLabel}}) else (if has("fundingProgram") then (.fundingProgram[] | {"@type":"Grant", "name": .}) else null end) end) |
| 78 | + (if has("joinedFunding") then (.joinedFunding[] | {"@type":"Grant", "name": .fundingProgramJoined, "funder": .fundingJoined | {"@type":"Organization", "@id": ."@id", "name": .prefLabel}}) else (if has("fundingProgram") then (.fundingProgram[] | {"@type":"Grant", "name": .}) else null end) end) |
60 | 79 | ], |
61 | 80 | "distribution": |
62 | 81 | [ |
|
0 commit comments