@piveau/dpi 0.1.0-beta.50 → 0.1.0-beta.51
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,11 +1,11 @@
|
|
|
1
1
|
import "axios";
|
|
2
|
-
import { asSomeArray as
|
|
2
|
+
import { asSomeArray as st } from "../../composables/useDpiSimpleLoader.js";
|
|
3
3
|
let d = { distribution: [], dataset: {}, meta: {} };
|
|
4
|
-
function
|
|
4
|
+
function rt(t) {
|
|
5
5
|
return t.replace(/[^a-z0-9\s]/gi, "").replace(/\s+/g, "-").toLowerCase();
|
|
6
6
|
}
|
|
7
|
-
async function
|
|
8
|
-
var h, f,
|
|
7
|
+
async function At(t, g, l, b) {
|
|
8
|
+
var h, v, f, D, k, O, j, R, S, w, I, x, L, B, U, P, C, T, G, M, q, X, z, F, $, N, E, H, W, Y, _, J, K, Q, Z, m, V, tt, it, dt, et, at, nt, ot;
|
|
9
9
|
const u = g.specification.prefixes;
|
|
10
10
|
let p = [];
|
|
11
11
|
const c = Object.keys(t);
|
|
@@ -14,7 +14,7 @@ async function yt(t, g, l, b) {
|
|
|
14
14
|
p.push(crypto.randomUUID()), d.dataset["dcat:distribution"].push({
|
|
15
15
|
"@id": `https://piveau.io/set/distribution/${p[o]}`
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const lt = new URLSearchParams(window.location.search).get("edit");
|
|
18
18
|
let y = "";
|
|
19
19
|
try {
|
|
20
20
|
for (let o = 0; o < c.length; o++) {
|
|
@@ -25,7 +25,7 @@ async function yt(t, g, l, b) {
|
|
|
25
25
|
"@id": t.Discoverability.discoverabilityPage[e].uri
|
|
26
26
|
});
|
|
27
27
|
d.dataset["dcat:theme"] = i, t.Discoverability.hvdPage && Object.keys(t.Discoverability.hvdPage).length !== 0 && t.Discoverability.hvdPage[0].label !== void 0 && (d.dataset["dcatap:hvdCategory"] = {
|
|
28
|
-
"@id": (
|
|
28
|
+
"@id": (v = (h = t.Discoverability) == null ? void 0 : h.hvdPage) == null ? void 0 : v[0].uri
|
|
29
29
|
}, d.dataset["dcatap:applicableLegislation"] = {
|
|
30
30
|
"@id": "http://data.europa.eu/eli/reg_impl/2023/138/oj"
|
|
31
31
|
});
|
|
@@ -33,13 +33,13 @@ async function yt(t, g, l, b) {
|
|
|
33
33
|
if (c[o] === "BasicInfos") {
|
|
34
34
|
d.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" && (d.dataset["dct:title"] = t.BasicInfos["dct:title"][0] || "", y =
|
|
36
|
+
Object.keys(t.BasicInfos)[i] === "dct:title" && (d.dataset["dct:title"] = t.BasicInfos["dct:title"][0] || "", y = rt(
|
|
37
37
|
t.BasicInfos["dct:title"][0]["@value"]
|
|
38
|
-
),
|
|
38
|
+
), lt === "true" && (y = t.BasicInfos.datasetID)), Object.keys(t.BasicInfos)[i] === "dct:description" && (d.dataset["dct:description"] = t.BasicInfos["dct:description"][0] || ""), Object.keys(t.BasicInfos)[i] === "dct:modified" && (d.dataset["dct:modified"] = t.BasicInfos["dct:modified"][0] || ""), Object.keys(t.BasicInfos)[i] === "dct:publisher" && (d.dataset["dct:publisher"] = t.BasicInfos["dct:publisher"][0] || "", d.dataset["dct:publisher"]["@type"] = "foaf:Agent"), Object.keys(t.BasicInfos)[i] === "dcat:contactPoint" && (d.dataset["dcat:contactPoint"] = t.BasicInfos["dcat:contactPoint"][0] || "", d.dataset["dcat:contactPoint"]["@type"] = "vcard:Organization"), d.dataset["@type"] = "dcat:Dataset", d.meta["dcat:catalog"] = l.permissions[0].rsname, d.meta["@type"] = "dcat:CatalogRecord";
|
|
39
39
|
}
|
|
40
40
|
if (c[o] === "Covering" && Object.keys(t.Covering).length > 1)
|
|
41
41
|
for (let i = 0; i < Object.keys(t.Covering).length; i++) {
|
|
42
|
-
if (Object.keys(t.Covering)[i] === "dcat:temporalResolution" && t.Covering["dcat:temporalResolution"] !== void 0 && Object.keys((
|
|
42
|
+
if (Object.keys(t.Covering)[i] === "dcat:temporalResolution" && t.Covering["dcat:temporalResolution"] !== void 0 && Object.keys((f = t.Covering) == null ? void 0 : f["dcat:temporalResolution"]).length > 0 && ((k = (D = t.Covering) == null ? void 0 : D["dcat:temporalResolution"]) == null ? void 0 : k.type) !== void 0) {
|
|
43
43
|
d.dataset["dct:temporal"] = [];
|
|
44
44
|
for (let e = 0; e < t.Covering["dcat:temporalResolution"]["dct:temporal"].length; e++)
|
|
45
45
|
t.Covering["dcat:temporalResolution"].type != null && t.Covering["dcat:temporalResolution"]["dct:temporal"][e].dataType === "date" && t.Covering["dcat:temporalResolution"]["dct:temporal"][e]["dcat:startDate"] !== "" && (d.dataset["dct:temporal"][e] = {
|
|
@@ -64,21 +64,21 @@ async function yt(t, g, l, b) {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
Object.keys(t.Covering)[i] === "dcatde:politicalGeocodingURI" && ((O = t.Covering) == null ? void 0 : O["dcatde:politicalGeocodingURI"].uri) != null && (d.dataset["dcatde:politicalGeocodingURI"] = {
|
|
68
|
-
"@id": ((
|
|
67
|
+
Object.keys(t.Covering)[i] === "dcatde:politicalGeocodingURI" && ((j = (O = t.Covering) == null ? void 0 : O["dcatde:politicalGeocodingURI"]) == null ? void 0 : j.uri) != null && (console.log("hallo?"), d.dataset["dcatde:politicalGeocodingURI"] = {
|
|
68
|
+
"@id": ((S = (R = t.Covering["dcatde:politicalGeocodingURI"]) == null ? void 0 : R[0]) == null ? void 0 : S.uri) || ""
|
|
69
69
|
}, d.dataset["dct:spatial"] === void 0 && (d.dataset["dct:spatial"] = []), d.dataset["dct:spatial"].push({
|
|
70
|
-
"@id": ((
|
|
70
|
+
"@id": ((I = (w = t.Covering["dcatde:politicalGeocodingURI"]) == null ? void 0 : w[0]) == null ? void 0 : I.uri) || ""
|
|
71
71
|
}));
|
|
72
72
|
}
|
|
73
73
|
if (c[o] === "DistributionSimple")
|
|
74
74
|
for (let i = 0; i < t.DistributionSimple["dcat:distribution"].length; i++) {
|
|
75
|
-
if (d.distribution[i] = {}, ((
|
|
75
|
+
if (d.distribution[i] = {}, ((L = (x = t.Discoverability) == null ? void 0 : x.hvdPage[0]) == null ? void 0 : L.uri) != null && (d.distribution[i]["dcatap:applicableLegislation"] = {
|
|
76
76
|
"@id": "http://data.europa.eu/eli/reg_impl/2023/138/oj"
|
|
77
77
|
}), d.distribution[i]["@type"] = "dcat:Distribution", d.distribution[i]["@id"] = `https://piveau.io/set/distribution/${p[i]}`, t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"] && (d.distribution[i]["dcat:accessURL"] = {
|
|
78
78
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"]
|
|
79
79
|
}), Object.keys(
|
|
80
80
|
t.DistributionSimple["dcat:distribution"][i]["dcat:downloadURL"]
|
|
81
|
-
).length !== 0 && t.DistributionSimple["dcat:distribution"][i]["dcat:downloadURL"]["@id"] !== "") {
|
|
81
|
+
).length !== 0 && t.DistributionSimple["dcat:distribution"][i]["dcat:downloadURL"][0]["@id"] !== "") {
|
|
82
82
|
d.distribution[i]["dcat:downloadURL"] = [];
|
|
83
83
|
for (let a = 0; a < t.DistributionSimple["dcat:distribution"][i]["dcat:downloadURL"].length; a++)
|
|
84
84
|
d.distribution[i]["dcat:downloadURL"][a] = {
|
|
@@ -86,8 +86,8 @@ async function yt(t, g, l, b) {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
if (Object.keys(
|
|
89
|
-
(
|
|
90
|
-
).length !== 0) {
|
|
89
|
+
(B = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : B.policyItems
|
|
90
|
+
).length !== 0 && ((U = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : U.policyItems[0]["dcat:downloadURL"]) !== "") {
|
|
91
91
|
d.distribution[i]["odrl:hasPolicy"] = [];
|
|
92
92
|
for (let a = 0; a < t.DistributionSimple["dcat:distribution"][i].policyItems.length; a++)
|
|
93
93
|
d.distribution[i]["odrl:hasPolicy"][a] = {
|
|
@@ -95,7 +95,7 @@ async function yt(t, g, l, b) {
|
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
Object.keys(
|
|
98
|
-
(
|
|
98
|
+
(P = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : P["dct:license"]
|
|
99
99
|
).length !== 0 && (d.distribution[i]["dct:license"] = {
|
|
100
100
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dct:license"].uri || t.DistributionSimple["dct:license"][0].uri
|
|
101
101
|
}, t.DistributionSimple["dcat:distribution"][i]["dct:license"]["dcterms:license"] === "" && t.DistributionSimple["dct:license"][0].title !== "" && (d.distribution[i]["dcatde:licenseAttributionByText"] = {
|
|
@@ -105,12 +105,12 @@ async function yt(t, g, l, b) {
|
|
|
105
105
|
"@language": "de",
|
|
106
106
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:license"].title
|
|
107
107
|
}));
|
|
108
|
-
const e = (
|
|
108
|
+
const e = (G = (T = (C = t.DistributionSimple) == null ? void 0 : C["dcat:distribution"]) == null ? void 0 : T[i]) == null ? void 0 : G["dct:format"];
|
|
109
109
|
e && (d.distribution[i]["dct:format"] = {
|
|
110
110
|
"@id": (e == null ? void 0 : e.uri) || ""
|
|
111
|
-
}), ((
|
|
112
|
-
const s = ((
|
|
113
|
-
if (s.length !== 0 && (d.distribution[i]["dct:conformsTo"] =
|
|
111
|
+
}), ((X = (q = (M = t.DistributionSimple) == null ? void 0 : M["dcat:distribution"]) == null ? void 0 : q[i]) == null ? void 0 : X["dcatap:applicableLegislation"]) != null && (d.distribution[i]["dct:format"] = ($ = (F = (z = t.DistributionSimple) == null ? void 0 : z["dcat:distribution"]) == null ? void 0 : F[i]) == null ? void 0 : $["dcatap:applicableLegislation"]["@id"]);
|
|
112
|
+
const s = ((H = (E = (N = t.DistributionSimple) == null ? void 0 : N["dcat:distribution"]) == null ? void 0 : E[i]) == null ? void 0 : H.conformsToItems) || [];
|
|
113
|
+
if (s.length !== 0 && (d.distribution[i]["dct:conformsTo"] = st(
|
|
114
114
|
s
|
|
115
115
|
).filter(
|
|
116
116
|
(a) => a && (a["dcat:downloadURL"] || a["dct:title"])
|
|
@@ -120,7 +120,7 @@ async function yt(t, g, l, b) {
|
|
|
120
120
|
"@type": "dct:Standard"
|
|
121
121
|
}))), Object.keys(
|
|
122
122
|
t.DistributionSimple["dcat:distribution"][i]["dcat:mediaType"]
|
|
123
|
-
).length !== 0 && (d.distribution[i]["dcat:mediaType"] = {
|
|
123
|
+
).length !== 0 && t.DistributionSimple["dcat:distribution"][i]["dcat:mediaType"].uri !== "" && (d.distribution[i]["dcat:mediaType"] = {
|
|
124
124
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:mediaType"].uri || ""
|
|
125
125
|
}), t.DistributionSimple["dcat:distribution"][i]["dcat:byteSize"] && (d.distribution[i]["dcat:byteSize"] = {
|
|
126
126
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dcat:byteSize"] || "",
|
|
@@ -129,14 +129,14 @@ async function yt(t, g, l, b) {
|
|
|
129
129
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dcatde:licenseAttributionByText"] || ""
|
|
130
130
|
}), Object.keys(
|
|
131
131
|
t.DistributionSimple["dcat:distribution"][i]["dcatap:availability"]
|
|
132
|
-
).length !== 0 && (d.distribution[i]["dcatap:availability"] = {
|
|
132
|
+
).length !== 0 && t.DistributionSimple["dcat:distribution"][i]["dcatap:availability"].uri !== "" && (d.distribution[i]["dcatap:availability"] = {
|
|
133
133
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcatap:availability"].uri || ""
|
|
134
134
|
}), t.DistributionSimple["dcat:distribution"][i]["dct:issued"] && (d.distribution[i]["dct:issued"] = {
|
|
135
135
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:issued"] || "",
|
|
136
136
|
"@type": "http://www.w3.org/2001/XMLSchema#date"
|
|
137
137
|
}), t.DistributionSimple["dcat:distribution"][i]["dct:modified"] && (d.distribution[i]["dct:modified"] = {
|
|
138
|
-
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:modified"] || ""
|
|
139
|
-
|
|
138
|
+
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:modified"] || "",
|
|
139
|
+
"@type": "http://www.w3.org/2001/XMLSchema#date"
|
|
140
140
|
}), t.DistributionSimple["dcat:distribution"][i]["dct:description"] && (d.distribution[i]["dct:description"] = {
|
|
141
141
|
"@language": "de",
|
|
142
142
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:description"]
|
|
@@ -145,16 +145,11 @@ async function yt(t, g, l, b) {
|
|
|
145
145
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:title"]
|
|
146
146
|
}), t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"] != null && Object.keys(
|
|
147
147
|
t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"]
|
|
148
|
-
).length !== 0 && (
|
|
149
|
-
"CFORMAT: ",
|
|
150
|
-
Object.keys(
|
|
151
|
-
t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"]
|
|
152
|
-
).length
|
|
153
|
-
), d.distribution[i]["dcat:compressFormat"] = {
|
|
148
|
+
).length !== 0 && t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"].uri !== "" && (d.distribution[i]["dcat:compressFormat"] = {
|
|
154
149
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"].uri || ""
|
|
155
150
|
}), Object.keys(
|
|
156
151
|
t.DistributionSimple["dcat:distribution"][i]["dcat:packageFormat"]
|
|
157
|
-
).length !== 0 && (d.distribution[i]["dcat:packageFormat"] = {
|
|
152
|
+
).length !== 0 && t.DistributionSimple["dcat:distribution"][i]["dcat:packageFormat"].uri !== "" && (d.distribution[i]["dcat:packageFormat"] = {
|
|
158
153
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:packageFormat"].uri || ""
|
|
159
154
|
}), t.DistributionSimple["dcat:distribution"][i].checksum.uri !== "" && (d.distribution[i]["spdx:checksum"] = {
|
|
160
155
|
"@type": "spdx:Checksum",
|
|
@@ -176,8 +171,8 @@ async function yt(t, g, l, b) {
|
|
|
176
171
|
).length !== 0 && (d.distribution[i]["adms:status"] = {
|
|
177
172
|
"@id": t.DistributionSimple["dcat:distribution"][i]["adms:status"].uri || ""
|
|
178
173
|
});
|
|
179
|
-
const
|
|
180
|
-
if (
|
|
174
|
+
const ct = ((_ = (Y = (W = t.DistributionSimple) == null ? void 0 : W["dcat:distribution"]) == null ? void 0 : Y[i]) == null ? void 0 : _.accessServices) || [];
|
|
175
|
+
if (ct.length !== 0 && (d.distribution[i]["dcat:accessService"] = (J = st(ct)) == null ? void 0 : J.filter(
|
|
181
176
|
(a) => a && (a["dct:title"] || a["dct:description"] || a["dcat:downloadURL"] || a["dcat:endpointURL"])
|
|
182
177
|
).map((a) => {
|
|
183
178
|
const n = {
|
|
@@ -196,7 +191,7 @@ async function yt(t, g, l, b) {
|
|
|
196
191
|
"@id": r
|
|
197
192
|
}), n;
|
|
198
193
|
})), d.distribution[i]["foaf:page"] || (d.distribution[i]["foaf:page"] = []), d.distribution[i]["foaf:page"].length !== 0)
|
|
199
|
-
for (let a = 0; a < ((
|
|
194
|
+
for (let a = 0; a < ((Z = (Q = (K = t.DistributionSimple) == null ? void 0 : K["dcat:distribution"]) == null ? void 0 : Q[i]) == null ? void 0 : Z.documentations.length); a++) {
|
|
200
195
|
const n = t.DistributionSimple["dcat:distribution"][i].documentations[a];
|
|
201
196
|
if ((n == null ? void 0 : n["dct:title"]) !== void 0) {
|
|
202
197
|
const r = {
|
|
@@ -225,16 +220,11 @@ async function yt(t, g, l, b) {
|
|
|
225
220
|
]), Object.keys(t.Additionals)[i] === "dct:issued" && (d.dataset["dct:issued"] === void 0 && (d.dataset["dct:issued"] = []), d.dataset["dct:issued"].push({
|
|
226
221
|
"@value": t.Additionals["dct:issued"][0]["@value"].split(".").reverse().map((e, s) => s < 2 ? e.padStart(2, "0") : e).join("-") || "",
|
|
227
222
|
"@type": "http://www.w3.org/2001/XMLSchema#date"
|
|
228
|
-
})), Object.keys(t.Additionals)[i] === "dcatap:availability")
|
|
229
|
-
console.log(
|
|
230
|
-
"#####################",
|
|
231
|
-
Object.keys(t.Additionals)[i]
|
|
232
|
-
);
|
|
223
|
+
})), Object.keys(t.Additionals)[i] === "dcatap:availability")
|
|
233
224
|
for (let e = 0; e < t.Additionals["dcatap:availability"].length; e++)
|
|
234
225
|
d.dataset["dcatap:availability"] === void 0 && (d.dataset["dcatap:availability"] = []), d.dataset["dcatap:availability"].push({
|
|
235
226
|
"@id": t.Additionals["dcatap:availability"][e].uri
|
|
236
227
|
});
|
|
237
|
-
}
|
|
238
228
|
if (Object.keys(t.Additionals)[i] === "dcat:keyword") {
|
|
239
229
|
console.log(
|
|
240
230
|
"#####################",
|
|
@@ -243,7 +233,7 @@ async function yt(t, g, l, b) {
|
|
|
243
233
|
for (let e = 0; e < t.Additionals["dcat:keyword"].length; e++)
|
|
244
234
|
d.dataset["dcat:keyword"] === void 0 && (d.dataset["dcat:keyword"] = []), d.dataset["dcat:keyword"].push({
|
|
245
235
|
"@value": t.Additionals["dcat:keyword"][e]["@value"],
|
|
246
|
-
"@language": ((
|
|
236
|
+
"@language": ((V = (m = t.Additionals["dcat:keyword"]) == null ? void 0 : m[e]) == null ? void 0 : V["@language"]) || "de"
|
|
247
237
|
});
|
|
248
238
|
}
|
|
249
239
|
if (Object.keys(t.Additionals)[i] === "dct:references") {
|
|
@@ -325,7 +315,7 @@ async function yt(t, g, l, b) {
|
|
|
325
315
|
for (let e = 0; e < t.Additionals["dcatde:legalBasis"].length; e++)
|
|
326
316
|
d.dataset["dcatde:legalBasis"] === void 0 && (d.dataset["dcatde:legalBasis"] = []), d.dataset["dcatde:legalBasis"].push({
|
|
327
317
|
"@value": t.Additionals["dcatde:legalBasis"][e]["@value"],
|
|
328
|
-
"@language": ((
|
|
318
|
+
"@language": ((dt = (it = (tt = t.Additionals) == null ? void 0 : tt["dcatde:legalBasis"]) == null ? void 0 : it[e]) == null ? void 0 : dt["@language"]) || "de"
|
|
329
319
|
});
|
|
330
320
|
}
|
|
331
321
|
if (Object.keys(t.Additionals)[i] === "dct:relation") {
|
|
@@ -447,7 +437,7 @@ async function yt(t, g, l, b) {
|
|
|
447
437
|
for (let e = 0; e < t.Additionals["dct:creator"].length; e++) {
|
|
448
438
|
d.dataset["dct:creator"] === void 0 && (d.dataset["dct:creator"] = []);
|
|
449
439
|
let s;
|
|
450
|
-
t.Additionals["dct:creator"][e]["rdf:type"] === "Person" && (s = "foaf:
|
|
440
|
+
t.Additionals["dct:creator"][e]["rdf:type"] === "Person" && (s = "foaf:Agent"), t.Additionals["dct:creator"][e]["rdf:type"] === "Organisation" && (s = "foaf:Organization"), d.dataset["dct:creator"].push({
|
|
451
441
|
"@type": s,
|
|
452
442
|
"foaf:name": t.Additionals["dct:creator"][e]["foaf:name"],
|
|
453
443
|
"foaf:mbox": t.Additionals["dct:creator"][e]["foaf:mbox"],
|
|
@@ -463,7 +453,7 @@ async function yt(t, g, l, b) {
|
|
|
463
453
|
for (let e = 0; e < t.Additionals["foaf:page"].length; e++)
|
|
464
454
|
d.dataset["foaf:page"] === void 0 && (d.dataset["foaf:page"] = []), d.dataset["foaf:page"].push({
|
|
465
455
|
"dct:format": {
|
|
466
|
-
"@id": (
|
|
456
|
+
"@id": (at = (et = t.Additionals["foaf:page"]) == null ? void 0 : et[e]) == null ? void 0 : at.uri
|
|
467
457
|
},
|
|
468
458
|
"dct:title": t.Additionals["foaf:page"][e]["dct:title"],
|
|
469
459
|
"dct:description": t.Additionals["foaf:page"][e]["dct:description"],
|
|
@@ -478,7 +468,7 @@ async function yt(t, g, l, b) {
|
|
|
478
468
|
for (let e = 0; e < t.Additionals["dct:contributor"].length; e++) {
|
|
479
469
|
d.dataset["dct:contributor"] === void 0 && (d.dataset["dct:contributor"] = []);
|
|
480
470
|
let s;
|
|
481
|
-
t.Additionals["dct:contributor"][e]["rdf:type"] === "Person" && (s = "foaf:
|
|
471
|
+
t.Additionals["dct:contributor"][e]["rdf:type"] === "Person" && (s = "foaf:Agent"), t.Additionals["dct:contributor"][e]["rdf:type"] === "Organisation" && (s = "foaf:Organization"), console.log(s), d.dataset["dct:contributor"].push({
|
|
482
472
|
"@type": s,
|
|
483
473
|
"foaf:name": t.Additionals["dct:contributor"][e]["foaf:name"],
|
|
484
474
|
"foaf:mbox": t.Additionals["dct:contributor"][e]["foaf:mbox"],
|
|
@@ -505,7 +495,7 @@ async function yt(t, g, l, b) {
|
|
|
505
495
|
}), Object.keys(t.Additionals)[i] === "dcatde:politicalGeocodingLevelURI")
|
|
506
496
|
for (let e = 0; e < t.Additionals["dcatde:politicalGeocodingLevelURI"].length; e++)
|
|
507
497
|
d.dataset["dcatde:politicalGeocodingLevelURI"] === void 0 && (d.dataset["dcatde:politicalGeocodingLevelURI"] = []), d.dataset["dcatde:politicalGeocodingLevelURI"].push({
|
|
508
|
-
"@id": ((
|
|
498
|
+
"@id": ((ot = (nt = t.Additionals["dcatde:politicalGeocodingLevelURI"]) == null ? void 0 : nt[e]) == null ? void 0 : ot.uri) || ""
|
|
509
499
|
});
|
|
510
500
|
}
|
|
511
501
|
} catch (i) {
|
|
@@ -515,7 +505,7 @@ async function yt(t, g, l, b) {
|
|
|
515
505
|
} catch (o) {
|
|
516
506
|
console.log(o);
|
|
517
507
|
}
|
|
518
|
-
let A =
|
|
508
|
+
let A = pt(d, u);
|
|
519
509
|
return { actionParams: {
|
|
520
510
|
id: y,
|
|
521
511
|
catalog: l.permissions[0].rsname,
|
|
@@ -524,7 +514,7 @@ async function yt(t, g, l, b) {
|
|
|
524
514
|
description: d.dataset["dct:description"]["@value"]
|
|
525
515
|
}, body: A };
|
|
526
516
|
}
|
|
527
|
-
function
|
|
517
|
+
function pt(t, g) {
|
|
528
518
|
const l = {}, b = Object.keys(t);
|
|
529
519
|
for (let c = 0; c < b.length; c++)
|
|
530
520
|
b[c], l[b[c]] = t[b[c]];
|
|
@@ -544,5 +534,5 @@ function lt(t, g) {
|
|
|
544
534
|
return console.log(p), p;
|
|
545
535
|
}
|
|
546
536
|
export {
|
|
547
|
-
|
|
537
|
+
At as default
|
|
548
538
|
};
|