@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,111 +1,117 @@
|
|
|
1
1
|
import "axios";
|
|
2
|
-
import { asSomeArray as
|
|
3
|
-
let
|
|
4
|
-
function
|
|
2
|
+
import { asSomeArray as nt } from "../../composables/useDpiSimpleLoader.js";
|
|
3
|
+
let d = { distribution: [], dataset: {}, meta: {} };
|
|
4
|
+
function ct(t) {
|
|
5
5
|
return t.replace(/[^a-z0-9\s]/gi, "").replace(/\s+/g, "-").toLowerCase();
|
|
6
6
|
}
|
|
7
|
-
async function
|
|
8
|
-
var h, f, v, k, D, O, j, R,
|
|
7
|
+
async function gt(t, g, l, b) {
|
|
8
|
+
var h, f, v, k, D, O, j, R, S, w, I, x, L, B, P, C, U, T, M, G, q, X, z, F, $, N, E, H, W, Y, _, J, K, Q, Z, m, V, tt, it, dt, et;
|
|
9
9
|
const u = g.specification.prefixes;
|
|
10
|
-
let
|
|
10
|
+
let p = [];
|
|
11
11
|
const c = Object.keys(t);
|
|
12
|
-
|
|
12
|
+
d.dataset["dcat:distribution"] = [];
|
|
13
13
|
for (let o = 0; o < t.DistributionSimple["dcat:distribution"].length; o++)
|
|
14
|
-
|
|
15
|
-
"@id": `https://piveau.io/set/distribution/${
|
|
14
|
+
p.push(crypto.randomUUID()), d.dataset["dcat:distribution"].push({
|
|
15
|
+
"@id": `https://piveau.io/set/distribution/${p[o]}`
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const ot = new URLSearchParams(window.location.search).get("edit");
|
|
18
18
|
let y = "";
|
|
19
19
|
try {
|
|
20
20
|
for (let o = 0; o < c.length; o++) {
|
|
21
21
|
if (c[o] === "Discoverability") {
|
|
22
22
|
let i = [];
|
|
23
|
-
for (let
|
|
23
|
+
for (let e = 1; e < t.Discoverability.discoverabilityPage.length; e++)
|
|
24
24
|
i.push({
|
|
25
|
-
"@id": t.Discoverability.discoverabilityPage[
|
|
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
28
|
"@id": (f = (h = t.Discoverability) == null ? void 0 : h.hvdPage) == null ? void 0 : f[0].uri
|
|
29
|
-
},
|
|
29
|
+
}, d.dataset["dcatap:applicableLegislation"] = {
|
|
30
30
|
"@id": "http://data.europa.eu/eli/reg_impl/2023/138/oj"
|
|
31
31
|
});
|
|
32
32
|
}
|
|
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" && (
|
|
36
|
+
Object.keys(t.BasicInfos)[i] === "dct:title" && (d.dataset["dct:title"] = t.BasicInfos["dct:title"][0] || "", y = ct(
|
|
37
37
|
t.BasicInfos["dct:title"][0]["@value"]
|
|
38
|
-
),
|
|
38
|
+
), ot === "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
42
|
if (Object.keys(t.Covering)[i] === "dcat:temporalResolution" && t.Covering["dcat:temporalResolution"] !== void 0 && Object.keys((v = t.Covering) == null ? void 0 : v["dcat:temporalResolution"]).length > 0 && ((D = (k = t.Covering) == null ? void 0 : k["dcat:temporalResolution"]) == null ? void 0 : D.type) !== void 0) {
|
|
43
|
-
|
|
44
|
-
for (let
|
|
45
|
-
t.Covering["dcat:temporalResolution"].type != null && t.Covering["dcat:temporalResolution"]["dct:temporal"][
|
|
43
|
+
d.dataset["dct:temporal"] = [];
|
|
44
|
+
for (let e = 0; e < t.Covering["dcat:temporalResolution"]["dct:temporal"].length; e++)
|
|
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] = {
|
|
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"][e]["dcat:endDate"] || "",
|
|
49
|
+
"@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][e].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"][e]["dcat:startDate"] || "",
|
|
53
|
+
"@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][e].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"][e].dataType === "dateTime" && t.Covering["dcat:temporalResolution"]["dct:temporal"][e]["dcat:startDate"] !== "" && (d.dataset["dct:temporal"][e] = {
|
|
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"][e]["dcat:endDate"] + "T" + t.Covering["dcat:temporalResolution"]["dct:temporal"][e].endTime || "",
|
|
59
|
+
"@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][e].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"][e]["dcat:startDate"] + "T" + t.Covering["dcat:temporalResolution"]["dct:temporal"][e].startTime || "",
|
|
63
|
+
"@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][e].dataType
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
Object.keys(t.Covering)[i] === "dcatde:politicalGeocodingURI" && (
|
|
67
|
+
Object.keys(t.Covering)[i] === "dcatde:politicalGeocodingURI" && (d.dataset["dcatde:politicalGeocodingURI"] = {
|
|
68
68
|
"@id": ((j = (O = t.Covering["dcatde:politicalGeocodingURI"]) == null ? void 0 : O[0]) == null ? void 0 : j.uri) || ""
|
|
69
|
-
})
|
|
69
|
+
}, d.dataset["dct:spatial"] === void 0 && (d.dataset["dct:spatial"] = []), d.dataset["dct:spatial"].push({
|
|
70
|
+
"@id": ((S = (R = t.Covering["dcatde:politicalGeocodingURI"]) == null ? void 0 : R[0]) == null ? void 0 : S.uri) || ""
|
|
71
|
+
}));
|
|
70
72
|
}
|
|
71
73
|
if (c[o] === "DistributionSimple")
|
|
72
74
|
for (let i = 0; i < t.DistributionSimple["dcat:distribution"].length; i++) {
|
|
73
|
-
if (
|
|
75
|
+
if (d.distribution[i] = {}, ((I = (w = t.Discoverability) == null ? void 0 : w.hvdPage[0]) == null ? void 0 : I.uri) != null && (d.distribution[i]["dcatap:applicableLegislation"] = {
|
|
74
76
|
"@id": "http://data.europa.eu/eli/reg_impl/2023/138/oj"
|
|
75
|
-
}),
|
|
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"] = {
|
|
76
78
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"]
|
|
77
79
|
}), Object.keys(
|
|
78
80
|
t.DistributionSimple["dcat:distribution"][i]["dcat:downloadURL"]
|
|
79
81
|
).length !== 0) {
|
|
80
|
-
|
|
82
|
+
d.distribution[i]["dcat:downloadURL"] = [];
|
|
81
83
|
for (let a = 0; a < t.DistributionSimple["dcat:distribution"][i]["dcat:downloadURL"].length; a++)
|
|
82
|
-
|
|
84
|
+
d.distribution[i]["dcat:downloadURL"][a] = {
|
|
83
85
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:downloadURL"][a]["@id"]
|
|
84
86
|
};
|
|
85
87
|
}
|
|
86
88
|
if (Object.keys(
|
|
87
|
-
(
|
|
89
|
+
(x = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : x.policyItems
|
|
88
90
|
).length !== 0) {
|
|
89
|
-
|
|
91
|
+
d.distribution[i]["odrl:hasPolicy"] = [];
|
|
90
92
|
for (let a = 0; a < t.DistributionSimple["dcat:distribution"][i].policyItems.length; a++)
|
|
91
|
-
|
|
93
|
+
d.distribution[i]["odrl:hasPolicy"][a] = {
|
|
92
94
|
"@id": t.DistributionSimple["dcat:distribution"][i].policyItems[a]["dcat:downloadURL"]
|
|
93
95
|
};
|
|
94
96
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
Object.keys(
|
|
98
|
+
(L = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : L["dct:license"]
|
|
99
|
+
).length !== 0 && (d.distribution[i]["dct:license"] = {
|
|
100
|
+
"@id": t.DistributionSimple["dcat:distribution"][i]["dct:license"].uri || t.DistributionSimple["dct:license"][0].uri
|
|
101
|
+
}, t.DistributionSimple["dcat:distribution"][i]["dct:license"]["dcterms:license"] === "" && t.DistributionSimple["dct:license"][0].title !== "" && (d.distribution[i]["dcatde:licenseAttributionByText"] = {
|
|
102
|
+
"@language": "de",
|
|
103
|
+
"@value": t.DistributionSimple["dct:license"][0].title
|
|
104
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dct:license"].uri != "" && t.DistributionSimple["dcat:distribution"][i]["dct:license"].title !== "" && (d.distribution[i]["dcatde:licenseAttributionByText"] = {
|
|
99
105
|
"@language": "de",
|
|
100
|
-
"@value":
|
|
101
|
-
};
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
"@id": (
|
|
105
|
-
}), ((
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
108
|
-
|
|
106
|
+
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:license"].title
|
|
107
|
+
}));
|
|
108
|
+
const e = (C = (P = (B = t.DistributionSimple) == null ? void 0 : B["dcat:distribution"]) == null ? void 0 : P[i]) == null ? void 0 : C["dct:format"];
|
|
109
|
+
e && (d.distribution[i]["dct:format"] = {
|
|
110
|
+
"@id": (e == null ? void 0 : e.uri) || ""
|
|
111
|
+
}), ((M = (T = (U = t.DistributionSimple) == null ? void 0 : U["dcat:distribution"]) == null ? void 0 : T[i]) == null ? void 0 : M["dcatap:applicableLegislation"]) != null && (d.distribution[i]["dct:format"] = (X = (q = (G = t.DistributionSimple) == null ? void 0 : G["dcat:distribution"]) == null ? void 0 : q[i]) == null ? void 0 : X["dcatap:applicableLegislation"]["@id"]);
|
|
112
|
+
const s = (($ = (F = (z = t.DistributionSimple) == null ? void 0 : z["dcat:distribution"]) == null ? void 0 : F[i]) == null ? void 0 : $.conformsToItems) || [];
|
|
113
|
+
if (s && (d.distribution[i]["dct:conformsTo"] = nt(
|
|
114
|
+
s
|
|
109
115
|
).filter(
|
|
110
116
|
(a) => a && (a["dcat:downloadURL"] || a["dct:title"])
|
|
111
117
|
).map((a) => ({
|
|
@@ -114,33 +120,29 @@ async function ht(t, g, s, b) {
|
|
|
114
120
|
"@type": "dct:Standard"
|
|
115
121
|
}))), Object.keys(
|
|
116
122
|
t.DistributionSimple["dcat:distribution"][i]["dcat:mediaType"]
|
|
117
|
-
).length !== 0 && (
|
|
123
|
+
).length !== 0 && (d.distribution[i]["dcat:mediaType"] = {
|
|
118
124
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:mediaType"].uri || ""
|
|
119
|
-
}), t.DistributionSimple["dcat:distribution"][i]["dcat:byteSize"] && (
|
|
125
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dcat:byteSize"] && (d.distribution[i]["dcat:byteSize"] = {
|
|
120
126
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dcat:byteSize"] || "",
|
|
121
127
|
"@type": "http://www.w3.org/2001/XMLSchema#decimal"
|
|
122
|
-
}), t.DistributionSimple["dcat:distribution"][i]["dcatde:licenseAttributionByText"] && (
|
|
128
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dcatde:licenseAttributionByText"] && (d.distribution[i]["dcatde:licenseAttributionByText"] = {
|
|
123
129
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dcatde:licenseAttributionByText"] || ""
|
|
124
130
|
}), Object.keys(
|
|
125
131
|
t.DistributionSimple["dcat:distribution"][i]["dcatap:availability"]
|
|
126
|
-
).length !== 0 && (
|
|
132
|
+
).length !== 0 && (d.distribution[i]["dcatap:availability"] = {
|
|
127
133
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcatap:availability"].uri || ""
|
|
128
|
-
}), t.DistributionSimple["dcat:distribution"][i]["dct:issued"] && (
|
|
129
|
-
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:issued"] || ""
|
|
130
|
-
|
|
131
|
-
}), t.DistributionSimple["dcat:distribution"][i]["dct:modified"] && (
|
|
134
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dct:issued"] && (d.distribution[i]["dct:issued"] = {
|
|
135
|
+
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:issued"] || "",
|
|
136
|
+
"@type": "http://www.w3.org/2001/XMLSchema#date"
|
|
137
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dct:modified"] && (d.distribution[i]["dct:modified"] = {
|
|
132
138
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:modified"] || ""
|
|
133
139
|
// "@type": "http://www.w3.org/2001/XMLSchema#date",
|
|
134
|
-
}), t.DistributionSimple["dcat:distribution"][i]["dct:description"] && (
|
|
140
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dct:description"] && (d.distribution[i]["dct:description"] = {
|
|
135
141
|
"@language": "de",
|
|
136
142
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:description"]
|
|
137
|
-
}), t.DistributionSimple["dcat:distribution"][i]["dct:title"] && (
|
|
143
|
+
}), t.DistributionSimple["dcat:distribution"][i]["dct:title"] && (d.distribution[i]["dct:title"] = {
|
|
138
144
|
"@language": "de",
|
|
139
145
|
"@value": t.DistributionSimple["dcat:distribution"][i]["dct:title"]
|
|
140
|
-
}), Object.keys(
|
|
141
|
-
t.DistributionSimple["dcat:distribution"][i]["dct:accessRights"]
|
|
142
|
-
).length !== 0 && (e.distribution[i]["dct:accessRights"] = {
|
|
143
|
-
"@id": t.DistributionSimple["dcat:distribution"][i]["dct:accessRights"].uri
|
|
144
146
|
}), t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"] != null && Object.keys(
|
|
145
147
|
t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"]
|
|
146
148
|
).length !== 0 && (console.log(
|
|
@@ -148,13 +150,13 @@ async function ht(t, g, s, b) {
|
|
|
148
150
|
Object.keys(
|
|
149
151
|
t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"]
|
|
150
152
|
).length
|
|
151
|
-
),
|
|
153
|
+
), d.distribution[i]["dcat:compressFormat"] = {
|
|
152
154
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:compressFormat"].uri || ""
|
|
153
155
|
}), Object.keys(
|
|
154
156
|
t.DistributionSimple["dcat:distribution"][i]["dcat:packageFormat"]
|
|
155
|
-
).length !== 0 && (
|
|
157
|
+
).length !== 0 && (d.distribution[i]["dcat:packageFormat"] = {
|
|
156
158
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dcat:packageFormat"].uri || ""
|
|
157
|
-
}), t.DistributionSimple["dcat:distribution"][i].checksum.uri !== "" && (
|
|
159
|
+
}), t.DistributionSimple["dcat:distribution"][i].checksum.uri !== "" && (d.distribution[i]["spdx:checksum"] = {
|
|
158
160
|
"@type": "spdx:Checksum",
|
|
159
161
|
"spdx:checksumValue": t.DistributionSimple["dcat:distribution"][i].checksum.title || "",
|
|
160
162
|
"spdx:algorithm": {
|
|
@@ -163,17 +165,17 @@ async function ht(t, g, s, b) {
|
|
|
163
165
|
}), Object.keys(
|
|
164
166
|
t.DistributionSimple["dcat:distribution"][i]["dct:language"]
|
|
165
167
|
).length !== 0) {
|
|
166
|
-
|
|
168
|
+
d.distribution[i]["dct:language"] = [];
|
|
167
169
|
for (let a = 0; a < t.DistributionSimple["dcat:distribution"][i]["dct:language"].length; a++)
|
|
168
|
-
|
|
170
|
+
d.distribution[i]["dct:language"][a] = {
|
|
169
171
|
"@id": t.DistributionSimple["dcat:distribution"][i]["dct:language"][a].uri
|
|
170
172
|
};
|
|
171
173
|
}
|
|
172
|
-
t.DistributionSimple["dcat:distribution"][i]["adms:status"].uri !== "" && (
|
|
174
|
+
t.DistributionSimple["dcat:distribution"][i]["adms:status"].uri !== "" && (d.distribution[i]["adms:status"] = {
|
|
173
175
|
"@id": t.DistributionSimple["dcat:distribution"][i]["adms:status"].uri || ""
|
|
174
176
|
});
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
+
const at = ((H = (E = (N = t.DistributionSimple) == null ? void 0 : N["dcat:distribution"]) == null ? void 0 : E[i]) == null ? void 0 : H.accessServices) || [];
|
|
178
|
+
at && (d.distribution[i]["dcat:accessService"] = (W = nt(at)) == null ? void 0 : W.filter(
|
|
177
179
|
(a) => a && (a["dct:title"] || a["dct:description"] || a["dcat:downloadURL"] || a["dcat:endpointURL"])
|
|
178
180
|
).map((a) => {
|
|
179
181
|
const n = {
|
|
@@ -187,48 +189,48 @@ async function ht(t, g, s, b) {
|
|
|
187
189
|
"@language": "de",
|
|
188
190
|
"@value": a["dct:description"]
|
|
189
191
|
});
|
|
190
|
-
const
|
|
191
|
-
return
|
|
192
|
-
"@id":
|
|
192
|
+
const r = a["dcat:downloadURL"] || a["dcat:endpointURL"];
|
|
193
|
+
return r !== void 0 && (n["dcat:endpointURL"] = {
|
|
194
|
+
"@id": r
|
|
193
195
|
}), n;
|
|
194
|
-
})),
|
|
195
|
-
for (let a = 0; a < ((
|
|
196
|
+
})), d.distribution[i]["foaf:page"] || (d.distribution[i]["foaf:page"] = []);
|
|
197
|
+
for (let a = 0; a < ((J = (_ = (Y = t.DistributionSimple) == null ? void 0 : Y["dcat:distribution"]) == null ? void 0 : _[i]) == null ? void 0 : J.documentations.length); a++) {
|
|
196
198
|
const n = t.DistributionSimple["dcat:distribution"][i].documentations[a];
|
|
197
199
|
if ((n == null ? void 0 : n["dct:title"]) !== void 0) {
|
|
198
|
-
const
|
|
200
|
+
const r = {
|
|
199
201
|
"@type": "foaf:Document",
|
|
200
202
|
"dct:title": {
|
|
201
203
|
"@language": "de",
|
|
202
204
|
"@value": n["dct:title"]
|
|
203
205
|
}
|
|
204
206
|
};
|
|
205
|
-
(n == null ? void 0 : n["dct:description"]) !== void 0 && (
|
|
207
|
+
(n == null ? void 0 : n["dct:description"]) !== void 0 && (r["dct:description"] = {
|
|
206
208
|
"@language": "de",
|
|
207
209
|
"@value": n["dct:description"]
|
|
208
|
-
}), (n == null ? void 0 : n["dcat:accessURL"]) !== void 0 && (
|
|
210
|
+
}), (n == null ? void 0 : n["dcat:accessURL"]) !== void 0 && (r["dcat:accessURL"] = {
|
|
209
211
|
"@id": n["dcat:accessURL"]
|
|
210
|
-
}), (n == null ? void 0 : n["dct:format"]) !== void 0 && (
|
|
212
|
+
}), (n == null ? void 0 : n["dct:format"]) !== void 0 && (r["dct:format"] = {
|
|
211
213
|
"@id": n.formatUri
|
|
212
|
-
}),
|
|
214
|
+
}), d.distribution[i]["foaf:page"][a] = r;
|
|
213
215
|
}
|
|
214
216
|
}
|
|
215
217
|
}
|
|
216
218
|
if (c[o], c[o] === "Additionals")
|
|
217
219
|
try {
|
|
218
220
|
for (let i = 0; i < Object.keys(t.Additionals).length; i++) {
|
|
219
|
-
if (Object.keys(t.Additionals)[i] === "dcat:landingPage" && (
|
|
221
|
+
if (Object.keys(t.Additionals)[i] === "dcat:landingPage" && (d.dataset["dcat:landingPage"] = [
|
|
220
222
|
...t.Additionals["dcat:landingPage"]
|
|
221
|
-
]), Object.keys(t.Additionals)[i] === "dct:issued" && (
|
|
222
|
-
"@value": t.Additionals["dct:issued"][0]["@value"].split(".").reverse().map((
|
|
223
|
+
]), Object.keys(t.Additionals)[i] === "dct:issued" && (d.dataset["dct:issued"] === void 0 && (d.dataset["dct:issued"] = []), d.dataset["dct:issued"].push({
|
|
224
|
+
"@value": t.Additionals["dct:issued"][0]["@value"].split(".").reverse().map((e, s) => s < 2 ? e.padStart(2, "0") : e).join("-") || "",
|
|
223
225
|
"@type": "http://www.w3.org/2001/XMLSchema#date"
|
|
224
226
|
})), Object.keys(t.Additionals)[i] === "dcatap:availability") {
|
|
225
227
|
console.log(
|
|
226
228
|
"#####################",
|
|
227
229
|
Object.keys(t.Additionals)[i]
|
|
228
230
|
);
|
|
229
|
-
for (let
|
|
230
|
-
|
|
231
|
-
"@id": t.Additionals["dcatap:availability"][
|
|
231
|
+
for (let e = 0; e < t.Additionals["dcatap:availability"].length; e++)
|
|
232
|
+
d.dataset["dcatap:availability"] === void 0 && (d.dataset["dcatap:availability"] = []), d.dataset["dcatap:availability"].push({
|
|
233
|
+
"@id": t.Additionals["dcatap:availability"][e].uri
|
|
232
234
|
});
|
|
233
235
|
}
|
|
234
236
|
if (Object.keys(t.Additionals)[i] === "dcat:keyword") {
|
|
@@ -236,10 +238,10 @@ async function ht(t, g, s, b) {
|
|
|
236
238
|
"#####################",
|
|
237
239
|
Object.keys(t.Additionals)[i]
|
|
238
240
|
);
|
|
239
|
-
for (let
|
|
240
|
-
|
|
241
|
-
"@value": t.Additionals["dcat:keyword"][
|
|
242
|
-
"@language": ((
|
|
241
|
+
for (let e = 0; e < t.Additionals["dcat:keyword"].length; e++)
|
|
242
|
+
d.dataset["dcat:keyword"] === void 0 && (d.dataset["dcat:keyword"] = []), d.dataset["dcat:keyword"].push({
|
|
243
|
+
"@value": t.Additionals["dcat:keyword"][e]["@value"],
|
|
244
|
+
"@language": ((Q = (K = t.Additionals["dcat:keyword"]) == null ? void 0 : K[e]) == null ? void 0 : Q["@language"]) || "de"
|
|
243
245
|
});
|
|
244
246
|
}
|
|
245
247
|
if (Object.keys(t.Additionals)[i] === "dct:references") {
|
|
@@ -247,19 +249,19 @@ async function ht(t, g, s, b) {
|
|
|
247
249
|
"#####################",
|
|
248
250
|
Object.keys(t.Additionals)[i]
|
|
249
251
|
);
|
|
250
|
-
for (let
|
|
251
|
-
|
|
252
|
-
"@id": t.Additionals["dct:references"][
|
|
252
|
+
for (let e = 0; e < t.Additionals["dct:references"].length; e++)
|
|
253
|
+
d.dataset["dct:references"] === void 0 && (d.dataset["dct:references"] = []), d.dataset["dct:references"].push({
|
|
254
|
+
"@id": t.Additionals["dct:references"][e]["@id"]
|
|
253
255
|
});
|
|
254
256
|
}
|
|
255
|
-
if (Object.keys(t.Additionals)[i] === "dct:spatial") {
|
|
257
|
+
if (Object.keys(t.Additionals)[i] === "dct:spatial" && t.Additionals["dct:spatial"]["@id"] !== "") {
|
|
256
258
|
console.log(
|
|
257
259
|
"#####################",
|
|
258
260
|
Object.keys(t.Additionals)[i]
|
|
259
261
|
);
|
|
260
|
-
for (let
|
|
261
|
-
|
|
262
|
-
"@id": t.Additionals["dct:spatial"][
|
|
262
|
+
for (let e = 0; e < t.Additionals["dct:spatial"].length; e++)
|
|
263
|
+
d.dataset["dct:spatial"] === void 0 && (d.dataset["dct:spatial"] = []), d.dataset["dct:spatial"].push({
|
|
264
|
+
"@id": t.Additionals["dct:spatial"][e]["@id"]
|
|
263
265
|
});
|
|
264
266
|
}
|
|
265
267
|
if (Object.keys(t.Additionals)[i] === "dcatde:geocodingDescription") {
|
|
@@ -267,9 +269,9 @@ async function ht(t, g, s, b) {
|
|
|
267
269
|
"#####################",
|
|
268
270
|
Object.keys(t.Additionals)[i]
|
|
269
271
|
);
|
|
270
|
-
for (let
|
|
271
|
-
|
|
272
|
-
"@value": t.Additionals["dcatde:geocodingDescription"][
|
|
272
|
+
for (let e = 0; e < t.Additionals["dcatde:geocodingDescription"].length; e++)
|
|
273
|
+
d.dataset["dcatde:geocodingDescription"] === void 0 && (d.dataset["dcatde:geocodingDescription"] = []), d.dataset["dcatde:geocodingDescription"].push({
|
|
274
|
+
"@value": t.Additionals["dcatde:geocodingDescription"][e]["@value"],
|
|
273
275
|
"@language": "de"
|
|
274
276
|
});
|
|
275
277
|
}
|
|
@@ -278,9 +280,9 @@ async function ht(t, g, s, b) {
|
|
|
278
280
|
"#####################",
|
|
279
281
|
Object.keys(t.Additionals)[i]
|
|
280
282
|
);
|
|
281
|
-
for (let
|
|
282
|
-
|
|
283
|
-
"@value": t.Additionals["dct:identifier"][
|
|
283
|
+
for (let e = 0; e < t.Additionals["dct:identifier"].length; e++)
|
|
284
|
+
d.dataset["dct:identifier"] === void 0 && (d.dataset["dct:identifier"] = []), d.dataset["dct:identifier"].push({
|
|
285
|
+
"@value": t.Additionals["dct:identifier"][e]["@value"]
|
|
284
286
|
});
|
|
285
287
|
}
|
|
286
288
|
if (Object.keys(t.Additionals)[i] === "adms:identifier") {
|
|
@@ -288,9 +290,9 @@ async function ht(t, g, s, b) {
|
|
|
288
290
|
"#####################",
|
|
289
291
|
Object.keys(t.Additionals)[i]
|
|
290
292
|
);
|
|
291
|
-
for (let
|
|
292
|
-
|
|
293
|
-
"@id": t.Additionals["adms:identifier"][
|
|
293
|
+
for (let e = 0; e < t.Additionals["adms:identifier"].length; e++)
|
|
294
|
+
d.dataset["adms:identifier"] === void 0 && (d.dataset["adms:identifier"] = []), d.dataset["adms:identifier"].push({
|
|
295
|
+
"@id": t.Additionals["adms:identifier"][e]["@id"]
|
|
294
296
|
});
|
|
295
297
|
}
|
|
296
298
|
if (Object.keys(t.Additionals)[i] === "dct:language") {
|
|
@@ -298,9 +300,9 @@ async function ht(t, g, s, b) {
|
|
|
298
300
|
"#####################",
|
|
299
301
|
Object.keys(t.Additionals)[i]
|
|
300
302
|
);
|
|
301
|
-
for (let
|
|
302
|
-
|
|
303
|
-
"@id": t.Additionals["dct:language"][
|
|
303
|
+
for (let e = 0; e < t.Additionals["dct:language"].length; e++)
|
|
304
|
+
d.dataset["dct:language"] === void 0 && (d.dataset["dct:language"] = []), d.dataset["dct:language"].push({
|
|
305
|
+
"@id": t.Additionals["dct:language"][e].uri
|
|
304
306
|
});
|
|
305
307
|
}
|
|
306
308
|
if (Object.keys(t.Additionals)[i] === "adms:versionNotes") {
|
|
@@ -308,9 +310,9 @@ async function ht(t, g, s, b) {
|
|
|
308
310
|
"#####################",
|
|
309
311
|
Object.keys(t.Additionals)[i]
|
|
310
312
|
);
|
|
311
|
-
for (let
|
|
312
|
-
|
|
313
|
-
"@value": t.Additionals["adms:versionNotes"][
|
|
313
|
+
for (let e = 0; e < t.Additionals["adms:versionNotes"].length; e++)
|
|
314
|
+
d.dataset["adms:versionNotes"] === void 0 && (d.dataset["adms:versionNotes"] = []), d.dataset["adms:versionNotes"].push({
|
|
315
|
+
"@value": t.Additionals["adms:versionNotes"][e]["@value"]
|
|
314
316
|
});
|
|
315
317
|
}
|
|
316
318
|
if (Object.keys(t.Additionals)[i] === "dcatde:legalBasis") {
|
|
@@ -318,10 +320,10 @@ async function ht(t, g, s, b) {
|
|
|
318
320
|
"#####################",
|
|
319
321
|
Object.keys(t.Additionals)[i]
|
|
320
322
|
);
|
|
321
|
-
for (let
|
|
322
|
-
|
|
323
|
-
"@value": t.Additionals["dcatde:legalBasis"][
|
|
324
|
-
"@language": ((
|
|
323
|
+
for (let e = 0; e < t.Additionals["dcatde:legalBasis"].length; e++)
|
|
324
|
+
d.dataset["dcatde:legalBasis"] === void 0 && (d.dataset["dcatde:legalBasis"] = []), d.dataset["dcatde:legalBasis"].push({
|
|
325
|
+
"@value": t.Additionals["dcatde:legalBasis"][e]["@value"],
|
|
326
|
+
"@language": ((V = (m = (Z = t.Additionals) == null ? void 0 : Z["dcatde:legalBasis"]) == null ? void 0 : m[e]) == null ? void 0 : V["@language"]) || "de"
|
|
325
327
|
});
|
|
326
328
|
}
|
|
327
329
|
if (Object.keys(t.Additionals)[i] === "dct:relation") {
|
|
@@ -329,9 +331,9 @@ async function ht(t, g, s, b) {
|
|
|
329
331
|
"#####################",
|
|
330
332
|
Object.keys(t.Additionals)[i]
|
|
331
333
|
);
|
|
332
|
-
for (let
|
|
333
|
-
|
|
334
|
-
"@id": t.Additionals["dct:relation"][
|
|
334
|
+
for (let e = 0; e < t.Additionals["dct:relation"].length; e++)
|
|
335
|
+
d.dataset["dct:relation"] === void 0 && (d.dataset["dct:relation"] = []), d.dataset["dct:relation"].push({
|
|
336
|
+
"@id": t.Additionals["dct:relation"][e]["@id"]
|
|
335
337
|
});
|
|
336
338
|
}
|
|
337
339
|
if (Object.keys(t.Additionals)[i] === "dcat:landingPage") {
|
|
@@ -339,9 +341,9 @@ async function ht(t, g, s, b) {
|
|
|
339
341
|
"#####################",
|
|
340
342
|
Object.keys(t.Additionals)[i]
|
|
341
343
|
);
|
|
342
|
-
for (let
|
|
343
|
-
|
|
344
|
-
"@id": t.Additionals["dcat:landingPage"][
|
|
344
|
+
for (let e = 0; e < t.Additionals["dcat:landingPage"].length; e++)
|
|
345
|
+
d.dataset["dcat:landingPage"] === void 0 && (d.dataset["dcat:landingPage"] = []), d.dataset["dcat:landingPage"].push({
|
|
346
|
+
"@id": t.Additionals["dcat:landingPage"][e]["@id"]
|
|
345
347
|
});
|
|
346
348
|
}
|
|
347
349
|
if (Object.keys(t.Additionals)[i] === "dct:conformsTo") {
|
|
@@ -349,10 +351,10 @@ async function ht(t, g, s, b) {
|
|
|
349
351
|
"#####################",
|
|
350
352
|
Object.keys(t.Additionals)[i]
|
|
351
353
|
);
|
|
352
|
-
for (let
|
|
353
|
-
|
|
354
|
-
"rdfs:label": t.Additionals["dct:conformsTo"][
|
|
355
|
-
"@id": t.Additionals["dct:conformsTo"][
|
|
354
|
+
for (let e = 0; e < t.Additionals["dct:conformsTo"].length; e++)
|
|
355
|
+
d.dataset["dct:conformsTo"] === void 0 && (d.dataset["dct:conformsTo"] = []), d.dataset["dct:conformsTo"].push({
|
|
356
|
+
"rdfs:label": t.Additionals["dct:conformsTo"][e]["rdfs:label"],
|
|
357
|
+
"@id": t.Additionals["dct:conformsTo"][e]["@id"]
|
|
356
358
|
});
|
|
357
359
|
}
|
|
358
360
|
if (Object.keys(t.Additionals)[i] === "dct:provenance") {
|
|
@@ -360,9 +362,9 @@ async function ht(t, g, s, b) {
|
|
|
360
362
|
"#####################",
|
|
361
363
|
Object.keys(t.Additionals)[i]
|
|
362
364
|
);
|
|
363
|
-
for (let
|
|
364
|
-
|
|
365
|
-
"rdfs:label": t.Additionals["dct:provenance"][
|
|
365
|
+
for (let e = 0; e < t.Additionals["dct:provenance"].length; e++)
|
|
366
|
+
d.dataset["dct:provenance"] === void 0 && (d.dataset["dct:provenance"] = []), d.dataset["dct:provenance"].push({
|
|
367
|
+
"rdfs:label": t.Additionals["dct:provenance"][e]["rdfs:label"]
|
|
366
368
|
});
|
|
367
369
|
}
|
|
368
370
|
if (Object.keys(t.Additionals)[i] === "prov:wasGeneratedBy") {
|
|
@@ -370,9 +372,9 @@ async function ht(t, g, s, b) {
|
|
|
370
372
|
"#####################",
|
|
371
373
|
Object.keys(t.Additionals)[i]
|
|
372
374
|
);
|
|
373
|
-
for (let
|
|
374
|
-
|
|
375
|
-
"@id": t.Additionals["prov:wasGeneratedBy"][
|
|
375
|
+
for (let e = 0; e < t.Additionals["prov:wasGeneratedBy"].length; e++)
|
|
376
|
+
d.dataset["prov:wasGeneratedBy"] === void 0 && (d.dataset["prov:wasGeneratedBy"] = []), d.dataset["prov:wasGeneratedBy"].push({
|
|
377
|
+
"@id": t.Additionals["prov:wasGeneratedBy"][e]["@id"]
|
|
376
378
|
});
|
|
377
379
|
}
|
|
378
380
|
if (Object.keys(t.Additionals)[i] === "prov:qualifiedAttribution") {
|
|
@@ -380,9 +382,9 @@ async function ht(t, g, s, b) {
|
|
|
380
382
|
"#####################",
|
|
381
383
|
Object.keys(t.Additionals)[i]
|
|
382
384
|
);
|
|
383
|
-
for (let
|
|
384
|
-
|
|
385
|
-
"@id": t.Additionals["prov:qualifiedAttribution"][
|
|
385
|
+
for (let e = 0; e < t.Additionals["prov:qualifiedAttribution"].length; e++)
|
|
386
|
+
d.dataset["prov:qualifiedAttribution"] === void 0 && (d.dataset["prov:qualifiedAttribution"] = []), d.dataset["prov:qualifiedAttribution"].push({
|
|
387
|
+
"@id": t.Additionals["prov:qualifiedAttribution"][e]["@id"]
|
|
386
388
|
});
|
|
387
389
|
}
|
|
388
390
|
if (Object.keys(t.Additionals)[i] === "dcat:qualifiedRelation") {
|
|
@@ -390,9 +392,9 @@ async function ht(t, g, s, b) {
|
|
|
390
392
|
"#####################",
|
|
391
393
|
Object.keys(t.Additionals)[i]
|
|
392
394
|
);
|
|
393
|
-
for (let
|
|
394
|
-
|
|
395
|
-
"@id": t.Additionals["dcat:qualifiedRelation"][
|
|
395
|
+
for (let e = 0; e < t.Additionals["dcat:qualifiedRelation"].length; e++)
|
|
396
|
+
d.dataset["dcat:qualifiedRelation"] === void 0 && (d.dataset["dcat:qualifiedRelation"] = []), d.dataset["dcat:qualifiedRelation"].push({
|
|
397
|
+
"@id": t.Additionals["dcat:qualifiedRelation"][e]["@id"]
|
|
396
398
|
});
|
|
397
399
|
}
|
|
398
400
|
if (Object.keys(t.Additionals)[i] === "dct:isReferencedBy") {
|
|
@@ -400,9 +402,9 @@ async function ht(t, g, s, b) {
|
|
|
400
402
|
"#####################",
|
|
401
403
|
Object.keys(t.Additionals)[i]
|
|
402
404
|
);
|
|
403
|
-
for (let
|
|
404
|
-
|
|
405
|
-
"@id": t.Additionals["dct:isReferencedBy"][
|
|
405
|
+
for (let e = 0; e < t.Additionals["dct:isReferencedBy"].length; e++)
|
|
406
|
+
d.dataset["dct:isReferencedBy"] === void 0 && (d.dataset["dct:isReferencedBy"] = []), d.dataset["dct:isReferencedBy"].push({
|
|
407
|
+
"@id": t.Additionals["dct:isReferencedBy"][e]["@id"]
|
|
406
408
|
});
|
|
407
409
|
}
|
|
408
410
|
if (Object.keys(t.Additionals)[i] === "dct:source") {
|
|
@@ -410,9 +412,9 @@ async function ht(t, g, s, b) {
|
|
|
410
412
|
"#####################",
|
|
411
413
|
Object.keys(t.Additionals)[i]
|
|
412
414
|
);
|
|
413
|
-
for (let
|
|
414
|
-
|
|
415
|
-
"@id": t.Additionals["dct:source"][
|
|
415
|
+
for (let e = 0; e < t.Additionals["dct:source"].length; e++)
|
|
416
|
+
d.dataset["dct:source"] === void 0 && (d.dataset["dct:source"] = []), d.dataset["dct:source"].push({
|
|
417
|
+
"@id": t.Additionals["dct:source"][e]["@id"]
|
|
416
418
|
});
|
|
417
419
|
}
|
|
418
420
|
if (Object.keys(t.Additionals)[i] === "dct:hasVersion") {
|
|
@@ -420,9 +422,9 @@ async function ht(t, g, s, b) {
|
|
|
420
422
|
"#####################",
|
|
421
423
|
Object.keys(t.Additionals)[i]
|
|
422
424
|
);
|
|
423
|
-
for (let
|
|
424
|
-
|
|
425
|
-
"@id": t.Additionals["dct:hasVersion"][
|
|
425
|
+
for (let e = 0; e < t.Additionals["dct:hasVersion"].length; e++)
|
|
426
|
+
d.dataset["dct:hasVersion"] === void 0 && (d.dataset["dct:hasVersion"] = []), d.dataset["dct:hasVersion"].push({
|
|
427
|
+
"@id": t.Additionals["dct:hasVersion"][e]["@id"]
|
|
426
428
|
});
|
|
427
429
|
}
|
|
428
430
|
if (Object.keys(t.Additionals)[i] === "dct:isVersionOf") {
|
|
@@ -430,9 +432,9 @@ async function ht(t, g, s, b) {
|
|
|
430
432
|
"#####################",
|
|
431
433
|
Object.keys(t.Additionals)[i]
|
|
432
434
|
);
|
|
433
|
-
for (let
|
|
434
|
-
|
|
435
|
-
"@id": t.Additionals["dct:isVersionOf"][
|
|
435
|
+
for (let e = 0; e < t.Additionals["dct:isVersionOf"].length; e++)
|
|
436
|
+
d.dataset["dct:isVersionOf"] === void 0 && (d.dataset["dct:isVersionOf"] = []), d.dataset["dct:isVersionOf"].push({
|
|
437
|
+
"@id": t.Additionals["dct:isVersionOf"][e]["@id"]
|
|
436
438
|
});
|
|
437
439
|
}
|
|
438
440
|
if (Object.keys(t.Additionals)[i] === "dct:creator") {
|
|
@@ -440,27 +442,30 @@ async function ht(t, g, s, b) {
|
|
|
440
442
|
"#####################",
|
|
441
443
|
Object.keys(t.Additionals)[i]
|
|
442
444
|
);
|
|
443
|
-
for (let
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
"
|
|
448
|
-
"foaf:
|
|
445
|
+
for (let e = 0; e < t.Additionals["dct:creator"].length; e++) {
|
|
446
|
+
d.dataset["dct:creator"] === void 0 && (d.dataset["dct:creator"] = []);
|
|
447
|
+
let s;
|
|
448
|
+
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({
|
|
449
|
+
"@type": s,
|
|
450
|
+
"foaf:name": t.Additionals["dct:creator"][e]["foaf:name"],
|
|
451
|
+
"foaf:mbox": t.Additionals["dct:creator"][e]["foaf:mbox"],
|
|
452
|
+
"foaf:homepage": t.Additionals["dct:creator"][e]["foaf:homepage"]
|
|
449
453
|
});
|
|
454
|
+
}
|
|
450
455
|
}
|
|
451
456
|
if (Object.keys(t.Additionals)[i] === "foaf:page") {
|
|
452
457
|
console.log(
|
|
453
458
|
"#####################",
|
|
454
459
|
Object.keys(t.Additionals)[i]
|
|
455
460
|
);
|
|
456
|
-
for (let
|
|
457
|
-
|
|
461
|
+
for (let e = 0; e < t.Additionals["foaf:page"].length; e++)
|
|
462
|
+
d.dataset["foaf:page"] === void 0 && (d.dataset["foaf:page"] = []), d.dataset["foaf:page"].push({
|
|
458
463
|
"dct:format": {
|
|
459
|
-
"@id": (
|
|
464
|
+
"@id": (it = (tt = t.Additionals["foaf:page"]) == null ? void 0 : tt[e]) == null ? void 0 : it.uri
|
|
460
465
|
},
|
|
461
|
-
"dct:title": t.Additionals["foaf:page"][
|
|
462
|
-
"dct:description": t.Additionals["foaf:page"][
|
|
463
|
-
"foaf:homepage": t.Additionals["foaf:page"][
|
|
466
|
+
"dct:title": t.Additionals["foaf:page"][e]["dct:title"],
|
|
467
|
+
"dct:description": t.Additionals["foaf:page"][e]["dct:description"],
|
|
468
|
+
"foaf:homepage": t.Additionals["foaf:page"][e]["foaf:homepage"]
|
|
464
469
|
});
|
|
465
470
|
}
|
|
466
471
|
if (Object.keys(t.Additionals)[i] === "dct:contributor") {
|
|
@@ -468,34 +473,37 @@ async function ht(t, g, s, b) {
|
|
|
468
473
|
"#####################",
|
|
469
474
|
Object.keys(t.Additionals)[i]
|
|
470
475
|
);
|
|
471
|
-
for (let
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
"
|
|
476
|
-
"foaf:
|
|
477
|
-
|
|
476
|
+
for (let e = 0; e < t.Additionals["dct:contributor"].length; e++) {
|
|
477
|
+
d.dataset["dct:contributor"] === void 0 && (d.dataset["dct:contributor"] = []);
|
|
478
|
+
let s;
|
|
479
|
+
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({
|
|
480
|
+
"@type": s,
|
|
481
|
+
"foaf:name": t.Additionals["dct:contributor"][e]["foaf:name"],
|
|
482
|
+
"foaf:mbox": t.Additionals["dct:contributor"][e]["foaf:mbox"],
|
|
483
|
+
"foaf:homepage": t.Additionals["dct:contributor"][e]["foaf:homepage"]
|
|
484
|
+
});
|
|
485
|
+
}
|
|
478
486
|
}
|
|
479
|
-
if (Object.keys(t.Additionals)[i] === "owl:versionInfo" && (
|
|
487
|
+
if (Object.keys(t.Additionals)[i] === "owl:versionInfo" && (d.dataset["owl:versionInfo"] = {
|
|
480
488
|
"@value": t.Additionals["owl:versionInfo"][0]["@value"]
|
|
481
|
-
}), Object.keys(t.Additionals)[i] === "dcatde:contributorID" && (
|
|
489
|
+
}), Object.keys(t.Additionals)[i] === "dcatde:contributorID" && (d.dataset["dcatde:contributorID"] = {
|
|
482
490
|
"@id": t.Additionals["dcatde:contributorID"][0].uri
|
|
483
|
-
}), Object.keys(t.Additionals)[i] === "dct:accessRights" && (
|
|
491
|
+
}), Object.keys(t.Additionals)[i] === "dct:accessRights" && (d.dataset["dct:accessRights"] = {
|
|
484
492
|
"@id": t.Additionals["dct:accessRights"][0].uri
|
|
485
|
-
}), Object.keys(t.Additionals)[i] === "dct:accrualPeriodicity" && (
|
|
493
|
+
}), Object.keys(t.Additionals)[i] === "dct:accrualPeriodicity" && (d.dataset["dct:accrualPeriodicity"] = {
|
|
486
494
|
"@id": t.Additionals["dct:accrualPeriodicity"][0].uri
|
|
487
|
-
}), Object.keys(t.Additionals)[i] === "dct:type" && (
|
|
495
|
+
}), Object.keys(t.Additionals)[i] === "dct:type" && (d.dataset["dct:type"] = {
|
|
488
496
|
"@id": t.Additionals["dct:type"][0].uri
|
|
489
|
-
}), Object.keys(t.Additionals)[i] === "dcat:spatialResolutionInMeters" && (
|
|
497
|
+
}), Object.keys(t.Additionals)[i] === "dcat:spatialResolutionInMeters" && (d.dataset["dcat:spatialResolutionInMeters"] = {
|
|
490
498
|
"@value": t.Additionals["dcat:spatialResolutionInMeters"][0]["@value"] || "",
|
|
491
499
|
"@type": "http://www.w3.org/2001/XMLSchema#decimal"
|
|
492
|
-
}), Object.keys(t.Additionals)[i] === "dcat:temporalResolution" && (console.log(t.Additionals["dcat:temporalResolution"]),
|
|
500
|
+
}), Object.keys(t.Additionals)[i] === "dcat:temporalResolution" && (console.log(t.Additionals["dcat:temporalResolution"]), d.dataset["dcat:temporalResolution"] = {
|
|
493
501
|
"@type": "http://www.w3.org/2001/XMLSchema#duration",
|
|
494
502
|
"@value": `P${t.Additionals["dcat:temporalResolution"][0].Year}Y${t.Additionals["dcat:temporalResolution"][1].Month}M${t.Additionals["dcat:temporalResolution"][2].Day}D${t.Additionals["dcat:temporalResolution"][3].Hour}H${t.Additionals["dcat:temporalResolution"][4].Minute}M${t.Additionals["dcat:temporalResolution"][5].Second}S`
|
|
495
503
|
}), Object.keys(t.Additionals)[i] === "dcatde:politicalGeocodingLevelURI")
|
|
496
|
-
for (let
|
|
497
|
-
|
|
498
|
-
"@id": ((
|
|
504
|
+
for (let e = 0; e < t.Additionals["dcatde:politicalGeocodingLevelURI"].length; e++)
|
|
505
|
+
d.dataset["dcatde:politicalGeocodingLevelURI"] === void 0 && (d.dataset["dcatde:politicalGeocodingLevelURI"] = []), d.dataset["dcatde:politicalGeocodingLevelURI"].push({
|
|
506
|
+
"@id": ((et = (dt = t.Additionals["dcatde:politicalGeocodingLevelURI"]) == null ? void 0 : dt[e]) == null ? void 0 : et.uri) || ""
|
|
499
507
|
});
|
|
500
508
|
}
|
|
501
509
|
} catch (i) {
|
|
@@ -505,34 +513,34 @@ async function ht(t, g, s, b) {
|
|
|
505
513
|
} catch (o) {
|
|
506
514
|
console.log(o);
|
|
507
515
|
}
|
|
508
|
-
let A =
|
|
516
|
+
let A = st(d, u);
|
|
509
517
|
return { actionParams: {
|
|
510
518
|
id: y,
|
|
511
|
-
catalog:
|
|
519
|
+
catalog: l.permissions[0].rsname,
|
|
512
520
|
body: A,
|
|
513
|
-
title:
|
|
514
|
-
description:
|
|
521
|
+
title: d.dataset["dct:title"]["@value"],
|
|
522
|
+
description: d.dataset["dct:description"]["@value"]
|
|
515
523
|
}, body: A };
|
|
516
524
|
}
|
|
517
|
-
function
|
|
518
|
-
const
|
|
525
|
+
function st(t, g) {
|
|
526
|
+
const l = {}, b = Object.keys(t);
|
|
519
527
|
for (let c = 0; c < b.length; c++)
|
|
520
|
-
b[c],
|
|
521
|
-
let
|
|
528
|
+
b[c], l[b[c]] = t[b[c]];
|
|
529
|
+
let p = {
|
|
522
530
|
"@graph": [
|
|
523
531
|
{
|
|
524
|
-
...
|
|
532
|
+
...l.dataset
|
|
525
533
|
},
|
|
526
|
-
|
|
534
|
+
l.distribution,
|
|
527
535
|
{
|
|
528
|
-
...
|
|
536
|
+
...l.meta
|
|
529
537
|
}
|
|
530
538
|
],
|
|
531
539
|
"@context": g
|
|
532
540
|
// Füge die Prefixes hinzu
|
|
533
541
|
};
|
|
534
|
-
return console.log(
|
|
542
|
+
return console.log(p), p;
|
|
535
543
|
}
|
|
536
544
|
export {
|
|
537
|
-
|
|
545
|
+
gt as default
|
|
538
546
|
};
|