@piveau/dpi 0.1.0-beta.45 → 0.1.0-beta.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/dpi.css +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +43 -43
- package/dist/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +316 -302
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +32 -36
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +120 -105
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +40 -40
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +44 -48
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +57 -61
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +61 -45
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +394 -378
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +42 -42
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +31 -92
- package/dist/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +3 -3
- package/dist/data-provider-interface/components/DistLicense.vue.js +107 -96
- package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +329 -310
- package/dist/data-provider-interface/components/PolGeoUriPage.vue.js +39 -39
- package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +2 -2
- package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +176 -179
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +203 -195
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +5 -5
- package/dist/data-provider-interface/store/modules/authStore.js +14 -12
- package/dist/data-provider-interface/views/InputPage.vue.js +95 -96
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toRef as ee, ref as te, toValue as N, computed as
|
|
1
|
+
import { toRef as ee, ref as te, toValue as N, computed as O, watch as E } from "vue";
|
|
2
2
|
import { useAsyncState as ie } from "@vueuse/core";
|
|
3
3
|
import { defineJsonldResolver as re, dcatDatasetTransformer as oe, datasetResolvers as ae } from "@piveau/jsonld";
|
|
4
4
|
import { isEmpty as ne } from "lodash-es";
|
|
@@ -15,17 +15,17 @@ function s(e) {
|
|
|
15
15
|
function ce(e) {
|
|
16
16
|
return Object.fromEntries(
|
|
17
17
|
Object.entries(e).filter(
|
|
18
|
-
([r,
|
|
18
|
+
([r, t]) => t != null && !ne(t)
|
|
19
19
|
)
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
22
|
function De(e, r) {
|
|
23
|
-
const { enabled:
|
|
24
|
-
baseUrl:
|
|
23
|
+
const { enabled: t, hubSearchUrl: i } = r, n = ee(t), { safeTransform: f } = re({
|
|
24
|
+
baseUrl: i,
|
|
25
25
|
resolvers: ae(),
|
|
26
26
|
transformer: oe
|
|
27
|
-
}),
|
|
28
|
-
state:
|
|
27
|
+
}), c = te([]), {
|
|
28
|
+
state: m,
|
|
29
29
|
isReady: g,
|
|
30
30
|
isLoading: y,
|
|
31
31
|
error: b,
|
|
@@ -33,14 +33,14 @@ function De(e, r) {
|
|
|
33
33
|
} = ie(
|
|
34
34
|
async () => {
|
|
35
35
|
var D;
|
|
36
|
-
const l = await
|
|
36
|
+
const l = await f(N(e));
|
|
37
37
|
if (l.error)
|
|
38
|
-
return
|
|
38
|
+
return c.value.push({
|
|
39
39
|
code: "transform_failed",
|
|
40
40
|
message: l.error.message
|
|
41
41
|
}), null;
|
|
42
42
|
const h = l.data;
|
|
43
|
-
return (!h || !((D = h["dpi:isDPIv3"]) != null && D["@value"])) &&
|
|
43
|
+
return (!h || !((D = h["dpi:isDPIv3"]) != null && D["@value"])) && c.value.push({
|
|
44
44
|
code: "not_dpi_v3",
|
|
45
45
|
message: `The dataset is not a DPI v3 dataset. ID ${h["@id"]}`
|
|
46
46
|
}), {
|
|
@@ -50,34 +50,34 @@ function De(e, r) {
|
|
|
50
50
|
},
|
|
51
51
|
null,
|
|
52
52
|
{ immediate: !1 }
|
|
53
|
-
), R =
|
|
53
|
+
), R = O(
|
|
54
54
|
() => n.value && !y.value && !!g.value
|
|
55
|
-
), L =
|
|
55
|
+
), L = O(
|
|
56
56
|
() => n.value && !!R.value
|
|
57
|
-
), v =
|
|
57
|
+
), v = O(() => L.value), w = O(() => {
|
|
58
58
|
var l;
|
|
59
|
-
return (l =
|
|
60
|
-
}), P =
|
|
59
|
+
return (l = m.value) == null ? void 0 : l.dpiData;
|
|
60
|
+
}), P = O(() => {
|
|
61
61
|
var l;
|
|
62
|
-
return (l =
|
|
62
|
+
return (l = m.value) == null ? void 0 : l.data;
|
|
63
63
|
});
|
|
64
|
-
return
|
|
64
|
+
return E(
|
|
65
65
|
() => N(e),
|
|
66
66
|
(l) => l && n.value ? B() : null
|
|
67
|
-
),
|
|
67
|
+
), E(P, (l) => {
|
|
68
68
|
console.log("jsonld resolved result:", l);
|
|
69
|
-
}),
|
|
69
|
+
}), E(b, (l) => {
|
|
70
70
|
console.log("jsonld error:", l);
|
|
71
71
|
}), {
|
|
72
|
-
processedInput:
|
|
72
|
+
processedInput: m,
|
|
73
73
|
isProcessedInputReady: R,
|
|
74
74
|
result: w,
|
|
75
75
|
isMaterialized: L,
|
|
76
76
|
isReady: v,
|
|
77
|
-
errors:
|
|
77
|
+
errors: c
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function u(e) {
|
|
81
81
|
if (typeof e == "string")
|
|
82
82
|
return e;
|
|
83
83
|
if (e && typeof e == "object") {
|
|
@@ -88,7 +88,7 @@ function f(e) {
|
|
|
88
88
|
}
|
|
89
89
|
return "";
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function d(e, r = "de") {
|
|
92
92
|
if (!e)
|
|
93
93
|
return "";
|
|
94
94
|
if (typeof e == "string")
|
|
@@ -96,17 +96,17 @@ function c(e, r = "de") {
|
|
|
96
96
|
if (typeof e == "object" && !Array.isArray(e) && !e["@value"] && !e["@id"])
|
|
97
97
|
return e[r] || Object.values(e)[0] || "";
|
|
98
98
|
if (Array.isArray(e)) {
|
|
99
|
-
const
|
|
99
|
+
const t = e.find(
|
|
100
100
|
(n) => n["@language"] === r
|
|
101
101
|
);
|
|
102
|
-
if (
|
|
103
|
-
return
|
|
104
|
-
const
|
|
105
|
-
return (
|
|
102
|
+
if (t)
|
|
103
|
+
return t["@value"] || "";
|
|
104
|
+
const i = e[0];
|
|
105
|
+
return (i == null ? void 0 : i["@value"]) || u(i) || "";
|
|
106
106
|
}
|
|
107
|
-
return e["@language"] && e["@value"] ? e["@value"] :
|
|
107
|
+
return e["@language"] && e["@value"] ? e["@value"] : u(e);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function K(e) {
|
|
110
110
|
return {
|
|
111
111
|
uri: e.uri,
|
|
112
112
|
label: e.label,
|
|
@@ -115,10 +115,10 @@ function E(e) {
|
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
function T(e, r) {
|
|
118
|
-
const
|
|
119
|
-
return
|
|
118
|
+
const t = e.prefLabel;
|
|
119
|
+
return K({
|
|
120
120
|
uri: e["@id"] || e["purl:identifier"] || "",
|
|
121
|
-
label:
|
|
121
|
+
label: t ? d(t) : e["purl:identifier"] || ""
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
function H(e) {
|
|
@@ -133,14 +133,14 @@ function S(e, r = !0) {
|
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
function X(e, r = "de") {
|
|
136
|
-
return e ? V(e).map((
|
|
137
|
-
"@value":
|
|
136
|
+
return e ? V(e).map((i) => typeof i == "string" ? S({
|
|
137
|
+
"@value": i,
|
|
138
138
|
"@language": r
|
|
139
|
-
}) :
|
|
140
|
-
"@value":
|
|
141
|
-
"@language":
|
|
139
|
+
}) : i && typeof i == "object" ? i["@language"] && i["@value"] ? S({
|
|
140
|
+
"@value": i["@value"],
|
|
141
|
+
"@language": i["@language"]
|
|
142
142
|
}) : S({
|
|
143
|
-
"@value":
|
|
143
|
+
"@value": u(i),
|
|
144
144
|
"@language": r
|
|
145
145
|
}) : S({
|
|
146
146
|
"@value": "",
|
|
@@ -149,17 +149,17 @@ function X(e, r = "de") {
|
|
|
149
149
|
}
|
|
150
150
|
function de(e, r) {
|
|
151
151
|
return e ? V(e).map(
|
|
152
|
-
(
|
|
152
|
+
(i) => S({
|
|
153
153
|
"@type": r,
|
|
154
|
-
"@value":
|
|
154
|
+
"@value": u(i)
|
|
155
155
|
})
|
|
156
156
|
) : [];
|
|
157
157
|
}
|
|
158
158
|
function Y(e, r) {
|
|
159
|
-
const
|
|
160
|
-
for (const [
|
|
161
|
-
i
|
|
162
|
-
return
|
|
159
|
+
const t = { isValid: !0 };
|
|
160
|
+
for (const [i, n] of Object.entries(r))
|
|
161
|
+
t[i] = u(e == null ? void 0 : e[n]);
|
|
162
|
+
return t;
|
|
163
163
|
}
|
|
164
164
|
function le(e) {
|
|
165
165
|
return {
|
|
@@ -171,24 +171,24 @@ function se(e) {
|
|
|
171
171
|
discoverabilityPage: [{ isValid: !0 }]
|
|
172
172
|
};
|
|
173
173
|
if (e["dcatap:hvdCategory"]) {
|
|
174
|
-
const
|
|
174
|
+
const t = V(
|
|
175
175
|
e["dcatap:hvdCategory"]
|
|
176
176
|
).filter(Boolean);
|
|
177
|
-
r.hvdPage =
|
|
177
|
+
r.hvdPage = t == null ? void 0 : t.map((i) => ({
|
|
178
178
|
isValid: !0,
|
|
179
|
-
uri:
|
|
180
|
-
label:
|
|
179
|
+
uri: i["@id"],
|
|
180
|
+
label: d(i.prefLabel)
|
|
181
181
|
}));
|
|
182
182
|
}
|
|
183
183
|
if (e["dcat:theme"]) {
|
|
184
|
-
const
|
|
184
|
+
const t = V(e["dcat:theme"]);
|
|
185
185
|
r.discoverabilityPage = [
|
|
186
186
|
{ isValid: !0 },
|
|
187
|
-
...
|
|
188
|
-
(
|
|
189
|
-
id:
|
|
190
|
-
uri:
|
|
191
|
-
label:
|
|
187
|
+
...t.map(
|
|
188
|
+
(i) => S({
|
|
189
|
+
id: u(i).split("/").pop(),
|
|
190
|
+
uri: u(i),
|
|
191
|
+
label: d(i.prefLabel)
|
|
192
192
|
})
|
|
193
193
|
)
|
|
194
194
|
];
|
|
@@ -196,23 +196,23 @@ function se(e) {
|
|
|
196
196
|
return r;
|
|
197
197
|
}
|
|
198
198
|
function fe(e) {
|
|
199
|
-
var
|
|
200
|
-
const
|
|
201
|
-
datasetID: ((
|
|
199
|
+
var i;
|
|
200
|
+
const t = {
|
|
201
|
+
datasetID: ((i = e["@id"]) == null ? void 0 : i.split("/").pop()) || "",
|
|
202
202
|
"dct:title": [],
|
|
203
203
|
"dct:description": [],
|
|
204
204
|
"dct:modified": [""],
|
|
205
205
|
"dct:publisher": [],
|
|
206
206
|
"dcat:contactPoint": []
|
|
207
207
|
};
|
|
208
|
-
if (e["dct:title"] && (
|
|
208
|
+
if (e["dct:title"] && (t["dct:title"] = X(e["dct:title"])), e["dct:description"] && (t["dct:description"] = X(
|
|
209
209
|
e["dct:description"]
|
|
210
|
-
)), e["dct:modified"] && (
|
|
210
|
+
)), e["dct:modified"] && (t["dct:modified"] = de(
|
|
211
211
|
e["dct:modified"],
|
|
212
212
|
"http://www.w3.org/2001/XMLSchema#date"
|
|
213
213
|
)), e["dct:publisher"]) {
|
|
214
214
|
const n = o(e["dct:publisher"]);
|
|
215
|
-
|
|
215
|
+
t["dct:publisher"] = [
|
|
216
216
|
Y(n, {
|
|
217
217
|
"foaf:name": "foaf:name",
|
|
218
218
|
"foaf:mbox": "foaf:mbox",
|
|
@@ -222,7 +222,7 @@ function fe(e) {
|
|
|
222
222
|
}
|
|
223
223
|
if (e["dcat:contactPoint"]) {
|
|
224
224
|
const n = o(e["dcat:contactPoint"]);
|
|
225
|
-
|
|
225
|
+
t["dcat:contactPoint"] = [
|
|
226
226
|
Y(n, {
|
|
227
227
|
"vcard:fn": "vcard:fn",
|
|
228
228
|
"vcard:hasEmail": "vcard:hasEmail",
|
|
@@ -230,14 +230,14 @@ function fe(e) {
|
|
|
230
230
|
})
|
|
231
231
|
];
|
|
232
232
|
}
|
|
233
|
-
return
|
|
233
|
+
return t;
|
|
234
234
|
}
|
|
235
235
|
function ue(e) {
|
|
236
|
-
var r,
|
|
236
|
+
var r, t;
|
|
237
237
|
return {
|
|
238
|
-
"dcatde:politicalGeocodingURI": (r = e["dcatapde:politicalGeocodingURI"]) == null ? void 0 : r.map((
|
|
239
|
-
var
|
|
240
|
-
const
|
|
238
|
+
"dcatde:politicalGeocodingURI": (r = e["dcatapde:politicalGeocodingURI"]) == null ? void 0 : r.map((i) => {
|
|
239
|
+
var m;
|
|
240
|
+
const f = {
|
|
241
241
|
districtKey: "Kreis",
|
|
242
242
|
governmentDistrictKey: "Bezirk",
|
|
243
243
|
municipalityKey: "Gemeindeschlüssel",
|
|
@@ -245,17 +245,17 @@ function ue(e) {
|
|
|
245
245
|
stateKey: "Bundesland",
|
|
246
246
|
regionalKey: "Regionalschlüssel"
|
|
247
247
|
};
|
|
248
|
-
let
|
|
249
|
-
return
|
|
248
|
+
let c = i["@id"].split("/").slice(-2, -1)[0];
|
|
249
|
+
return c = f[c] || c, {
|
|
250
250
|
isValid: !0,
|
|
251
|
-
uri:
|
|
252
|
-
id: ((
|
|
253
|
-
label:
|
|
254
|
-
inVoc:
|
|
251
|
+
uri: i["@id"],
|
|
252
|
+
id: ((m = i.prefLabel) == null ? void 0 : m.de) || i["@id"].split("/").pop(),
|
|
253
|
+
label: d(i.altLabel),
|
|
254
|
+
inVoc: c
|
|
255
255
|
};
|
|
256
256
|
}),
|
|
257
|
-
"dcat:temporalResolution": (
|
|
258
|
-
const
|
|
257
|
+
"dcat:temporalResolution": (t = e["dct:temporal"]) == null ? void 0 : t.reduce((i, n) => {
|
|
258
|
+
const c = o(n["dcat:startDate"]), m = o(n["dcat:endDate"]), g = u(c) || "", y = u(m) || "", b = typeof c != "string" && (c == null ? void 0 : c["@type"]) === "http://www.w3.org/2001/XMLSchema#dateTime" ? "dateTime" : "date", B = b === "date" ? g : g.split("T")[0], R = b === "date" ? y : y.split("T")[0], L = b === "dateTime" ? g.split("T")[1] : "", v = b === "dateTime" ? y.split("T")[1] : "";
|
|
259
259
|
return {
|
|
260
260
|
isValid: !0,
|
|
261
261
|
type: "dct:PeriodOfTime",
|
|
@@ -273,112 +273,107 @@ function ue(e) {
|
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
275
|
function pe(e, r) {
|
|
276
|
-
var
|
|
276
|
+
var i, n, f, c, m, g, y, b, B, R, L, v, w, P, l, h, U, D, x, F, j, z, M;
|
|
277
277
|
if (!e)
|
|
278
278
|
return {};
|
|
279
|
-
const
|
|
279
|
+
const t = o(e["spdx:checksum"]);
|
|
280
280
|
return {
|
|
281
281
|
isValid: !0,
|
|
282
282
|
id: r + 1,
|
|
283
|
-
"dcat:accessURL":
|
|
284
|
-
"dcat:downloadURL": ((
|
|
285
|
-
"@id":
|
|
283
|
+
"dcat:accessURL": u(o(e["dcat:accessURL"])) || "",
|
|
284
|
+
"dcat:downloadURL": ((i = e["dcat:downloadURL"]) == null ? void 0 : i.map((p) => ({
|
|
285
|
+
"@id": u(p)
|
|
286
286
|
}))) || [{ "@id": "" }],
|
|
287
287
|
"dct:format": {
|
|
288
288
|
// redundancy in label and title for better compatibility
|
|
289
289
|
label: ((n = o(e["dct:format"])) == null ? void 0 : n["purl:identifier"]) || "",
|
|
290
|
-
title: ((
|
|
291
|
-
uri: ((
|
|
290
|
+
title: ((f = o(e["dct:format"])) == null ? void 0 : f["purl:identifier"]) || "",
|
|
291
|
+
uri: ((c = o(e["dct:format"])) == null ? void 0 : c["@id"]) || ""
|
|
292
292
|
},
|
|
293
|
-
"dct:title":
|
|
294
|
-
"dct:description":
|
|
295
|
-
"dct:modified":
|
|
296
|
-
"dct:issued":
|
|
297
|
-
"dcat:byteSize":
|
|
298
|
-
"dcatde:licenseAttributionByText":
|
|
299
|
-
"dct:license": e["dct:license"] ?
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
"
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
(b = o(e["dct:license"])) == null ? void 0 : b.prefLabel
|
|
311
|
-
) || ""
|
|
312
|
-
}
|
|
313
|
-
] : [],
|
|
293
|
+
"dct:title": d(e["dct:title"]),
|
|
294
|
+
"dct:description": d(e["dct:description"]),
|
|
295
|
+
"dct:modified": u(o(e["dct:modified"])),
|
|
296
|
+
"dct:issued": u(o(e["dct:issued"])),
|
|
297
|
+
"dcat:byteSize": u(o(e["dcat:byteSize"])),
|
|
298
|
+
"dcatde:licenseAttributionByText": d(e["dcatapde:licenseAttributionByText"]) || "",
|
|
299
|
+
"dct:license": e["dct:license"] ? {
|
|
300
|
+
isValid: !0,
|
|
301
|
+
uri: ((m = o(e["dct:license"])) == null ? void 0 : m["@id"]) || "",
|
|
302
|
+
"dcterms:license": d(
|
|
303
|
+
(g = o(e["dct:license"])) == null ? void 0 : g.altLabel
|
|
304
|
+
) || "",
|
|
305
|
+
label: d(
|
|
306
|
+
(y = o(e["dct:license"])) == null ? void 0 : y.prefLabel
|
|
307
|
+
) || "",
|
|
308
|
+
title: d(e["dcatapde:licenseAttributionByText"]) || ""
|
|
309
|
+
} : {},
|
|
314
310
|
"dct:accessRights": e["dct:accessRights"] ? o(T(e["dct:accessRights"])) : [],
|
|
315
311
|
"dcatap:availability": {
|
|
316
312
|
// Redundant label and title for better compatibility
|
|
317
|
-
label: ((
|
|
318
|
-
title: ((
|
|
319
|
-
uri: ((
|
|
313
|
+
label: ((b = o(e["dcatap:availability"])) == null ? void 0 : b.prefLabel) || "",
|
|
314
|
+
title: ((B = o(e["dcatap:availability"])) == null ? void 0 : B.prefLabel) || "",
|
|
315
|
+
uri: ((R = o(e["dcatap:availability"])) == null ? void 0 : R["@id"]) || ""
|
|
320
316
|
},
|
|
321
|
-
"dct:language": ((
|
|
322
|
-
"dcat:mediaType":
|
|
323
|
-
label:
|
|
324
|
-
(
|
|
317
|
+
"dct:language": ((L = e["dct:language"]) == null ? void 0 : L.map((p) => T(p)).filter(Boolean)) || [],
|
|
318
|
+
"dcat:mediaType": K({
|
|
319
|
+
label: d(
|
|
320
|
+
(v = o(e["dcat:mediaType"])) == null ? void 0 : v.prefLabel
|
|
325
321
|
) || "",
|
|
326
|
-
uri: ((
|
|
322
|
+
uri: ((w = o(e["dcat:mediaType"])) == null ? void 0 : w["@id"]) || ""
|
|
327
323
|
}),
|
|
328
|
-
"dcat:compressFormat":
|
|
329
|
-
label:
|
|
330
|
-
(
|
|
324
|
+
"dcat:compressFormat": K({
|
|
325
|
+
label: d(
|
|
326
|
+
(P = o(e["dcat:compressFormat"])) == null ? void 0 : P.prefLabel
|
|
331
327
|
) || "",
|
|
332
|
-
uri: ((
|
|
328
|
+
uri: ((l = o(e["dcat:compressFormat"])) == null ? void 0 : l["@id"]) || ""
|
|
333
329
|
}),
|
|
334
|
-
"dcat:packageFormat":
|
|
335
|
-
label:
|
|
336
|
-
(
|
|
330
|
+
"dcat:packageFormat": K({
|
|
331
|
+
label: d(
|
|
332
|
+
(h = o(e["dcat:packageFormat"])) == null ? void 0 : h.prefLabel
|
|
337
333
|
) || "",
|
|
338
|
-
uri: ((
|
|
334
|
+
uri: ((U = o(e["dcat:packageFormat"])) == null ? void 0 : U["@id"]) || ""
|
|
339
335
|
}),
|
|
340
336
|
"adms:status": {
|
|
341
|
-
uri: ((
|
|
342
|
-
"@value":
|
|
343
|
-
(F = o(e["adms:status"])) == null ? void 0 : F.prefLabel
|
|
344
|
-
) || ""
|
|
337
|
+
uri: ((D = o(e["adms:status"])) == null ? void 0 : D["@id"]) || "",
|
|
338
|
+
"@value": d((x = o(e["adms:status"])) == null ? void 0 : x.prefLabel) || ""
|
|
345
339
|
},
|
|
346
340
|
checksum: {
|
|
347
|
-
title:
|
|
348
|
-
"spdx:checksum": ((
|
|
349
|
-
uri: (
|
|
350
|
-
o(
|
|
351
|
-
)) == null ? void 0 :
|
|
341
|
+
title: u(o(t == null ? void 0 : t["spdx:checksumValue"])),
|
|
342
|
+
"spdx:checksum": ((F = u(o(t == null ? void 0 : t["spdx:algorithm"]))) == null ? void 0 : F.split("_").pop()) || "",
|
|
343
|
+
uri: (j = u(
|
|
344
|
+
o(t == null ? void 0 : t["spdx:algorithm"])
|
|
345
|
+
)) == null ? void 0 : j.replace("spdx:", "http://spdx.org/rdf/terms#")
|
|
352
346
|
},
|
|
353
347
|
accessServices: he(e["dcat:accessService"] || []),
|
|
354
348
|
documentations: Re(e["foaf:page"] || []),
|
|
355
|
-
conformsToItems: (
|
|
349
|
+
conformsToItems: (z = e["dct:conformsTo"]) == null ? void 0 : z.map((p, I) => ({
|
|
356
350
|
// for some reason dct:conformsTo is different from the one on dcat:dataset level
|
|
357
351
|
id: I + 1,
|
|
358
|
-
"dcat:accessURL":
|
|
359
|
-
"dct:title":
|
|
360
|
-
"dcat:downloadURL":
|
|
352
|
+
"dcat:accessURL": p["@id"],
|
|
353
|
+
"dct:title": d(p["rdfs:label"]) || "",
|
|
354
|
+
"dcat:downloadURL": p["@id"],
|
|
361
355
|
// redundancy to match properties on dcat:dataset level
|
|
362
|
-
"rdfs:label":
|
|
363
|
-
uri:
|
|
356
|
+
"rdfs:label": d(p["rdfs:label"]) || "",
|
|
357
|
+
uri: p["@id"]
|
|
364
358
|
})).filter(Boolean),
|
|
365
|
-
policyItems: ((
|
|
359
|
+
policyItems: ((M = e["odrl:hasPolicy"]) == null ? void 0 : M.map((p, I) => ({
|
|
366
360
|
// don't ask
|
|
367
361
|
id: I + 1,
|
|
368
|
-
"dcat:downloadURL":
|
|
369
|
-
"dcat:accessURL":
|
|
362
|
+
"dcat:downloadURL": p["@id"],
|
|
363
|
+
"dcat:accessURL": p["@id"]
|
|
370
364
|
}))) || [{ id: 1, "dcat:downloadURL": "", "dcat:accessURL": "" }]
|
|
371
365
|
};
|
|
372
366
|
}
|
|
373
367
|
function me(e) {
|
|
368
|
+
var t, i;
|
|
374
369
|
const r = {
|
|
375
370
|
"dcat:distribution": []
|
|
376
371
|
};
|
|
377
372
|
if (e["dcat:distribution"]) {
|
|
378
|
-
const
|
|
379
|
-
r["dcat:distribution"] =
|
|
373
|
+
const n = V(e["dcat:distribution"]);
|
|
374
|
+
r["dcat:distribution"] = n.map((f, c) => pe(f, c)).filter((f) => Object.keys(f).length > 0);
|
|
380
375
|
}
|
|
381
|
-
return console.log(r), r;
|
|
376
|
+
return r["dct:license"] = [(i = (t = r["dcat:distribution"]) == null ? void 0 : t[0]) == null ? void 0 : i["dct:license"]], console.log(r), r;
|
|
382
377
|
}
|
|
383
378
|
function be(e) {
|
|
384
379
|
return {
|
|
@@ -386,41 +381,41 @@ function be(e) {
|
|
|
386
381
|
};
|
|
387
382
|
}
|
|
388
383
|
function ge(e) {
|
|
389
|
-
var
|
|
384
|
+
var t, i, n, f, c, m, g, y, b, B, R, L, v, w, P, l, h, U, D, x, F, j, z, M, p, I, C, q;
|
|
390
385
|
const r = {
|
|
391
|
-
"dct:language": (
|
|
392
|
-
"dcatde:politicalGeocodingLevelURI": (
|
|
386
|
+
"dct:language": (t = e["dct:language"]) == null ? void 0 : t.map((a) => T(a)).filter(Boolean),
|
|
387
|
+
"dcatde:politicalGeocodingLevelURI": (i = e["dcatapde:politicalGeocodingLevelURI"]) == null ? void 0 : i.map((a) => ({
|
|
393
388
|
uri: a["@id"],
|
|
394
|
-
"@value":
|
|
389
|
+
"@value": d(a.prefLabel)
|
|
395
390
|
})),
|
|
396
391
|
"dct:conformsTo": (n = e["dct:conformsTo"]) == null ? void 0 : n.map((a) => ({
|
|
397
|
-
"rdfs:label":
|
|
392
|
+
"rdfs:label": d(a["rdfs:label"]) || "",
|
|
398
393
|
"@id": a["@id"]
|
|
399
394
|
})).filter(Boolean),
|
|
400
395
|
"dct:accessRights": e["dct:accessRights"] ? s(T(e["dct:accessRights"])) : [],
|
|
401
396
|
"dct:issued": V(e["dct:issued"]),
|
|
402
|
-
"dct:provenance": (
|
|
403
|
-
"rdfs:label":
|
|
397
|
+
"dct:provenance": (f = e["dct:provenance"]) == null ? void 0 : f.map((a) => ({
|
|
398
|
+
"rdfs:label": d(a["rdfs:label"]) || "",
|
|
404
399
|
uri: a["@id"]
|
|
405
400
|
})).filter(Boolean),
|
|
406
401
|
"dct:accrualPeriodicity": e["dct:accrualPeriodicity"] ? s(T(e["dct:accrualPeriodicity"])) : [],
|
|
407
|
-
"dct:type": (
|
|
408
|
-
"dcat:spatialResolutionInMeters": ((
|
|
402
|
+
"dct:type": (c = e["dct:type"]) == null ? void 0 : c.map((a) => T(a)).filter(Boolean),
|
|
403
|
+
"dcat:spatialResolutionInMeters": ((m = e["dcat:spatialResolutionInMeters"]) == null ? void 0 : m.map(H)) || void 0,
|
|
409
404
|
"dcat:temporalResolution": e["dcat:temporalResolution"] ? e["dcat:temporalResolution"].map(H).map((a) => {
|
|
410
|
-
const
|
|
405
|
+
const G = a["@value"].match(
|
|
411
406
|
/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/
|
|
412
407
|
);
|
|
413
|
-
if (
|
|
414
|
-
const [,
|
|
408
|
+
if (G) {
|
|
409
|
+
const [, _, k, $, J, W, Q] = G.map(
|
|
415
410
|
(Z) => Z || "0"
|
|
416
411
|
);
|
|
417
412
|
return [
|
|
418
|
-
{ Year:
|
|
419
|
-
{ Month:
|
|
413
|
+
{ Year: _ },
|
|
414
|
+
{ Month: k },
|
|
420
415
|
{ Day: $ },
|
|
421
416
|
{ Hour: J },
|
|
422
|
-
{ Minute:
|
|
423
|
-
{ Second:
|
|
417
|
+
{ Minute: W },
|
|
418
|
+
{ Second: Q }
|
|
424
419
|
];
|
|
425
420
|
}
|
|
426
421
|
}).filter(Boolean).flat() : void 0,
|
|
@@ -461,28 +456,30 @@ function ge(e) {
|
|
|
461
456
|
e["prov:qualifiedAttribution"]
|
|
462
457
|
)) == null ? void 0 : z.filter(Boolean),
|
|
463
458
|
"dcat:keyword": (M = s(e["dcat:keyword"])) == null ? void 0 : M.filter(Boolean),
|
|
464
|
-
"dct:spatial": (
|
|
465
|
-
|
|
466
|
-
|
|
459
|
+
"dct:spatial": (p = s(e["dct:spatial"])) == null ? void 0 : p.filter((a) => a ? !a["@id"].startsWith(
|
|
460
|
+
"http://dcat-ap.de/def/politicalGeocoding/"
|
|
461
|
+
) : !1).filter(Boolean),
|
|
462
|
+
"dct:references": (I = s(e["dct:references"])) == null ? void 0 : I.filter(Boolean),
|
|
463
|
+
"foaf:page": (C = s(e["foaf:page"])) == null ? void 0 : C.filter(Boolean).map((a) => {
|
|
467
464
|
if (!a) return;
|
|
468
465
|
const A = o(a["dct:format"]);
|
|
469
466
|
return {
|
|
470
467
|
"dct:title": o(a["dct:title"]),
|
|
471
468
|
"dct:description": o(a["dct:description"]),
|
|
472
|
-
"@value": A ?
|
|
469
|
+
"@value": A ? d(A.prefLabel) : "",
|
|
473
470
|
uri: A ? A["@id"] : "",
|
|
474
471
|
"foaf:homepage": o(a["foaf:homepage"]) || ""
|
|
475
472
|
};
|
|
476
473
|
}),
|
|
477
474
|
"dcatap:availability": (q = e["dcatap:availability"]) == null ? void 0 : q.map(
|
|
478
475
|
(a) => {
|
|
479
|
-
var A, _, k
|
|
476
|
+
var A, G, _, k;
|
|
480
477
|
return {
|
|
481
478
|
// Redundant label and title for better compatibility
|
|
482
479
|
label: ((A = o(a)) == null ? void 0 : A.prefLabel) || "",
|
|
483
|
-
title: ((
|
|
484
|
-
uri: ((
|
|
485
|
-
"@value":
|
|
480
|
+
title: ((G = o(a)) == null ? void 0 : G.prefLabel) || "",
|
|
481
|
+
uri: ((_ = o(a)) == null ? void 0 : _["@id"]) || "",
|
|
482
|
+
"@value": d((k = o(a)) == null ? void 0 : k.prefLabel) || ""
|
|
486
483
|
};
|
|
487
484
|
}
|
|
488
485
|
)
|
|
@@ -501,35 +498,35 @@ function ye(e) {
|
|
|
501
498
|
};
|
|
502
499
|
}
|
|
503
500
|
function he(e) {
|
|
504
|
-
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((r,
|
|
505
|
-
var
|
|
501
|
+
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((r, t) => {
|
|
502
|
+
var i, n;
|
|
506
503
|
return {
|
|
507
|
-
id:
|
|
508
|
-
"dcat:downloadURL": ((
|
|
504
|
+
id: t + 1,
|
|
505
|
+
"dcat:downloadURL": ((i = o(r["dcat:endpointURL"])) == null ? void 0 : i["@id"]) || "",
|
|
509
506
|
"dcat:endpointURL": ((n = o(r["dcat:endpointURL"])) == null ? void 0 : n["@id"]) || "",
|
|
510
|
-
"dct:description":
|
|
511
|
-
"dct:title":
|
|
507
|
+
"dct:description": d(r["dct:description"]) || "",
|
|
508
|
+
"dct:title": d(r["dct:title"]) || ""
|
|
512
509
|
};
|
|
513
510
|
});
|
|
514
511
|
}
|
|
515
512
|
function Re(e) {
|
|
516
|
-
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((r,
|
|
517
|
-
var
|
|
513
|
+
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((r, t) => {
|
|
514
|
+
var i, n, f, c;
|
|
518
515
|
return {
|
|
519
|
-
id:
|
|
520
|
-
"dcat:downloadURL": ((
|
|
516
|
+
id: t + 1,
|
|
517
|
+
"dcat:downloadURL": ((i = o(r["dcat:accessURL"])) == null ? void 0 : i["@id"]) || "",
|
|
521
518
|
"dcat:accessURL": ((n = o(r["dcat:accessURL"])) == null ? void 0 : n["@id"]) || "",
|
|
522
|
-
"dct:description":
|
|
523
|
-
"dct:title":
|
|
524
|
-
"dct:format": r["dct:format"] && ((
|
|
525
|
-
formatUri: r["dct:format"] && ((
|
|
519
|
+
"dct:description": d(r["dct:description"]) || "",
|
|
520
|
+
"dct:title": d(r["dct:title"]) || "",
|
|
521
|
+
"dct:format": r["dct:format"] && ((f = T(o(r["dct:format"]))) == null ? void 0 : f.label) || "",
|
|
522
|
+
formatUri: r["dct:format"] && ((c = T(o(r["dct:format"]))) == null ? void 0 : c.uri) || ""
|
|
526
523
|
};
|
|
527
524
|
});
|
|
528
525
|
}
|
|
529
526
|
export {
|
|
530
527
|
s as asSomeArray,
|
|
531
|
-
|
|
532
|
-
|
|
528
|
+
d as extractLocalizedString,
|
|
529
|
+
u as extractStringValue,
|
|
533
530
|
o as getFirstItem,
|
|
534
531
|
V as normalizeToArray,
|
|
535
532
|
ce as purgeNullishAndEmptyProperties,
|