@piveau/dpi 0.1.0-beta.21 → 0.1.0-beta.22
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.
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { toRef as
|
|
2
|
-
import { useAsyncState as
|
|
3
|
-
import { defineJsonldResolver as
|
|
4
|
-
import { isEmpty as
|
|
5
|
-
function
|
|
1
|
+
import { toRef as J, ref as Q, toValue as k, computed as z, watch as O } from "vue";
|
|
2
|
+
import { useAsyncState as W } from "@vueuse/core";
|
|
3
|
+
import { defineJsonldResolver as Z, dcatDatasetTransformer as ee, datasetResolvers as te } from "@piveau/jsonld";
|
|
4
|
+
import { isEmpty as ie } from "lodash-es";
|
|
5
|
+
function M(e) {
|
|
6
6
|
return e == null ? [] : Array.isArray(e) ? e : [e];
|
|
7
7
|
}
|
|
8
8
|
function o(e) {
|
|
9
9
|
if (e != null)
|
|
10
10
|
return Array.isArray(e) ? e[0] : e;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function s(e) {
|
|
13
13
|
return Array.isArray(e) ? e : e ? [e] : void 0;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function re(e) {
|
|
16
16
|
return Object.fromEntries(
|
|
17
17
|
Object.entries(e).filter(
|
|
18
|
-
([r, i]) => i != null && !
|
|
18
|
+
([r, i]) => i != null && !ie(i)
|
|
19
19
|
)
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const { enabled: i, hubSearchUrl: t } = r, n =
|
|
22
|
+
function Le(e, r) {
|
|
23
|
+
const { enabled: i, hubSearchUrl: t } = r, n = J(i), { safeTransform: p } = Z({
|
|
24
24
|
baseUrl: t,
|
|
25
|
-
resolvers:
|
|
26
|
-
transformer:
|
|
27
|
-
}), a =
|
|
28
|
-
state:
|
|
25
|
+
resolvers: te(),
|
|
26
|
+
transformer: ee
|
|
27
|
+
}), a = Q([]), {
|
|
28
|
+
state: u,
|
|
29
29
|
isReady: b,
|
|
30
30
|
isLoading: g,
|
|
31
31
|
error: m,
|
|
32
|
-
execute:
|
|
33
|
-
} =
|
|
32
|
+
execute: B
|
|
33
|
+
} = W(
|
|
34
34
|
async () => {
|
|
35
35
|
var T;
|
|
36
|
-
const d = await p(
|
|
36
|
+
const d = await p(k(e));
|
|
37
37
|
if (d.error)
|
|
38
38
|
return a.value.push({
|
|
39
39
|
code: "transform_failed",
|
|
@@ -44,40 +44,40 @@ function ye(e, r) {
|
|
|
44
44
|
code: "not_dpi_v3",
|
|
45
45
|
message: `The dataset is not a DPI v3 dataset. ID ${y["@id"]}`
|
|
46
46
|
}), {
|
|
47
|
-
dpiData:
|
|
47
|
+
dpiData: pe(y),
|
|
48
48
|
data: y
|
|
49
49
|
};
|
|
50
50
|
},
|
|
51
51
|
null,
|
|
52
52
|
{ immediate: !1 }
|
|
53
|
-
), h =
|
|
53
|
+
), h = z(
|
|
54
54
|
() => n.value && !g.value && !!b.value
|
|
55
|
-
), R =
|
|
55
|
+
), R = z(
|
|
56
56
|
() => n.value && !!h.value
|
|
57
|
-
),
|
|
57
|
+
), L = z(() => R.value), v = z(() => {
|
|
58
58
|
var d;
|
|
59
|
-
return (d =
|
|
60
|
-
}),
|
|
59
|
+
return (d = u.value) == null ? void 0 : d.dpiData;
|
|
60
|
+
}), A = z(() => {
|
|
61
61
|
var d;
|
|
62
|
-
return (d =
|
|
62
|
+
return (d = u.value) == null ? void 0 : d.data;
|
|
63
63
|
});
|
|
64
64
|
return O(
|
|
65
|
-
() =>
|
|
66
|
-
(d) => d && n.value ?
|
|
67
|
-
), O(
|
|
65
|
+
() => k(e),
|
|
66
|
+
(d) => d && n.value ? B() : null
|
|
67
|
+
), O(A, (d) => {
|
|
68
68
|
console.log("jsonld resolved result:", d);
|
|
69
69
|
}), O(m, (d) => {
|
|
70
70
|
console.log("jsonld error:", d);
|
|
71
71
|
}), {
|
|
72
|
-
processedInput:
|
|
72
|
+
processedInput: u,
|
|
73
73
|
isProcessedInputReady: h,
|
|
74
|
-
result:
|
|
74
|
+
result: v,
|
|
75
75
|
isMaterialized: R,
|
|
76
|
-
isReady:
|
|
76
|
+
isReady: L,
|
|
77
77
|
errors: a
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function f(e) {
|
|
81
81
|
if (typeof e == "string")
|
|
82
82
|
return e;
|
|
83
83
|
if (e && typeof e == "object") {
|
|
@@ -102,11 +102,11 @@ function c(e, r = "de") {
|
|
|
102
102
|
if (i)
|
|
103
103
|
return i["@value"] || "";
|
|
104
104
|
const t = e[0];
|
|
105
|
-
return (t == null ? void 0 : t["@value"]) ||
|
|
105
|
+
return (t == null ? void 0 : t["@value"]) || f(t) || "";
|
|
106
106
|
}
|
|
107
|
-
return e["@language"] && e["@value"] ? e["@value"] :
|
|
107
|
+
return e["@language"] && e["@value"] ? e["@value"] : f(e);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function F(e) {
|
|
110
110
|
return {
|
|
111
111
|
uri: e.uri,
|
|
112
112
|
label: e.label,
|
|
@@ -116,7 +116,7 @@ function j(e) {
|
|
|
116
116
|
}
|
|
117
117
|
function P(e, r) {
|
|
118
118
|
const i = e.prefLabel;
|
|
119
|
-
return
|
|
119
|
+
return F({
|
|
120
120
|
uri: e["@id"] || e["purl:identifier"] || "",
|
|
121
121
|
label: i ? c(i) : e["purl:identifier"] || ""
|
|
122
122
|
});
|
|
@@ -133,45 +133,45 @@ function I(e, r = !0) {
|
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
function E(e, r = "de") {
|
|
136
|
-
return e ?
|
|
136
|
+
return e ? M(e).map((t) => typeof t == "string" ? I({
|
|
137
137
|
"@value": t,
|
|
138
138
|
"@language": r
|
|
139
139
|
}) : t && typeof t == "object" ? t["@language"] && t["@value"] ? I({
|
|
140
140
|
"@value": t["@value"],
|
|
141
141
|
"@language": t["@language"]
|
|
142
142
|
}) : I({
|
|
143
|
-
"@value":
|
|
143
|
+
"@value": f(t),
|
|
144
144
|
"@language": r
|
|
145
145
|
}) : I({
|
|
146
146
|
"@value": "",
|
|
147
147
|
"@language": r
|
|
148
148
|
})) : [];
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
return e ?
|
|
150
|
+
function oe(e, r) {
|
|
151
|
+
return e ? M(e).map(
|
|
152
152
|
(t) => I({
|
|
153
153
|
"@type": r,
|
|
154
|
-
"@value":
|
|
154
|
+
"@value": f(t)
|
|
155
155
|
})
|
|
156
156
|
) : [];
|
|
157
157
|
}
|
|
158
158
|
function G(e, r) {
|
|
159
159
|
const i = { isValid: !0 };
|
|
160
160
|
for (const [t, n] of Object.entries(r))
|
|
161
|
-
i[t] =
|
|
161
|
+
i[t] = f(e == null ? void 0 : e[n]);
|
|
162
162
|
return i;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function ne(e) {
|
|
165
165
|
return {
|
|
166
166
|
happyFlowLandingPage: {}
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function ae(e) {
|
|
170
170
|
const r = {
|
|
171
171
|
discoverabilityPage: [{ isValid: !0 }]
|
|
172
172
|
};
|
|
173
173
|
if (e["dcatap:hvdCategory"]) {
|
|
174
|
-
const i =
|
|
174
|
+
const i = M(
|
|
175
175
|
e["dcatap:hvdCategory"]
|
|
176
176
|
).filter(Boolean);
|
|
177
177
|
r.hvdPage = i == null ? void 0 : i.map((t) => ({
|
|
@@ -181,13 +181,13 @@ function re(e) {
|
|
|
181
181
|
}));
|
|
182
182
|
}
|
|
183
183
|
if (e["dcat:theme"]) {
|
|
184
|
-
const i =
|
|
184
|
+
const i = M(e["dcat:theme"]);
|
|
185
185
|
r.discoverabilityPage = [
|
|
186
186
|
{ isValid: !0 },
|
|
187
187
|
...i.map(
|
|
188
188
|
(t) => I({
|
|
189
|
-
id:
|
|
190
|
-
uri:
|
|
189
|
+
id: f(t).split("/").pop(),
|
|
190
|
+
uri: f(t),
|
|
191
191
|
label: c(t.prefLabel)
|
|
192
192
|
})
|
|
193
193
|
)
|
|
@@ -195,7 +195,7 @@ function re(e) {
|
|
|
195
195
|
}
|
|
196
196
|
return r;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function ce(e) {
|
|
199
199
|
var t;
|
|
200
200
|
const i = {
|
|
201
201
|
datasetID: ((t = e["@id"]) == null ? void 0 : t.split("/").pop()) || "",
|
|
@@ -207,7 +207,7 @@ function oe(e) {
|
|
|
207
207
|
};
|
|
208
208
|
if (e["dct:title"] && (i["dct:title"] = E(e["dct:title"])), e["dct:description"] && (i["dct:description"] = E(
|
|
209
209
|
e["dct:description"]
|
|
210
|
-
)), e["dct:modified"] && (i["dct:modified"] =
|
|
210
|
+
)), e["dct:modified"] && (i["dct:modified"] = oe(
|
|
211
211
|
e["dct:modified"],
|
|
212
212
|
"http://www.w3.org/2001/XMLSchema#date"
|
|
213
213
|
)), e["dct:publisher"]) {
|
|
@@ -232,11 +232,11 @@ function oe(e) {
|
|
|
232
232
|
}
|
|
233
233
|
return i;
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function de(e) {
|
|
236
236
|
var r, i;
|
|
237
237
|
return {
|
|
238
238
|
"dcatde:politicalGeocodingURI": (r = e["dcatapde:politicalGeocodingURI"]) == null ? void 0 : r.map((t) => {
|
|
239
|
-
var
|
|
239
|
+
var u;
|
|
240
240
|
const p = {
|
|
241
241
|
districtKey: "Kreis",
|
|
242
242
|
governmentDistrictKey: "Bezirk",
|
|
@@ -249,38 +249,38 @@ function ne(e) {
|
|
|
249
249
|
return a = p[a] || a, {
|
|
250
250
|
isValid: !0,
|
|
251
251
|
uri: t["@id"],
|
|
252
|
-
id: ((
|
|
252
|
+
id: ((u = t.prefLabel) == null ? void 0 : u.de) || t["@id"].split("/").pop(),
|
|
253
253
|
label: c(t.altLabel),
|
|
254
254
|
inVoc: a
|
|
255
255
|
};
|
|
256
256
|
}),
|
|
257
257
|
"dcat:temporalResolution": (i = e["dct:temporal"]) == null ? void 0 : i.reduce((t, n) => {
|
|
258
|
-
const a = o(n["dcat:startDate"]),
|
|
258
|
+
const a = o(n["dcat:startDate"]), u = o(n["dcat:endDate"]), b = f(a) || "", g = f(u) || "", m = typeof a != "string" && (a == null ? void 0 : a["@type"]) === "http://www.w3.org/2001/XMLSchema#dateTime" ? "dateTime" : "date", B = m === "date" ? b : b.split("T")[0], h = m === "date" ? g : g.split("T")[0], R = m === "dateTime" ? b.split("T")[1] : "", L = m === "dateTime" ? g.split("T")[1] : "";
|
|
259
259
|
return {
|
|
260
260
|
isValid: !0,
|
|
261
261
|
type: "dct:PeriodOfTime",
|
|
262
262
|
"dct:temporal": [
|
|
263
263
|
{
|
|
264
264
|
dataType: m,
|
|
265
|
-
"dcat:startDate":
|
|
265
|
+
"dcat:startDate": B,
|
|
266
266
|
"dcat:endDate": h,
|
|
267
267
|
startTime: R || "",
|
|
268
|
-
endTime:
|
|
268
|
+
endTime: L || ""
|
|
269
269
|
}
|
|
270
270
|
]
|
|
271
271
|
};
|
|
272
272
|
}, {})
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
|
-
function
|
|
276
|
-
var t, n, p, a,
|
|
275
|
+
function le(e, r) {
|
|
276
|
+
var t, n, p, a, u, b, g, m, B, h, R, L, v, A, d, y, w, T, S, U, V, x, j;
|
|
277
277
|
if (!e)
|
|
278
278
|
return {};
|
|
279
279
|
const i = o(e["spdx:checksum"]);
|
|
280
280
|
return {
|
|
281
281
|
isValid: !0,
|
|
282
282
|
id: r + 1,
|
|
283
|
-
"dcat:accessURL":
|
|
283
|
+
"dcat:accessURL": f(o(e["dcat:accessURL"])) || "",
|
|
284
284
|
"dct:format": {
|
|
285
285
|
// redundancy in label and title for better compatibility
|
|
286
286
|
label: ((t = o(e["dct:format"])) == null ? void 0 : t["purl:identifier"]) || "",
|
|
@@ -289,16 +289,16 @@ function ae(e, r) {
|
|
|
289
289
|
},
|
|
290
290
|
"dct:title": c(e["dct:title"]),
|
|
291
291
|
"dct:description": c(e["dct:description"]),
|
|
292
|
-
"dct:modified":
|
|
293
|
-
"dct:issued":
|
|
294
|
-
"dcat:byteSize":
|
|
292
|
+
"dct:modified": f(o(e["dct:modified"])),
|
|
293
|
+
"dct:issued": f(o(e["dct:issued"])),
|
|
294
|
+
"dcat:byteSize": f(o(e["dcat:byteSize"])),
|
|
295
295
|
"dcatde:licenseAttributionByText": c(e["dcatapde:licenseAttributionByText"]) || "",
|
|
296
296
|
"dct:license": e["dct:license"] ? [
|
|
297
297
|
{
|
|
298
298
|
isValid: !0,
|
|
299
299
|
uri: ((a = o(e["dct:license"])) == null ? void 0 : a["@id"]) || "",
|
|
300
300
|
"dcterms:license": c(
|
|
301
|
-
(
|
|
301
|
+
(u = o(e["dct:license"])) == null ? void 0 : u.altLabel
|
|
302
302
|
) || "",
|
|
303
303
|
label: c(
|
|
304
304
|
(b = o(e["dct:license"])) == null ? void 0 : b.prefLabel
|
|
@@ -308,36 +308,36 @@ function ae(e, r) {
|
|
|
308
308
|
) || ""
|
|
309
309
|
}
|
|
310
310
|
] : [],
|
|
311
|
-
"dct:accessRights":
|
|
311
|
+
"dct:accessRights": f(
|
|
312
312
|
o(e["dct:accessRights"])
|
|
313
313
|
),
|
|
314
314
|
"dcatap:availability": {
|
|
315
315
|
// Redundant label and title for better compatibility
|
|
316
316
|
label: ((m = o(e["dcatap:availability"])) == null ? void 0 : m.prefLabel) || "",
|
|
317
|
-
title: ((
|
|
317
|
+
title: ((B = o(e["dcatap:availability"])) == null ? void 0 : B.prefLabel) || "",
|
|
318
318
|
uri: ((h = o(e["dcatap:availability"])) == null ? void 0 : h["@id"]) || ""
|
|
319
319
|
},
|
|
320
|
-
"dct:language":
|
|
320
|
+
"dct:language": F({
|
|
321
321
|
label: `${c(
|
|
322
322
|
(R = o(e["dct:language"])) == null ? void 0 : R["purl:identifier"]
|
|
323
323
|
)} (${c(
|
|
324
|
-
(
|
|
324
|
+
(L = o(e["dct:language"])) == null ? void 0 : L["purl:identifier"]
|
|
325
325
|
)})`,
|
|
326
|
-
uri: ((
|
|
326
|
+
uri: ((v = o(e["dct:language"])) == null ? void 0 : v["@id"]) || ""
|
|
327
327
|
}),
|
|
328
|
-
"dcat:mediaType":
|
|
328
|
+
"dcat:mediaType": F({
|
|
329
329
|
label: c(
|
|
330
|
-
(
|
|
330
|
+
(A = o(e["dcat:mediaType"])) == null ? void 0 : A.prefLabel
|
|
331
331
|
) || "",
|
|
332
332
|
uri: ((d = o(e["dcat:mediaType"])) == null ? void 0 : d["@id"]) || ""
|
|
333
333
|
}),
|
|
334
|
-
"dcat:compressFormat":
|
|
334
|
+
"dcat:compressFormat": F({
|
|
335
335
|
label: c(
|
|
336
336
|
(y = o(e["dcat:compressFormat"])) == null ? void 0 : y.prefLabel
|
|
337
337
|
) || "",
|
|
338
338
|
uri: ((w = o(e["dcat:compressFormat"])) == null ? void 0 : w["@id"]) || ""
|
|
339
339
|
}),
|
|
340
|
-
"dcat:packageFormat":
|
|
340
|
+
"dcat:packageFormat": F({
|
|
341
341
|
label: c(
|
|
342
342
|
(T = o(e["dcat:packageFormat"])) == null ? void 0 : T.prefLabel
|
|
343
343
|
) || "",
|
|
@@ -345,124 +345,129 @@ function ae(e, r) {
|
|
|
345
345
|
}),
|
|
346
346
|
"adms:status": ((U = o(e["adms:status"])) == null ? void 0 : U["@id"]) || "",
|
|
347
347
|
checksum: {
|
|
348
|
-
title:
|
|
349
|
-
"spdx:checksum": ((
|
|
350
|
-
uri: (
|
|
348
|
+
title: f(o(i == null ? void 0 : i["spdx:checksumValue"])),
|
|
349
|
+
"spdx:checksum": ((V = f(o(i == null ? void 0 : i["spdx:algorithm"]))) == null ? void 0 : V.split("_").pop()) || "",
|
|
350
|
+
uri: (x = f(
|
|
351
351
|
o(i == null ? void 0 : i["spdx:algorithm"])
|
|
352
|
-
)) == null ? void 0 :
|
|
352
|
+
)) == null ? void 0 : x.replace("spdx:", "http://spdx.org/rdf/terms#")
|
|
353
353
|
},
|
|
354
|
-
accessServices:
|
|
355
|
-
documentations:
|
|
356
|
-
conformsToItems: (
|
|
354
|
+
accessServices: me(e["dcat:accessService"] || []),
|
|
355
|
+
documentations: be(e["foaf:page"] || []),
|
|
356
|
+
conformsToItems: (j = e["dct:conformsTo"]) == null ? void 0 : j.map((D, l) => ({
|
|
357
357
|
// for some reason dct:conformsTo is different from the one on dcat:dataset level
|
|
358
|
-
id:
|
|
359
|
-
"dcat:accessURL":
|
|
360
|
-
"dct:title": c(
|
|
361
|
-
"dcat:downloadURL":
|
|
358
|
+
id: l + 1,
|
|
359
|
+
"dcat:accessURL": D["@id"],
|
|
360
|
+
"dct:title": c(D["rdfs:label"]) || "",
|
|
361
|
+
"dcat:downloadURL": D["@id"],
|
|
362
362
|
// redundancy to match properties on dcat:dataset level
|
|
363
|
-
"rdfs:label": c(
|
|
364
|
-
uri:
|
|
363
|
+
"rdfs:label": c(D["rdfs:label"]) || "",
|
|
364
|
+
uri: D["@id"]
|
|
365
365
|
})).filter(Boolean)
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function se(e) {
|
|
369
369
|
const r = {
|
|
370
370
|
"dcat:distribution": []
|
|
371
371
|
};
|
|
372
372
|
if (e["dcat:distribution"]) {
|
|
373
|
-
const i =
|
|
374
|
-
r["dcat:distribution"] = i.map((t, n) =>
|
|
373
|
+
const i = M(e["dcat:distribution"]);
|
|
374
|
+
r["dcat:distribution"] = i.map((t, n) => le(t, n)).filter((t) => Object.keys(t).length > 0);
|
|
375
375
|
}
|
|
376
376
|
return console.log(r), r;
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function fe(e) {
|
|
379
379
|
return {
|
|
380
380
|
reviewAndPublishPage: [{ isValid: !0 }]
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
var i, t, n, p, a,
|
|
383
|
+
function ue(e) {
|
|
384
|
+
var i, t, n, p, a, u, b, g, m, B, h, R, L, v, A, d, y, w, T, S, U, V, x, j, D;
|
|
385
385
|
const r = {
|
|
386
386
|
"dct:language": (i = e["dct:language"]) == null ? void 0 : i.map((l) => P(l)).filter(Boolean),
|
|
387
387
|
"dct:conformsTo": (t = e["dct:conformsTo"]) == null ? void 0 : t.map((l) => ({
|
|
388
388
|
"rdfs:label": c(l["rdfs:label"]) || "",
|
|
389
|
-
|
|
389
|
+
"@id": l["@id"]
|
|
390
390
|
})).filter(Boolean),
|
|
391
|
-
"dct:accessRights": e["dct:accessRights"] ?
|
|
391
|
+
"dct:accessRights": e["dct:accessRights"] ? s(P(e["dct:accessRights"])) : [],
|
|
392
392
|
"dct:provenance": (n = e["dct:provenance"]) == null ? void 0 : n.map((l) => ({
|
|
393
393
|
"rdfs:label": c(l["rdfs:label"]) || "",
|
|
394
394
|
uri: l["@id"]
|
|
395
395
|
})).filter(Boolean),
|
|
396
|
-
"dct:accrualPeriodicity": e["dct:accrualPeriodicity"] ?
|
|
396
|
+
"dct:accrualPeriodicity": e["dct:accrualPeriodicity"] ? s(P(e["dct:accrualPeriodicity"])) : [],
|
|
397
397
|
"dct:type": (p = e["dct:type"]) == null ? void 0 : p.map((l) => P(l)).filter(Boolean),
|
|
398
398
|
"dcat:spatialResolutionInMeters": ((a = e["dcat:spatialResolutionInMeters"]) == null ? void 0 : a.map(K)) || void 0,
|
|
399
399
|
"dcat:temporalResolution": e["dcat:temporalResolution"] ? e["dcat:temporalResolution"].map(K).map((l) => {
|
|
400
|
-
const
|
|
400
|
+
const _ = l["@value"].match(
|
|
401
401
|
/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/
|
|
402
402
|
);
|
|
403
|
-
if (
|
|
404
|
-
const [,
|
|
405
|
-
(
|
|
403
|
+
if (_) {
|
|
404
|
+
const [, C, q, $, N, H, X] = _.map(
|
|
405
|
+
(Y) => Y || "0"
|
|
406
406
|
);
|
|
407
407
|
return {
|
|
408
|
-
Year:
|
|
409
|
-
Month:
|
|
410
|
-
Day:
|
|
411
|
-
Hour:
|
|
412
|
-
Minute:
|
|
413
|
-
Second:
|
|
408
|
+
Year: C,
|
|
409
|
+
Month: q,
|
|
410
|
+
Day: $,
|
|
411
|
+
Hour: N,
|
|
412
|
+
Minute: H,
|
|
413
|
+
Second: X
|
|
414
414
|
};
|
|
415
415
|
}
|
|
416
416
|
}).filter(Boolean) : void 0,
|
|
417
|
-
"dcat:qualifiedRelation": (
|
|
417
|
+
"dcat:qualifiedRelation": (u = s(
|
|
418
418
|
e["dcat:qualifiedRelation"]
|
|
419
|
-
)) == null ? void 0 :
|
|
420
|
-
"dct:creator": (b =
|
|
421
|
-
"dct:contributor": (g =
|
|
419
|
+
)) == null ? void 0 : u.filter(Boolean),
|
|
420
|
+
"dct:creator": (b = s(e["dct:creator"])) == null ? void 0 : b.filter(Boolean),
|
|
421
|
+
"dct:contributor": (g = s(e["dct:contributor"])) == null ? void 0 : g.filter(Boolean),
|
|
422
422
|
"dcatde:contributorID": (m = e["dcatapde:contributorID"]) == null ? void 0 : m.map((l) => P(l)).filter(Boolean),
|
|
423
|
-
"dcatde:geocodingDescription": (
|
|
423
|
+
"dcatde:geocodingDescription": (B = s(
|
|
424
424
|
e["dcatapde:geocodingDescription"]
|
|
425
|
-
)) == null ? void 0 :
|
|
426
|
-
"dct:identifier": e["dct:identifier"] ?
|
|
427
|
-
|
|
428
|
-
|
|
425
|
+
)) == null ? void 0 : B.filter(Boolean),
|
|
426
|
+
"dct:identifier": (h = e["dct:identifier"]) == null ? void 0 : h.map((l) => ({
|
|
427
|
+
"@value": l
|
|
428
|
+
})),
|
|
429
|
+
"adms:identifier": (R = s(e["adms:identifier"])) == null ? void 0 : R.filter(Boolean),
|
|
430
|
+
"owl:versionInfo": (L = e["owl:versionInfo"]) == null ? void 0 : L.map((l) => ({
|
|
429
431
|
"@value": l
|
|
430
432
|
})),
|
|
431
433
|
"adms:versionNotes": e["adms:versionNotes"],
|
|
432
|
-
"dcatde:legalBasis": (
|
|
434
|
+
"dcatde:legalBasis": (v = s(e["dcatapde:legalBasis"])) == null ? void 0 : v.filter(
|
|
433
435
|
Boolean
|
|
434
436
|
),
|
|
435
|
-
"dct:relation": (
|
|
436
|
-
"dcat:landingPage": (
|
|
437
|
+
"dct:relation": (A = s(e["dct:relation"])) == null ? void 0 : A.filter(Boolean),
|
|
438
|
+
"dcat:landingPage": (d = s(e["dcat:landingPage"])) == null ? void 0 : d.filter(
|
|
437
439
|
Boolean
|
|
438
440
|
),
|
|
439
|
-
"prov:wasGeneratedBy": (
|
|
441
|
+
"prov:wasGeneratedBy": (y = s(e["prov:wasGeneratedBy"])) == null ? void 0 : y.filter(
|
|
440
442
|
Boolean
|
|
441
443
|
),
|
|
442
|
-
"dct:isReferencedBy": (
|
|
444
|
+
"dct:isReferencedBy": (w = s(e["dct:isReferencedBy"])) == null ? void 0 : w.filter(
|
|
443
445
|
Boolean
|
|
444
446
|
),
|
|
445
|
-
"dct:source": (
|
|
446
|
-
"dct:hasVersion": (
|
|
447
|
-
"dct:isVersionOf": (
|
|
448
|
-
"prov:qualifiedAttribution": (
|
|
447
|
+
"dct:source": (T = s(e["dct:source"])) == null ? void 0 : T.filter(Boolean),
|
|
448
|
+
"dct:hasVersion": (S = s(e["dct:hasVersion"])) == null ? void 0 : S.filter(Boolean),
|
|
449
|
+
"dct:isVersionOf": (U = s(e["dct:isVersionOf"])) == null ? void 0 : U.filter(Boolean),
|
|
450
|
+
"prov:qualifiedAttribution": (V = s(
|
|
449
451
|
e["prov:qualifiedAttribution"]
|
|
450
|
-
)) == null ? void 0 :
|
|
452
|
+
)) == null ? void 0 : V.filter(Boolean),
|
|
453
|
+
"dcat:keyword": (x = s(e["dcat:keyword"])) == null ? void 0 : x.filter(Boolean),
|
|
454
|
+
"dct:spatial": (j = s(e["dct:spatial"])) == null ? void 0 : j.filter(Boolean),
|
|
455
|
+
"dct:references": (D = s(e["dct:references"])) == null ? void 0 : D.filter(Boolean)
|
|
451
456
|
};
|
|
452
|
-
return
|
|
457
|
+
return re(r);
|
|
453
458
|
}
|
|
454
|
-
function
|
|
459
|
+
function pe(e) {
|
|
455
460
|
return {
|
|
456
|
-
Landing:
|
|
457
|
-
Discoverability:
|
|
458
|
-
BasicInfos:
|
|
459
|
-
Covering:
|
|
460
|
-
DistributionSimple:
|
|
461
|
-
ReviewAndPublish:
|
|
462
|
-
Additionals:
|
|
461
|
+
Landing: ne(),
|
|
462
|
+
Discoverability: ae(e),
|
|
463
|
+
BasicInfos: ce(e),
|
|
464
|
+
Covering: de(e),
|
|
465
|
+
DistributionSimple: se(e),
|
|
466
|
+
ReviewAndPublish: fe(),
|
|
467
|
+
Additionals: ue(e)
|
|
463
468
|
};
|
|
464
469
|
}
|
|
465
|
-
function
|
|
470
|
+
function me(e) {
|
|
466
471
|
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((r, i) => {
|
|
467
472
|
var t, n;
|
|
468
473
|
return {
|
|
@@ -474,7 +479,7 @@ function ue(e) {
|
|
|
474
479
|
};
|
|
475
480
|
});
|
|
476
481
|
}
|
|
477
|
-
function
|
|
482
|
+
function be(e) {
|
|
478
483
|
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((r, i) => {
|
|
479
484
|
var t, n, p, a;
|
|
480
485
|
return {
|
|
@@ -489,14 +494,14 @@ function fe(e) {
|
|
|
489
494
|
});
|
|
490
495
|
}
|
|
491
496
|
export {
|
|
492
|
-
|
|
497
|
+
s as asSomeArray,
|
|
493
498
|
c as extractLocalizedString,
|
|
494
|
-
|
|
499
|
+
f as extractStringValue,
|
|
495
500
|
o as getFirstItem,
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
501
|
+
M as normalizeToArray,
|
|
502
|
+
re as purgeNullishAndEmptyProperties,
|
|
503
|
+
me as toAccessService,
|
|
504
|
+
be as toDocument,
|
|
505
|
+
pe as toDpi,
|
|
506
|
+
Le as useDpiSimpleLoader
|
|
502
507
|
};
|
|
@@ -1,93 +1,93 @@
|
|
|
1
1
|
import "axios";
|
|
2
|
-
import { asSomeArray as
|
|
3
|
-
let
|
|
4
|
-
function
|
|
2
|
+
import { asSomeArray as _ } from "../../composables/useDpiSimpleLoader.js";
|
|
3
|
+
let e = { distribution: [], dataset: {}, meta: {} };
|
|
4
|
+
function Z(t) {
|
|
5
5
|
return t.replace(/[^a-z0-9\s]/gi, "").replace(/\s+/g, "-").toLowerCase();
|
|
6
6
|
}
|
|
7
|
-
async function
|
|
8
|
-
var h, v, f, k, O, j,
|
|
9
|
-
const
|
|
7
|
+
async function et(t, g, s, p) {
|
|
8
|
+
var h, v, f, k, D, O, j, R, w, S, I, x, B, T, P, C, U, L, M, G, $, F, N, q, z, X, W, E, H, Y;
|
|
9
|
+
const u = g.specification.prefixes;
|
|
10
10
|
let l = [];
|
|
11
11
|
const o = Object.keys(t);
|
|
12
|
-
|
|
12
|
+
e.dataset["dcat:distribution"] = [];
|
|
13
13
|
for (let c = 0; c < t.DistributionSimple["dcat:distribution"].length; c++)
|
|
14
|
-
l.push(crypto.randomUUID()),
|
|
14
|
+
l.push(crypto.randomUUID()), e.dataset["dcat:distribution"].push({
|
|
15
15
|
"@id": `https://piveau.io/set/distribution/${l[c]}`
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const Q = new URLSearchParams(window.location.search).get("edit");
|
|
18
18
|
let y = "";
|
|
19
19
|
try {
|
|
20
20
|
for (let c = 0; c < o.length; c++) {
|
|
21
21
|
if (o[c] === "Discoverability") {
|
|
22
22
|
let i = [];
|
|
23
|
-
for (let
|
|
23
|
+
for (let d = 1; d < t.Discoverability.discoverabilityPage.length; d++)
|
|
24
24
|
i.push({
|
|
25
|
-
"@id": t.Discoverability.discoverabilityPage[
|
|
25
|
+
"@id": t.Discoverability.discoverabilityPage[d].uri
|
|
26
26
|
});
|
|
27
|
-
|
|
27
|
+
e.dataset["dcat:theme"] = i, t.Discoverability.hvdPage && Object.keys(t.Discoverability.hvdPage).length !== 0 && t.Discoverability.hvdPage[0].label !== void 0 && (e.dataset["dcatap:hvdCategory"] = {
|
|
28
28
|
"@id": (v = (h = t.Discoverability) == null ? void 0 : h.hvdPage) == null ? void 0 : v[0].uri
|
|
29
|
-
},
|
|
29
|
+
}, e.dataset["dcatap:applicableLegislation"] = {
|
|
30
30
|
"@id": "http://data.europa.eu/eli/reg_impl/2023/138/oj"
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
if (o[c] === "BasicInfos") {
|
|
34
|
-
|
|
34
|
+
e.dataset["dpi:isDPIv3"] = !0;
|
|
35
35
|
for (let i = 0; i < Object.keys(t.BasicInfos).length; i++)
|
|
36
|
-
Object.keys(t.BasicInfos)[i] === "dct:title" && (
|
|
36
|
+
Object.keys(t.BasicInfos)[i] === "dct:title" && (e.dataset["dct:title"] = t.BasicInfos["dct:title"][0] || "", y = Z(
|
|
37
37
|
t.BasicInfos["dct:title"][0]["@value"]
|
|
38
|
-
),
|
|
38
|
+
), Q === "true" && (y = t.BasicInfos.datasetID)), Object.keys(t.BasicInfos)[i] === "dct:description" && (e.dataset["dct:description"] = t.BasicInfos["dct:description"][0] || ""), Object.keys(t.BasicInfos)[i] === "dct:modified" && (e.dataset["dct:modified"] = t.BasicInfos["dct:modified"][0] || ""), Object.keys(t.BasicInfos)[i] === "dct:publisher" && (e.dataset["dct:publisher"] = t.BasicInfos["dct:publisher"][0] || ""), Object.keys(t.BasicInfos)[i] === "dcat:contactPoint" && (e.dataset["dcat:contactPoint"] = t.BasicInfos["dcat:contactPoint"][0] || ""), e.dataset["@type"] = "dcat:Dataset", e.meta["dcat:catalog"] = s.permissions[0].rsname, e.meta["@type"] = "dcat:CatalogRecord";
|
|
39
39
|
}
|
|
40
40
|
if (o[c] === "Covering")
|
|
41
41
|
for (let i = 0; i < Object.keys(t.Covering).length; i++) {
|
|
42
42
|
if (Object.keys(t.Covering)[i] === "dcat:temporalResolution" && ((k = (f = t.Covering) == null ? void 0 : f["dcat:temporalResolution"]) == null ? void 0 : k.type) !== void 0) {
|
|
43
|
-
|
|
44
|
-
for (let
|
|
45
|
-
t.Covering["dcat:temporalResolution"].type != null && t.Covering["dcat:temporalResolution"]["dct:temporal"][
|
|
43
|
+
e.dataset["dct:temporal"] = [];
|
|
44
|
+
for (let d = 0; d < t.Covering["dcat:temporalResolution"]["dct:temporal"].length; d++)
|
|
45
|
+
t.Covering["dcat:temporalResolution"].type != null && t.Covering["dcat:temporalResolution"]["dct:temporal"][d].dataType === "date" && (e.dataset["dct:temporal"][d] = {
|
|
46
46
|
"@type": t.Covering["dcat:temporalResolution"].type || "",
|
|
47
47
|
"dcat:endDate": {
|
|
48
|
-
"@value": t.Covering["dcat:temporalResolution"]["dct:temporal"][
|
|
49
|
-
"@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][
|
|
48
|
+
"@value": t.Covering["dcat:temporalResolution"]["dct:temporal"][d]["dcat:endDate"] || "",
|
|
49
|
+
"@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][d].dataType
|
|
50
50
|
},
|
|
51
51
|
"dcat:startDate": {
|
|
52
|
-
"@value": t.Covering["dcat:temporalResolution"]["dct:temporal"][
|
|
53
|
-
"@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][
|
|
52
|
+
"@value": t.Covering["dcat:temporalResolution"]["dct:temporal"][d]["dcat:startDate"] || "",
|
|
53
|
+
"@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][d].dataType
|
|
54
54
|
}
|
|
55
|
-
}), t.Covering["dcat:temporalResolution"].type != null && t.Covering["dcat:temporalResolution"]["dct:temporal"][
|
|
55
|
+
}), t.Covering["dcat:temporalResolution"].type != null && t.Covering["dcat:temporalResolution"]["dct:temporal"][d].dataType === "dateTime" && (e.dataset["dct:temporal"][d] = {
|
|
56
56
|
"@type": t.Covering["dcat:temporalResolution"].type || "",
|
|
57
57
|
"dcat:endDate": {
|
|
58
|
-
"@value": t.Covering["dcat:temporalResolution"]["dct:temporal"][
|
|
59
|
-
"@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][
|
|
58
|
+
"@value": t.Covering["dcat:temporalResolution"]["dct:temporal"][d]["dcat:endDate"] + "T" + t.Covering["dcat:temporalResolution"]["dct:temporal"][d].endTime || "",
|
|
59
|
+
"@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][d].dataType
|
|
60
60
|
},
|
|
61
61
|
"dcat:startDate": {
|
|
62
|
-
"@value": t.Covering["dcat:temporalResolution"]["dct:temporal"][
|
|
63
|
-
"@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][
|
|
62
|
+
"@value": t.Covering["dcat:temporalResolution"]["dct:temporal"][d]["dcat:startDate"] + "T" + t.Covering["dcat:temporalResolution"]["dct:temporal"][d].startTime || "",
|
|
63
|
+
"@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][d].dataType
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
Object.keys(t.Covering)[i] === "dcatde:politicalGeocodingURI" && (
|
|
68
|
-
"@id": ((
|
|
67
|
+
Object.keys(t.Covering)[i] === "dcatde:politicalGeocodingURI" && (e.dataset["dcatde:politicalGeocodingURI"] = {
|
|
68
|
+
"@id": ((O = (D = t.Covering["dcatde:politicalGeocodingURI"]) == null ? void 0 : D[0]) == null ? void 0 : O.uri) || ""
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
if (o[c] === "DistributionSimple")
|
|
72
72
|
for (let i = 0; i < t.DistributionSimple["dcat:distribution"].length; i++) {
|
|
73
|
-
|
|
73
|
+
e.distribution[i] = {}, e.distribution[i]["@type"] = "dcat:Distribution", e.distribution[i]["@id"] = `https://piveau.io/set/distribution/${l[i]}`, t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"] && (e.distribution[i]["dcat:accessURL"] = {
|
|
74
74
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"].startsWith("https://www.") || t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"].startsWith("http://www.") ? t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"] : `https://www.${t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"]}`
|
|
75
75
|
// Standardwert wenn beide false
|
|
76
76
|
});
|
|
77
|
-
let
|
|
78
|
-
|
|
79
|
-
"@id": (
|
|
80
|
-
},
|
|
77
|
+
let d = (R = (j = t.DistributionSimple) == null ? void 0 : j["dct:license"]) == null ? void 0 : R[0];
|
|
78
|
+
d === void 0 && (d = (x = (I = (S = (w = t.DistributionSimple) == null ? void 0 : w["dcat:distribution"]) == null ? void 0 : S[0]) == null ? void 0 : I["dct:license"]) == null ? void 0 : x[0]), e.distribution[i]["dct:license"] = {
|
|
79
|
+
"@id": (d == null ? void 0 : d.uri) || ""
|
|
80
|
+
}, e.distribution[i]["dcatde:licenseAttributionByText"] = {
|
|
81
81
|
"@language": "de",
|
|
82
|
-
"@value": (
|
|
82
|
+
"@value": (d == null ? void 0 : d.attribution) || ""
|
|
83
83
|
};
|
|
84
84
|
const b = (P = (T = (B = t.DistributionSimple) == null ? void 0 : B["dcat:distribution"]) == null ? void 0 : T[i]) == null ? void 0 : P["dct:format"];
|
|
85
|
-
b && (
|
|
85
|
+
b && (e.distribution[i]["dct:format"] = {
|
|
86
86
|
"@id": (b == null ? void 0 : b.uri) || ""
|
|
87
87
|
});
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
const J = ((L = (U = (C = t.DistributionSimple) == null ? void 0 : C["dcat:distribution"]) == null ? void 0 : U[i]) == null ? void 0 : L.conformsToItems) || [];
|
|
89
|
+
J && (e.distribution[i]["dct:conformsTo"] = _(
|
|
90
|
+
J
|
|
91
91
|
).filter(
|
|
92
92
|
(n) => n && (n["dcat:downloadURL"] || n["dct:title"])
|
|
93
93
|
).map((n) => ({
|
|
@@ -96,32 +96,32 @@ async function m(t, g, s, p) {
|
|
|
96
96
|
"@type": "dct:Standard"
|
|
97
97
|
}))), Object.keys(
|
|
98
98
|
t.DistributionSimple["dcat:distribution"][i]["dcat:mediaType"]
|
|
99
|
-
).length !== 0 && (
|
|
99
|
+
).length !== 0 && (e.distribution[i]["dcat:mediaType"] = {
|
|
100
100
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:mediaType"].uri || ""
|
|
101
|
-
}), t.DistributionSimple["dcat:distribution"][i]["dcat:byteSize"] && (
|
|
101
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dcat:byteSize"] && (e.distribution[i]["dcat:byteSize"] = {
|
|
102
102
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dcat:byteSize"] || ""
|
|
103
103
|
// "@type": "http://www.w3.org/2001/XMLSchema#decimal",
|
|
104
|
-
}), t.DistributionSimple["dcat:distribution"][i]["dcatde:licenseAttributionByText"] && (
|
|
104
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dcatde:licenseAttributionByText"] && (e.distribution[i]["dcatde:licenseAttributionByText"] = {
|
|
105
105
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dcatde:licenseAttributionByText"] || ""
|
|
106
106
|
}), Object.keys(
|
|
107
107
|
t.DistributionSimple["dcat:distribution"][i]["dcatap:availability"]
|
|
108
|
-
).length !== 0 && (
|
|
108
|
+
).length !== 0 && (e.distribution[i]["dcatap:availability"] = {
|
|
109
109
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcatap:availability"].uri || ""
|
|
110
|
-
}), t.DistributionSimple["dcat:distribution"][i]["dct:issued"] && (
|
|
110
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dct:issued"] && (e.distribution[i]["dct:issued"] = {
|
|
111
111
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:issued"] || ""
|
|
112
112
|
// "@type": "http://www.w3.org/2001/XMLSchema#date",
|
|
113
|
-
}), t.DistributionSimple["dcat:distribution"][i]["dct:modified"] && (
|
|
113
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dct:modified"] && (e.distribution[i]["dct:modified"] = {
|
|
114
114
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:modified"] || ""
|
|
115
115
|
// "@type": "http://www.w3.org/2001/XMLSchema#date",
|
|
116
|
-
}), t.DistributionSimple["dcat:distribution"][i]["dct:description"] && (
|
|
116
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dct:description"] && (e.distribution[i]["dct:description"] = {
|
|
117
117
|
"@language": "de",
|
|
118
118
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:description"]
|
|
119
|
-
}), t.DistributionSimple["dcat:distribution"][i]["dct:title"] && (
|
|
119
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dct:title"] && (e.distribution[i]["dct:title"] = {
|
|
120
120
|
"@language": "de",
|
|
121
121
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:title"]
|
|
122
122
|
}), Object.keys(
|
|
123
123
|
t.DistributionSimple["dcat:distribution"][i]["dct:accessRights"]
|
|
124
|
-
).length !== 0 && (
|
|
124
|
+
).length !== 0 && (e.distribution[i]["dct:accessRights"] = {
|
|
125
125
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dct:accessRights"].uri
|
|
126
126
|
}), t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"] != null && Object.keys(
|
|
127
127
|
t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"]
|
|
@@ -130,13 +130,13 @@ async function m(t, g, s, p) {
|
|
|
130
130
|
Object.keys(
|
|
131
131
|
t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"]
|
|
132
132
|
).length
|
|
133
|
-
),
|
|
133
|
+
), e.distribution[i]["dcat:compressFormat"] = {
|
|
134
134
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"].uri || ""
|
|
135
135
|
}), Object.keys(
|
|
136
136
|
t.DistributionSimple["dcat:distribution"][i]["dcat:packageFormat"]
|
|
137
|
-
).length !== 0 && (
|
|
137
|
+
).length !== 0 && (e.distribution[i]["dcat:packageFormat"] = {
|
|
138
138
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:packageFormat"].uri || ""
|
|
139
|
-
}), t.DistributionSimple["dcat:distribution"][i].checksum.uri !== "" && (
|
|
139
|
+
}), t.DistributionSimple["dcat:distribution"][i].checksum.uri !== "" && (e.distribution[i]["spdx:checksum"] = {
|
|
140
140
|
"@type": "spdx:checksum",
|
|
141
141
|
"spdx:checksumValue": t.DistributionSimple["dcat:distribution"][i].checksum.title || "",
|
|
142
142
|
"spdx:algorithm": {
|
|
@@ -144,11 +144,11 @@ async function m(t, g, s, p) {
|
|
|
144
144
|
}
|
|
145
145
|
}), Object.keys(
|
|
146
146
|
t.DistributionSimple["dcat:distribution"][i]["dct:language"]
|
|
147
|
-
).length !== 0 && (
|
|
147
|
+
).length !== 0 && (e.distribution[i]["dct:language"] = {
|
|
148
148
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dct:language"].uri
|
|
149
149
|
});
|
|
150
|
-
const
|
|
151
|
-
|
|
150
|
+
const K = (($ = (G = (M = t.DistributionSimple) == null ? void 0 : M["dcat:distribution"]) == null ? void 0 : G[i]) == null ? void 0 : $.accessServices) || [];
|
|
151
|
+
K && (e.distribution[i]["dcat:accessService"] = (F = _(K)) == null ? void 0 : F.filter(
|
|
152
152
|
(n) => n && (n["dct:title"] || n["dct:description"] || n["dcat:downloadURL"] || n["dcat:endpointURL"])
|
|
153
153
|
).map((n) => {
|
|
154
154
|
const a = {
|
|
@@ -166,8 +166,8 @@ async function m(t, g, s, p) {
|
|
|
166
166
|
return r !== void 0 && (a["dcat:endpointURL"] = {
|
|
167
167
|
"@id": r
|
|
168
168
|
}), a;
|
|
169
|
-
})),
|
|
170
|
-
for (let n = 0; n < ((z = (
|
|
169
|
+
})), e.distribution[i]["foaf:page"] || (e.distribution[i]["foaf:page"] = []);
|
|
170
|
+
for (let n = 0; n < ((z = (q = (N = t.DistributionSimple) == null ? void 0 : N["dcat:distribution"]) == null ? void 0 : q[i]) == null ? void 0 : z.documentations.length); n++) {
|
|
171
171
|
const a = t.DistributionSimple["dcat:distribution"][i].documentations[n];
|
|
172
172
|
if ((a == null ? void 0 : a["dct:title"]) !== void 0) {
|
|
173
173
|
const r = {
|
|
@@ -184,23 +184,22 @@ async function m(t, g, s, p) {
|
|
|
184
184
|
"@id": a["dcat:accessURL"]
|
|
185
185
|
}), (a == null ? void 0 : a["dct:format"]) !== void 0 && (r["dct:format"] = {
|
|
186
186
|
"@id": a.formatUri
|
|
187
|
-
}),
|
|
187
|
+
}), e.distribution[i]["foaf:page"][n] = r;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
if (o[c], o[c] === "Additionals")
|
|
192
192
|
try {
|
|
193
193
|
for (let i = 0; i < Object.keys(t.Additionals).length; i++) {
|
|
194
|
-
if (Object.keys(t.Additionals)[i] === "dcat:landingPage" && (
|
|
195
|
-
"@id": t.Additionals["dcat:landingPage"][0]["@id"]
|
|
196
|
-
}), Object.keys(t.Additionals)[i] === "dcat:keyword") {
|
|
194
|
+
if (Object.keys(t.Additionals)[i] === "dcat:landingPage" && (e.dataset["dcat:landingPage"] = [...t.Additionals["dcat:landingPage"]]), Object.keys(t.Additionals)[i] === "dcat:keyword") {
|
|
197
195
|
console.log(
|
|
198
196
|
"#####################",
|
|
199
197
|
Object.keys(t.Additionals)[i]
|
|
200
198
|
);
|
|
201
|
-
for (let
|
|
202
|
-
|
|
203
|
-
"@value": t.Additionals["dcat:keyword"][
|
|
199
|
+
for (let d = 0; d < t.Additionals["dcat:keyword"].length; d++)
|
|
200
|
+
e.dataset["dcat:keyword"] === void 0 && (e.dataset["dcat:keyword"] = []), e.dataset["dcat:keyword"].push({
|
|
201
|
+
"@value": t.Additionals["dcat:keyword"][d]["@value"],
|
|
202
|
+
"@language": ((W = (X = t.Additionals["dcat:keyword"]) == null ? void 0 : X[d]) == null ? void 0 : W["@language"]) || "de"
|
|
204
203
|
});
|
|
205
204
|
}
|
|
206
205
|
if (Object.keys(t.Additionals)[i] === "dct:references") {
|
|
@@ -208,9 +207,9 @@ async function m(t, g, s, p) {
|
|
|
208
207
|
"#####################",
|
|
209
208
|
Object.keys(t.Additionals)[i]
|
|
210
209
|
);
|
|
211
|
-
for (let
|
|
212
|
-
|
|
213
|
-
"@id": t.Additionals["dct:references"][
|
|
210
|
+
for (let d = 0; d < t.Additionals["dct:references"].length; d++)
|
|
211
|
+
e.dataset["dct:references"] === void 0 && (e.dataset["dct:references"] = []), e.dataset["dct:references"].push({
|
|
212
|
+
"@id": t.Additionals["dct:references"][d]["@id"]
|
|
214
213
|
});
|
|
215
214
|
}
|
|
216
215
|
if (Object.keys(t.Additionals)[i] === "dct:spatial") {
|
|
@@ -218,9 +217,9 @@ async function m(t, g, s, p) {
|
|
|
218
217
|
"#####################",
|
|
219
218
|
Object.keys(t.Additionals)[i]
|
|
220
219
|
);
|
|
221
|
-
for (let
|
|
222
|
-
|
|
223
|
-
"@id": t.Additionals["dct:spatial"][
|
|
220
|
+
for (let d = 0; d < t.Additionals["dct:spatial"].length; d++)
|
|
221
|
+
e.dataset["dct:spatial"] === void 0 && (e.dataset["dct:spatial"] = []), e.dataset["dct:spatial"].push({
|
|
222
|
+
"@id": t.Additionals["dct:spatial"][d]["@id"]
|
|
224
223
|
});
|
|
225
224
|
}
|
|
226
225
|
if (Object.keys(t.Additionals)[i] === "dcatde:geocodingDescription") {
|
|
@@ -228,9 +227,9 @@ async function m(t, g, s, p) {
|
|
|
228
227
|
"#####################",
|
|
229
228
|
Object.keys(t.Additionals)[i]
|
|
230
229
|
);
|
|
231
|
-
for (let
|
|
232
|
-
|
|
233
|
-
"@value": t.Additionals["dcatde:geocodingDescription"][
|
|
230
|
+
for (let d = 0; d < t.Additionals["dcatde:geocodingDescription"].length; d++)
|
|
231
|
+
e.dataset["dcatde:geocodingDescription"] === void 0 && (e.dataset["dcatde:geocodingDescription"] = []), e.dataset["dcatde:geocodingDescription"].push({
|
|
232
|
+
"@value": t.Additionals["dcatde:geocodingDescription"][d]["@value"]
|
|
234
233
|
});
|
|
235
234
|
}
|
|
236
235
|
if (Object.keys(t.Additionals)[i] === "dct:identifier") {
|
|
@@ -238,9 +237,9 @@ async function m(t, g, s, p) {
|
|
|
238
237
|
"#####################",
|
|
239
238
|
Object.keys(t.Additionals)[i]
|
|
240
239
|
);
|
|
241
|
-
for (let
|
|
242
|
-
|
|
243
|
-
"@value": t.Additionals["dct:identifier"][
|
|
240
|
+
for (let d = 0; d < t.Additionals["dct:identifier"].length; d++)
|
|
241
|
+
e.dataset["dct:identifier"] === void 0 && (e.dataset["dct:identifier"] = []), e.dataset["dct:identifier"].push({
|
|
242
|
+
"@value": t.Additionals["dct:identifier"][d]["@value"]
|
|
244
243
|
});
|
|
245
244
|
}
|
|
246
245
|
if (Object.keys(t.Additionals)[i] === "adms:identifier") {
|
|
@@ -248,9 +247,9 @@ async function m(t, g, s, p) {
|
|
|
248
247
|
"#####################",
|
|
249
248
|
Object.keys(t.Additionals)[i]
|
|
250
249
|
);
|
|
251
|
-
for (let
|
|
252
|
-
|
|
253
|
-
"@id": t.Additionals["adms:identifier"][
|
|
250
|
+
for (let d = 0; d < t.Additionals["adms:identifier"].length; d++)
|
|
251
|
+
e.dataset["adms:identifier"] === void 0 && (e.dataset["adms:identifier"] = []), e.dataset["adms:identifier"].push({
|
|
252
|
+
"@id": t.Additionals["adms:identifier"][d]["@id"]
|
|
254
253
|
});
|
|
255
254
|
}
|
|
256
255
|
if (Object.keys(t.Additionals)[i] === "adms:versionNotes") {
|
|
@@ -258,9 +257,9 @@ async function m(t, g, s, p) {
|
|
|
258
257
|
"#####################",
|
|
259
258
|
Object.keys(t.Additionals)[i]
|
|
260
259
|
);
|
|
261
|
-
for (let
|
|
262
|
-
|
|
263
|
-
"@value": t.Additionals["adms:versionNotes"][
|
|
260
|
+
for (let d = 0; d < t.Additionals["adms:versionNotes"].length; d++)
|
|
261
|
+
e.dataset["adms:versionNotes"] === void 0 && (e.dataset["adms:versionNotes"] = []), e.dataset["adms:versionNotes"].push({
|
|
262
|
+
"@value": t.Additionals["adms:versionNotes"][d]["@value"]
|
|
264
263
|
});
|
|
265
264
|
}
|
|
266
265
|
if (Object.keys(t.Additionals)[i] === "dcatde:legalBasis") {
|
|
@@ -268,9 +267,10 @@ async function m(t, g, s, p) {
|
|
|
268
267
|
"#####################",
|
|
269
268
|
Object.keys(t.Additionals)[i]
|
|
270
269
|
);
|
|
271
|
-
for (let
|
|
272
|
-
|
|
273
|
-
"@value": t.Additionals["dcatde:legalBasis"][
|
|
270
|
+
for (let d = 0; d < t.Additionals["dcatde:legalBasis"].length; d++)
|
|
271
|
+
e.dataset["dcatde:legalBasis"] === void 0 && (e.dataset["dcatde:legalBasis"] = []), e.dataset["dcatde:legalBasis"].push({
|
|
272
|
+
"@value": t.Additionals["dcatde:legalBasis"][d]["@value"],
|
|
273
|
+
"@language": ((Y = (H = (E = t.Additionals) == null ? void 0 : E["dcatde:legalBasis"]) == null ? void 0 : H[d]) == null ? void 0 : Y["@language"]) || "de"
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
276
|
if (Object.keys(t.Additionals)[i] === "dct:relation") {
|
|
@@ -278,9 +278,9 @@ async function m(t, g, s, p) {
|
|
|
278
278
|
"#####################",
|
|
279
279
|
Object.keys(t.Additionals)[i]
|
|
280
280
|
);
|
|
281
|
-
for (let
|
|
282
|
-
|
|
283
|
-
"@id": t.Additionals["dct:relation"][
|
|
281
|
+
for (let d = 0; d < t.Additionals["dct:relation"].length; d++)
|
|
282
|
+
e.dataset["dct:relation"] === void 0 && (e.dataset["dct:relation"] = []), e.dataset["dct:relation"].push({
|
|
283
|
+
"@id": t.Additionals["dct:relation"][d]["@id"]
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
if (Object.keys(t.Additionals)[i] === "dcat:landingPage") {
|
|
@@ -288,9 +288,9 @@ async function m(t, g, s, p) {
|
|
|
288
288
|
"#####################",
|
|
289
289
|
Object.keys(t.Additionals)[i]
|
|
290
290
|
);
|
|
291
|
-
for (let
|
|
292
|
-
|
|
293
|
-
"@id": t.Additionals["dcat:landingPage"][
|
|
291
|
+
for (let d = 0; d < t.Additionals["dcat:landingPage"].length; d++)
|
|
292
|
+
e.dataset["dcat:landingPage"] === void 0 && (e.dataset["dcat:landingPage"] = []), e.dataset["dcat:landingPage"].push({
|
|
293
|
+
"@id": t.Additionals["dcat:landingPage"][d]["@id"]
|
|
294
294
|
});
|
|
295
295
|
}
|
|
296
296
|
if (Object.keys(t.Additionals)[i] === "dct:conformsTo") {
|
|
@@ -298,10 +298,10 @@ async function m(t, g, s, p) {
|
|
|
298
298
|
"#####################",
|
|
299
299
|
Object.keys(t.Additionals)[i]
|
|
300
300
|
);
|
|
301
|
-
for (let
|
|
302
|
-
|
|
303
|
-
"rdfs:label": t.Additionals["dct:conformsTo"][
|
|
304
|
-
"@id": t.Additionals["dct:conformsTo"][
|
|
301
|
+
for (let d = 0; d < t.Additionals["dct:conformsTo"].length; d++)
|
|
302
|
+
e.dataset["dct:conformsTo"] === void 0 && (e.dataset["dct:conformsTo"] = []), e.dataset["dct:conformsTo"].push({
|
|
303
|
+
"rdfs:label": t.Additionals["dct:conformsTo"][d]["rdfs:label"],
|
|
304
|
+
"@id": t.Additionals["dct:conformsTo"][d]["@id"]
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
307
|
if (Object.keys(t.Additionals)[i] === "dct:provenance") {
|
|
@@ -309,9 +309,9 @@ async function m(t, g, s, p) {
|
|
|
309
309
|
"#####################",
|
|
310
310
|
Object.keys(t.Additionals)[i]
|
|
311
311
|
);
|
|
312
|
-
for (let
|
|
313
|
-
|
|
314
|
-
"
|
|
312
|
+
for (let d = 0; d < t.Additionals["dct:provenance"].length; d++)
|
|
313
|
+
e.dataset["dct:provenance"] === void 0 && (e.dataset["dct:provenance"] = []), e.dataset["dct:provenance"].push({
|
|
314
|
+
"rdfs:label": t.Additionals["dct:provenance"][d]["rdfs:label"]
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
317
|
if (Object.keys(t.Additionals)[i] === "prov:wasGeneratedBy") {
|
|
@@ -319,9 +319,9 @@ async function m(t, g, s, p) {
|
|
|
319
319
|
"#####################",
|
|
320
320
|
Object.keys(t.Additionals)[i]
|
|
321
321
|
);
|
|
322
|
-
for (let
|
|
323
|
-
|
|
324
|
-
"@id": t.Additionals["prov:wasGeneratedBy"][
|
|
322
|
+
for (let d = 0; d < t.Additionals["prov:wasGeneratedBy"].length; d++)
|
|
323
|
+
e.dataset["prov:wasGeneratedBy"] === void 0 && (e.dataset["prov:wasGeneratedBy"] = []), e.dataset["prov:wasGeneratedBy"].push({
|
|
324
|
+
"@id": t.Additionals["prov:wasGeneratedBy"][d]["@id"]
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
327
|
if (Object.keys(t.Additionals)[i] === "prov:qualifiedAttribution") {
|
|
@@ -329,9 +329,9 @@ async function m(t, g, s, p) {
|
|
|
329
329
|
"#####################",
|
|
330
330
|
Object.keys(t.Additionals)[i]
|
|
331
331
|
);
|
|
332
|
-
for (let
|
|
333
|
-
|
|
334
|
-
"@id": t.Additionals["prov:qualifiedAttribution"][
|
|
332
|
+
for (let d = 0; d < t.Additionals["prov:qualifiedAttribution"].length; d++)
|
|
333
|
+
e.dataset["prov:qualifiedAttribution"] === void 0 && (e.dataset["prov:qualifiedAttribution"] = []), e.dataset["prov:qualifiedAttribution"].push({
|
|
334
|
+
"@id": t.Additionals["prov:qualifiedAttribution"][d]["@id"]
|
|
335
335
|
});
|
|
336
336
|
}
|
|
337
337
|
if (Object.keys(t.Additionals)[i] === "dct:isReferencedBy") {
|
|
@@ -339,19 +339,9 @@ async function m(t, g, s, p) {
|
|
|
339
339
|
"#####################",
|
|
340
340
|
Object.keys(t.Additionals)[i]
|
|
341
341
|
);
|
|
342
|
-
for (let
|
|
343
|
-
|
|
344
|
-
"@id": t.Additionals["dct:isReferencedBy"][
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
if (Object.keys(t.Additionals)[i] === "dct:references") {
|
|
348
|
-
console.log(
|
|
349
|
-
"#####################",
|
|
350
|
-
Object.keys(t.Additionals)[i]
|
|
351
|
-
);
|
|
352
|
-
for (let e = 0; e < t.Additionals["dct:references"].length; e++)
|
|
353
|
-
d.dataset["dct:references"] === void 0 && (d.dataset["dct:references"] = []), d.dataset["dct:references"].push({
|
|
354
|
-
"@id": t.Additionals["dct:references"][e]["@id"]
|
|
342
|
+
for (let d = 0; d < t.Additionals["dct:isReferencedBy"].length; d++)
|
|
343
|
+
e.dataset["dct:isReferencedBy"] === void 0 && (e.dataset["dct:isReferencedBy"] = []), e.dataset["dct:isReferencedBy"].push({
|
|
344
|
+
"@id": t.Additionals["dct:isReferencedBy"][d]["@id"]
|
|
355
345
|
});
|
|
356
346
|
}
|
|
357
347
|
if (Object.keys(t.Additionals)[i] === "dct:source") {
|
|
@@ -359,9 +349,9 @@ async function m(t, g, s, p) {
|
|
|
359
349
|
"#####################",
|
|
360
350
|
Object.keys(t.Additionals)[i]
|
|
361
351
|
);
|
|
362
|
-
for (let
|
|
363
|
-
|
|
364
|
-
"@id": t.Additionals["dct:source"][
|
|
352
|
+
for (let d = 0; d < t.Additionals["dct:source"].length; d++)
|
|
353
|
+
e.dataset["dct:source"] === void 0 && (e.dataset["dct:source"] = []), e.dataset["dct:source"].push({
|
|
354
|
+
"@id": t.Additionals["dct:source"][d]["@id"]
|
|
365
355
|
});
|
|
366
356
|
}
|
|
367
357
|
if (Object.keys(t.Additionals)[i] === "dct:hasVersion") {
|
|
@@ -369,9 +359,9 @@ async function m(t, g, s, p) {
|
|
|
369
359
|
"#####################",
|
|
370
360
|
Object.keys(t.Additionals)[i]
|
|
371
361
|
);
|
|
372
|
-
for (let
|
|
373
|
-
|
|
374
|
-
"@id": t.Additionals["dct:hasVersion"][
|
|
362
|
+
for (let d = 0; d < t.Additionals["dct:hasVersion"].length; d++)
|
|
363
|
+
e.dataset["dct:hasVersion"] === void 0 && (e.dataset["dct:hasVersion"] = []), e.dataset["dct:hasVersion"].push({
|
|
364
|
+
"@id": t.Additionals["dct:hasVersion"][d]["@id"]
|
|
375
365
|
});
|
|
376
366
|
}
|
|
377
367
|
if (Object.keys(t.Additionals)[i] === "dct:isVersionOf") {
|
|
@@ -379,9 +369,9 @@ async function m(t, g, s, p) {
|
|
|
379
369
|
"#####################",
|
|
380
370
|
Object.keys(t.Additionals)[i]
|
|
381
371
|
);
|
|
382
|
-
for (let
|
|
383
|
-
|
|
384
|
-
"@id": t.Additionals["dct:isVersionOf"][
|
|
372
|
+
for (let d = 0; d < t.Additionals["dct:isVersionOf"].length; d++)
|
|
373
|
+
e.dataset["dct:isVersionOf"] === void 0 && (e.dataset["dct:isVersionOf"] = []), e.dataset["dct:isVersionOf"].push({
|
|
374
|
+
"@id": t.Additionals["dct:isVersionOf"][d]["@id"]
|
|
385
375
|
});
|
|
386
376
|
}
|
|
387
377
|
if (Object.keys(t.Additionals)[i] === "dct:creator") {
|
|
@@ -389,12 +379,12 @@ async function m(t, g, s, p) {
|
|
|
389
379
|
"#####################",
|
|
390
380
|
Object.keys(t.Additionals)[i]
|
|
391
381
|
);
|
|
392
|
-
for (let
|
|
393
|
-
|
|
394
|
-
"rdf:type": t.Additionals["dct:creator"][
|
|
395
|
-
"foaf:name": t.Additionals["dct:creator"][
|
|
396
|
-
"foaf:mbox": t.Additionals["dct:creator"][
|
|
397
|
-
"foaf:homepage": t.Additionals["dct:creator"][
|
|
382
|
+
for (let d = 0; d < t.Additionals["dct:creator"].length; d++)
|
|
383
|
+
e.dataset["dct:creator"] === void 0 && (e.dataset["dct:creator"] = []), e.dataset["dct:creator"].push({
|
|
384
|
+
"rdf:type": t.Additionals["dct:creator"][d]["rdf:type"],
|
|
385
|
+
"foaf:name": t.Additionals["dct:creator"][d]["foaf:name"],
|
|
386
|
+
"foaf:mbox": t.Additionals["dct:creator"][d]["foaf:mbox"],
|
|
387
|
+
"foaf:homepage": t.Additionals["dct:creator"][d]["foaf:homepage"]
|
|
398
388
|
});
|
|
399
389
|
}
|
|
400
390
|
if (Object.keys(t.Additionals)[i] === "dct:contributor") {
|
|
@@ -402,47 +392,30 @@ async function m(t, g, s, p) {
|
|
|
402
392
|
"#####################",
|
|
403
393
|
Object.keys(t.Additionals)[i]
|
|
404
394
|
);
|
|
405
|
-
for (let
|
|
406
|
-
|
|
407
|
-
"rdf:type": t.Additionals["dct:contributor"][
|
|
408
|
-
"foaf:name": t.Additionals["dct:contributor"][
|
|
409
|
-
"foaf:mbox": t.Additionals["dct:contributor"][
|
|
410
|
-
"foaf:homepage": t.Additionals["dct:contributor"][
|
|
395
|
+
for (let d = 0; d < t.Additionals["dct:contributor"].length; d++)
|
|
396
|
+
e.dataset["dct:contributor"] === void 0 && (e.dataset["dct:contributor"] = []), e.dataset["dct:contributor"].push({
|
|
397
|
+
"rdf:type": t.Additionals["dct:contributor"][d]["rdf:type"],
|
|
398
|
+
"foaf:name": t.Additionals["dct:contributor"][d]["foaf:name"],
|
|
399
|
+
"foaf:mbox": t.Additionals["dct:contributor"][d]["foaf:mbox"],
|
|
400
|
+
"foaf:homepage": t.Additionals["dct:contributor"][d]["foaf:homepage"]
|
|
411
401
|
});
|
|
412
402
|
}
|
|
413
|
-
|
|
403
|
+
Object.keys(t.Additionals)[i] === "owl:versionInfo" && (e.dataset["owl:versionInfo"] = {
|
|
414
404
|
"@value": t.Additionals["owl:versionInfo"][0]["@value"]
|
|
415
|
-
}), Object.keys(t.Additionals)[i] === "dcatde:contributorID" && (
|
|
405
|
+
}), Object.keys(t.Additionals)[i] === "dcatde:contributorID" && (e.dataset["dcatde:contributorID"] = {
|
|
416
406
|
"@id": t.Additionals["dcatde:contributorID"][0].uri
|
|
417
|
-
}), Object.keys(t.Additionals)[i] === "dct:
|
|
418
|
-
for (let e = 0; e < t.Additionals["dct:identifier"].length; e++)
|
|
419
|
-
d.dataset["dct:identifier"] === void 0 && (d.dataset["dct:identifier"] = []), d.dataset["dct:identifier"].push({
|
|
420
|
-
"@value": t.Additionals["dct:identifier"][e]["@value"]
|
|
421
|
-
});
|
|
422
|
-
Object.keys(t.Additionals)[i] === "dct:language" && (d.dataset["dct:language"] = {
|
|
407
|
+
}), Object.keys(t.Additionals)[i] === "dct:language" && (e.dataset["dct:language"] = {
|
|
423
408
|
"@id": t.Additionals["dct:language"][0].uri
|
|
424
|
-
}), Object.keys(t.Additionals)[i] === "dct:accessRights" && (
|
|
409
|
+
}), Object.keys(t.Additionals)[i] === "dct:accessRights" && (e.dataset["dct:accessRights"] = {
|
|
425
410
|
"@id": t.Additionals["dct:accessRights"][0].uri
|
|
426
|
-
}), Object.keys(t.Additionals)[i] === "dct:
|
|
411
|
+
}), Object.keys(t.Additionals)[i] === "dct:accrualPeriodicity" && (e.dataset["dct:accrualPeriodicity"] = {
|
|
427
412
|
"@id": t.Additionals["dct:accrualPeriodicity"][0].uri
|
|
428
|
-
}), Object.keys(t.Additionals)[i] === "dct:type" && (
|
|
413
|
+
}), Object.keys(t.Additionals)[i] === "dct:type" && (e.dataset["dct:type"] = {
|
|
429
414
|
"@id": t.Additionals["dct:type"][0].uri
|
|
430
|
-
}), Object.keys(t.Additionals)[i] === "
|
|
431
|
-
"@id": t.Additionals["prov:wasGeneratedBy"][0]["@id"]
|
|
432
|
-
}), Object.keys(t.Additionals)[i] === "dcat:spatialResolutionInMeters" && (d.dataset["dcat:spatialResolutionInMeters"] = t.Additionals["dcat:spatialResolutionInMeters"][0]["@value"]), Object.keys(t.Additionals)[i] === "dcat:temporalResolution" && (d.dataset["dcat:temporalResolution"] = {
|
|
415
|
+
}), Object.keys(t.Additionals)[i] === "dcat:spatialResolutionInMeters" && (e.dataset["dcat:spatialResolutionInMeters"] = t.Additionals["dcat:spatialResolutionInMeters"][0]["@value"]), Object.keys(t.Additionals)[i] === "dcat:temporalResolution" && (e.dataset["dcat:temporalResolution"] = {
|
|
433
416
|
"@type": "http://www.w3.org/2001/XMLSchema#duration",
|
|
434
417
|
"@value": `P${t.Additionals["dcat:temporalResolution"][0].Year}Y${t.Additionals["dcat:temporalResolution"][0].Month}M${t.Additionals["dcat:temporalResolution"][0].Day}D${t.Additionals["dcat:temporalResolution"][0].Hour}H${t.Additionals["dcat:temporalResolution"][0].Minute}M${t.Additionals["dcat:temporalResolution"][0].Second}S`
|
|
435
|
-
})
|
|
436
|
-
"@id": t.Additionals["prov:qualifiedAttribution"][0]["@id"]
|
|
437
|
-
}), Object.keys(t.Additionals)[i] === "dct:isReferencedBy" && (d.dataset["dct:isReferencedBy"] = {
|
|
438
|
-
"@id": t.Additionals["dct:isReferencedBy"][0]["@id"]
|
|
439
|
-
}), Object.keys(t.Additionals)[i] === "dct:source" && (d.dataset["dct:source"] = {
|
|
440
|
-
"@id": t.Additionals["dct:source"][0]["@id"]
|
|
441
|
-
}), Object.keys(t.Additionals)[i] === "dct:hasVersion" && (d.dataset["dct:hasVersion"] = {
|
|
442
|
-
"@id": t.Additionals["dct:hasVersion"][0]["@id"]
|
|
443
|
-
}), Object.keys(t.Additionals)[i] === "dct:isVersionOf" && (d.dataset["dct:isVersionOf"] = {
|
|
444
|
-
"@id": t.Additionals["dct:isVersionOf"][0]["@id"]
|
|
445
|
-
}), Object.keys(t.Additionals)[i] === "dct:creator" && (d.dataset["dct:creator"] = t.Additionals["dct:creator"]), Object.keys(t.Additionals)[i] === "dct:contributor" && (d.dataset["dct:contributor"] = t.Additionals["dct:contributor"].filter((e) => e !== null));
|
|
418
|
+
});
|
|
446
419
|
}
|
|
447
420
|
} catch (i) {
|
|
448
421
|
throw console.error("Validation Error:", i.message), i;
|
|
@@ -451,16 +424,16 @@ async function m(t, g, s, p) {
|
|
|
451
424
|
} catch (c) {
|
|
452
425
|
console.log(c);
|
|
453
426
|
}
|
|
454
|
-
let
|
|
427
|
+
let A = m(e, u);
|
|
455
428
|
return { actionParams: {
|
|
456
429
|
id: y,
|
|
457
430
|
catalog: s.permissions[0].rsname,
|
|
458
|
-
body:
|
|
459
|
-
title:
|
|
460
|
-
description:
|
|
461
|
-
}, body:
|
|
431
|
+
body: A,
|
|
432
|
+
title: e.dataset["dct:title"]["@value"],
|
|
433
|
+
description: e.dataset["dct:description"]["@value"]
|
|
434
|
+
}, body: A };
|
|
462
435
|
}
|
|
463
|
-
function
|
|
436
|
+
function m(t, g) {
|
|
464
437
|
const s = {}, p = Object.keys(t);
|
|
465
438
|
for (let o = 0; o < p.length; o++)
|
|
466
439
|
p[o], s[p[o]] = t[p[o]];
|
|
@@ -480,5 +453,5 @@ function J(t, g) {
|
|
|
480
453
|
return console.log(l), l;
|
|
481
454
|
}
|
|
482
455
|
export {
|
|
483
|
-
|
|
456
|
+
et as default
|
|
484
457
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@piveau/dpi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.0-beta.
|
|
4
|
+
"version": "0.1.0-beta.22",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.css"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@headlessui/vue": "^1.7.23",
|
|
45
45
|
"@histoire/plugin-vue": "1.0.0-alpha.2",
|
|
46
46
|
"@phosphor-icons/vue": "^2.2.1",
|
|
47
|
-
"@piveau/jsonld": "file:../../bin/piveau-jsonld-1.0.0-beta.
|
|
47
|
+
"@piveau/jsonld": "file:../../bin/piveau-jsonld-1.0.0-beta.16.tgz",
|
|
48
48
|
"@popperjs/core": "^2.11.8",
|
|
49
49
|
"@types/jsonld": "^1.5.15",
|
|
50
50
|
"@types/node": "^24.1.0",
|