@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.
Files changed (24) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +43 -43
  3. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +1 -1
  4. package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +316 -302
  5. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +32 -36
  6. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +120 -105
  7. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +40 -40
  8. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +44 -48
  9. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +57 -61
  10. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +61 -45
  11. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +394 -378
  12. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +42 -42
  13. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +31 -92
  14. package/dist/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +3 -3
  15. package/dist/data-provider-interface/components/DistLicense.vue.js +107 -96
  16. package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +329 -310
  17. package/dist/data-provider-interface/components/PolGeoUriPage.vue.js +39 -39
  18. package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +2 -2
  19. package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +176 -179
  20. package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +203 -195
  21. package/dist/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +5 -5
  22. package/dist/data-provider-interface/store/modules/authStore.js +14 -12
  23. package/dist/data-provider-interface/views/InputPage.vue.js +95 -96
  24. package/package.json +1 -1
@@ -1,111 +1,117 @@
1
1
  import "axios";
2
- import { asSomeArray as lt } from "../../composables/useDpiSimpleLoader.js";
3
- let e = { distribution: [], dataset: {}, meta: {} };
4
- function pt(t) {
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 ht(t, g, s, b) {
8
- var h, f, v, k, D, O, j, R, w, S, I, x, L, B, C, P, U, T, M, G, q, F, X, $, N, z, E, H, W, Y, _, J, K, Q, Z, m, V, tt, it, dt, et, at, nt, ot;
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 r = [];
10
+ let p = [];
11
11
  const c = Object.keys(t);
12
- e.dataset["dcat:distribution"] = [];
12
+ d.dataset["dcat:distribution"] = [];
13
13
  for (let o = 0; o < t.DistributionSimple["dcat:distribution"].length; o++)
14
- r.push(crypto.randomUUID()), e.dataset["dcat:distribution"].push({
15
- "@id": `https://piveau.io/set/distribution/${r[o]}`
14
+ p.push(crypto.randomUUID()), d.dataset["dcat:distribution"].push({
15
+ "@id": `https://piveau.io/set/distribution/${p[o]}`
16
16
  });
17
- const rt = new URLSearchParams(window.location.search).get("edit");
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 d = 1; d < t.Discoverability.discoverabilityPage.length; d++)
23
+ for (let e = 1; e < t.Discoverability.discoverabilityPage.length; e++)
24
24
  i.push({
25
- "@id": t.Discoverability.discoverabilityPage[d].uri
25
+ "@id": t.Discoverability.discoverabilityPage[e].uri
26
26
  });
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"] = {
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
- }, e.dataset["dcatap:applicableLegislation"] = {
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
- e.dataset["dpi:isDPIv3"] = !0;
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" && (e.dataset["dct:title"] = t.BasicInfos["dct:title"][0] || "", y = pt(
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
- ), rt === "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] || "", e.dataset["dct:publisher"]["@type"] = "foaf:Agent"), Object.keys(t.BasicInfos)[i] === "dcat:contactPoint" && (e.dataset["dcat:contactPoint"] = t.BasicInfos["dcat:contactPoint"][0] || "", e.dataset["dcat:contactPoint"]["@type"] = "foaf:Agent"), e.dataset["@type"] = "dcat:Dataset", e.meta["dcat:catalog"] = s.permissions[0].rsname, e.meta["@type"] = "dcat:CatalogRecord";
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
- 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" && t.Covering["dcat:temporalResolution"]["dct:temporal"][d]["dcat:startDate"] !== "" && (e.dataset["dct:temporal"][d] = {
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"][d]["dcat:endDate"] || "",
49
- "@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][d].dataType
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"][d]["dcat:startDate"] || "",
53
- "@type": "http://www.w3.org/2001/XMLSchema#" + t.Covering["dcat:temporalResolution"]["dct:temporal"][d].dataType
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"][d].dataType === "dateTime" && t.Covering["dcat:temporalResolution"]["dct:temporal"][d]["dcat:startDate"] !== "" && (e.dataset["dct:temporal"][d] = {
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"][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
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"][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
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" && (e.dataset["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 (e.distribution[i] = {}, ((w = (R = t.Discoverability) == null ? void 0 : R.hvdPage[0]) == null ? void 0 : w.uri) != null && (e.distribution[i]["dcatap:applicableLegislation"] = {
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
- }), e.distribution[i]["@type"] = "dcat:Distribution", e.distribution[i]["@id"] = `https://piveau.io/set/distribution/${r[i]}`, t.DistributionSimple["dcat:distribution"][i]["dcat:accessURL"] && (e.distribution[i]["dcat:accessURL"] = {
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
- e.distribution[i]["dcat:downloadURL"] = [];
82
+ d.distribution[i]["dcat:downloadURL"] = [];
81
83
  for (let a = 0; a < t.DistributionSimple["dcat:distribution"][i]["dcat:downloadURL"].length; a++)
82
- e.distribution[i]["dcat:downloadURL"][a] = {
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
- (S = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : S.policyItems
89
+ (x = t.DistributionSimple["dcat:distribution"][i]) == null ? void 0 : x.policyItems
88
90
  ).length !== 0) {
89
- e.distribution[i]["odrl:hasPolicy"] = [];
91
+ d.distribution[i]["odrl:hasPolicy"] = [];
90
92
  for (let a = 0; a < t.DistributionSimple["dcat:distribution"][i].policyItems.length; a++)
91
- e.distribution[i]["odrl:hasPolicy"][a] = {
93
+ d.distribution[i]["odrl:hasPolicy"][a] = {
92
94
  "@id": t.DistributionSimple["dcat:distribution"][i].policyItems[a]["dcat:downloadURL"]
93
95
  };
94
96
  }
95
- let d = (x = (I = t.DistributionSimple) == null ? void 0 : I["dct:license"]) == null ? void 0 : x[0];
96
- d === void 0 && (d = (P = (C = (B = (L = t.DistributionSimple) == null ? void 0 : L["dcat:distribution"]) == null ? void 0 : B[0]) == null ? void 0 : C["dct:license"]) == null ? void 0 : P[0]), e.distribution[i]["dct:license"] = {
97
- "@id": (d == null ? void 0 : d.uri) || ""
98
- }, e.distribution[i]["dcatde:licenseAttributionByText"] = {
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": (d == null ? void 0 : d.attribution) || ""
101
- };
102
- const p = (M = (T = (U = t.DistributionSimple) == null ? void 0 : U["dcat:distribution"]) == null ? void 0 : T[i]) == null ? void 0 : M["dct:format"];
103
- p && (e.distribution[i]["dct:format"] = {
104
- "@id": (p == null ? void 0 : p.uri) || ""
105
- }), ((F = (q = (G = t.DistributionSimple) == null ? void 0 : G["dcat:distribution"]) == null ? void 0 : q[i]) == null ? void 0 : F["dcatap:applicableLegislation"]) != null && (e.distribution[i]["dct:format"] = (N = ($ = (X = t.DistributionSimple) == null ? void 0 : X["dcat:distribution"]) == null ? void 0 : $[i]) == null ? void 0 : N["dcatap:applicableLegislation"]["@id"]);
106
- const ct = ((H = (E = (z = t.DistributionSimple) == null ? void 0 : z["dcat:distribution"]) == null ? void 0 : E[i]) == null ? void 0 : H.conformsToItems) || [];
107
- if (ct && (e.distribution[i]["dct:conformsTo"] = lt(
108
- ct
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 && (e.distribution[i]["dcat:mediaType"] = {
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"] && (e.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"] && (e.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 && (e.distribution[i]["dcatap:availability"] = {
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"] && (e.distribution[i]["dct:issued"] = {
129
- "@value": t.DistributionSimple["dcat:distribution"][i]["dct:issued"] || ""
130
- // "@type": "http://www.w3.org/2001/XMLSchema#date",
131
- }), t.DistributionSimple["dcat:distribution"][i]["dct:modified"] && (e.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"] && (e.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"] && (e.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
- ), e.distribution[i]["dcat:compressFormat"] = {
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 && (e.distribution[i]["dcat:packageFormat"] = {
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 !== "" && (e.distribution[i]["spdx:checksum"] = {
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
- e.distribution[i]["dct:language"] = [];
168
+ d.distribution[i]["dct:language"] = [];
167
169
  for (let a = 0; a < t.DistributionSimple["dcat:distribution"][i]["dct:language"].length; a++)
168
- e.distribution[i]["dct:language"][a] = {
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 !== "" && (e.distribution[i]["adms:status"] = {
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 st = ((_ = (Y = (W = t.DistributionSimple) == null ? void 0 : W["dcat:distribution"]) == null ? void 0 : Y[i]) == null ? void 0 : _.accessServices) || [];
176
- st && (e.distribution[i]["dcat:accessService"] = (J = lt(st)) == null ? void 0 : J.filter(
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 l = a["dcat:downloadURL"] || a["dcat:endpointURL"];
191
- return l !== void 0 && (n["dcat:endpointURL"] = {
192
- "@id": l
192
+ const r = a["dcat:downloadURL"] || a["dcat:endpointURL"];
193
+ return r !== void 0 && (n["dcat:endpointURL"] = {
194
+ "@id": r
193
195
  }), n;
194
- })), e.distribution[i]["foaf:page"] || (e.distribution[i]["foaf:page"] = []);
195
- 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++) {
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 l = {
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 && (l["dct:description"] = {
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 && (l["dcat:accessURL"] = {
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 && (l["dct:format"] = {
212
+ }), (n == null ? void 0 : n["dct:format"]) !== void 0 && (r["dct:format"] = {
211
213
  "@id": n.formatUri
212
- }), e.distribution[i]["foaf:page"][a] = l;
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" && (e.dataset["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" && (e.dataset["dct:issued"] === void 0 && (e.dataset["dct:issued"] = []), e.dataset["dct:issued"].push({
222
- "@value": t.Additionals["dct:issued"][0]["@value"].split(".").reverse().map((d, p) => p < 2 ? d.padStart(2, "0") : d).join("-") || "",
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 d = 0; d < t.Additionals["dcatap:availability"].length; d++)
230
- e.dataset["dcatap:availability"] === void 0 && (e.dataset["dcatap:availability"] = []), e.dataset["dcatap:availability"].push({
231
- "@id": t.Additionals["dcatap:availability"][d].uri
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 d = 0; d < t.Additionals["dcat:keyword"].length; d++)
240
- e.dataset["dcat:keyword"] === void 0 && (e.dataset["dcat:keyword"] = []), e.dataset["dcat:keyword"].push({
241
- "@value": t.Additionals["dcat:keyword"][d]["@value"],
242
- "@language": ((V = (m = t.Additionals["dcat:keyword"]) == null ? void 0 : m[d]) == null ? void 0 : V["@language"]) || "de"
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 d = 0; d < t.Additionals["dct:references"].length; d++)
251
- e.dataset["dct:references"] === void 0 && (e.dataset["dct:references"] = []), e.dataset["dct:references"].push({
252
- "@id": t.Additionals["dct:references"][d]["@id"]
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 d = 0; d < t.Additionals["dct:spatial"].length; d++)
261
- e.dataset["dct:spatial"] === void 0 && (e.dataset["dct:spatial"] = []), e.dataset["dct:spatial"].push({
262
- "@id": t.Additionals["dct:spatial"][d]["@id"]
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 d = 0; d < t.Additionals["dcatde:geocodingDescription"].length; d++)
271
- e.dataset["dcatde:geocodingDescription"] === void 0 && (e.dataset["dcatde:geocodingDescription"] = []), e.dataset["dcatde:geocodingDescription"].push({
272
- "@value": t.Additionals["dcatde:geocodingDescription"][d]["@value"],
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 d = 0; d < t.Additionals["dct:identifier"].length; d++)
282
- e.dataset["dct:identifier"] === void 0 && (e.dataset["dct:identifier"] = []), e.dataset["dct:identifier"].push({
283
- "@value": t.Additionals["dct:identifier"][d]["@value"]
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 d = 0; d < t.Additionals["adms:identifier"].length; d++)
292
- e.dataset["adms:identifier"] === void 0 && (e.dataset["adms:identifier"] = []), e.dataset["adms:identifier"].push({
293
- "@id": t.Additionals["adms:identifier"][d]["@id"]
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 d = 0; d < t.Additionals["dct:language"].length; d++)
302
- e.dataset["dct:language"] === void 0 && (e.dataset["dct:language"] = []), e.dataset["dct:language"].push({
303
- "@id": t.Additionals["dct:language"][d].uri
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 d = 0; d < t.Additionals["adms:versionNotes"].length; d++)
312
- e.dataset["adms:versionNotes"] === void 0 && (e.dataset["adms:versionNotes"] = []), e.dataset["adms:versionNotes"].push({
313
- "@value": t.Additionals["adms:versionNotes"][d]["@value"]
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 d = 0; d < t.Additionals["dcatde:legalBasis"].length; d++)
322
- e.dataset["dcatde:legalBasis"] === void 0 && (e.dataset["dcatde:legalBasis"] = []), e.dataset["dcatde:legalBasis"].push({
323
- "@value": t.Additionals["dcatde:legalBasis"][d]["@value"],
324
- "@language": ((dt = (it = (tt = t.Additionals) == null ? void 0 : tt["dcatde:legalBasis"]) == null ? void 0 : it[d]) == null ? void 0 : dt["@language"]) || "de"
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 d = 0; d < t.Additionals["dct:relation"].length; d++)
333
- e.dataset["dct:relation"] === void 0 && (e.dataset["dct:relation"] = []), e.dataset["dct:relation"].push({
334
- "@id": t.Additionals["dct:relation"][d]["@id"]
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 d = 0; d < t.Additionals["dcat:landingPage"].length; d++)
343
- e.dataset["dcat:landingPage"] === void 0 && (e.dataset["dcat:landingPage"] = []), e.dataset["dcat:landingPage"].push({
344
- "@id": t.Additionals["dcat:landingPage"][d]["@id"]
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 d = 0; d < t.Additionals["dct:conformsTo"].length; d++)
353
- e.dataset["dct:conformsTo"] === void 0 && (e.dataset["dct:conformsTo"] = []), e.dataset["dct:conformsTo"].push({
354
- "rdfs:label": t.Additionals["dct:conformsTo"][d]["rdfs:label"],
355
- "@id": t.Additionals["dct:conformsTo"][d]["@id"]
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 d = 0; d < t.Additionals["dct:provenance"].length; d++)
364
- e.dataset["dct:provenance"] === void 0 && (e.dataset["dct:provenance"] = []), e.dataset["dct:provenance"].push({
365
- "rdfs:label": t.Additionals["dct:provenance"][d]["rdfs:label"]
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 d = 0; d < t.Additionals["prov:wasGeneratedBy"].length; d++)
374
- e.dataset["prov:wasGeneratedBy"] === void 0 && (e.dataset["prov:wasGeneratedBy"] = []), e.dataset["prov:wasGeneratedBy"].push({
375
- "@id": t.Additionals["prov:wasGeneratedBy"][d]["@id"]
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 d = 0; d < t.Additionals["prov:qualifiedAttribution"].length; d++)
384
- e.dataset["prov:qualifiedAttribution"] === void 0 && (e.dataset["prov:qualifiedAttribution"] = []), e.dataset["prov:qualifiedAttribution"].push({
385
- "@id": t.Additionals["prov:qualifiedAttribution"][d]["@id"]
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 d = 0; d < t.Additionals["dcat:qualifiedRelation"].length; d++)
394
- e.dataset["dcat:qualifiedRelation"] === void 0 && (e.dataset["dcat:qualifiedRelation"] = []), e.dataset["dcat:qualifiedRelation"].push({
395
- "@id": t.Additionals["dcat:qualifiedRelation"][d]["@id"]
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 d = 0; d < t.Additionals["dct:isReferencedBy"].length; d++)
404
- e.dataset["dct:isReferencedBy"] === void 0 && (e.dataset["dct:isReferencedBy"] = []), e.dataset["dct:isReferencedBy"].push({
405
- "@id": t.Additionals["dct:isReferencedBy"][d]["@id"]
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 d = 0; d < t.Additionals["dct:source"].length; d++)
414
- e.dataset["dct:source"] === void 0 && (e.dataset["dct:source"] = []), e.dataset["dct:source"].push({
415
- "@id": t.Additionals["dct:source"][d]["@id"]
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 d = 0; d < t.Additionals["dct:hasVersion"].length; d++)
424
- e.dataset["dct:hasVersion"] === void 0 && (e.dataset["dct:hasVersion"] = []), e.dataset["dct:hasVersion"].push({
425
- "@id": t.Additionals["dct:hasVersion"][d]["@id"]
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 d = 0; d < t.Additionals["dct:isVersionOf"].length; d++)
434
- e.dataset["dct:isVersionOf"] === void 0 && (e.dataset["dct:isVersionOf"] = []), e.dataset["dct:isVersionOf"].push({
435
- "@id": t.Additionals["dct:isVersionOf"][d]["@id"]
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 d = 0; d < t.Additionals["dct:creator"].length; d++)
444
- e.dataset["dct:creator"] === void 0 && (e.dataset["dct:creator"] = []), e.dataset["dct:creator"].push({
445
- "rdf:type": t.Additionals["dct:creator"][d]["rdf:type"],
446
- "foaf:name": t.Additionals["dct:creator"][d]["foaf:name"],
447
- "foaf:mbox": t.Additionals["dct:creator"][d]["foaf:mbox"],
448
- "foaf:homepage": t.Additionals["dct:creator"][d]["foaf:homepage"]
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 d = 0; d < t.Additionals["foaf:page"].length; d++)
457
- e.dataset["foaf:page"] === void 0 && (e.dataset["foaf:page"] = []), e.dataset["foaf:page"].push({
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": (at = (et = t.Additionals["foaf:page"]) == null ? void 0 : et[d]) == null ? void 0 : at.uri
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"][d]["dct:title"],
462
- "dct:description": t.Additionals["foaf:page"][d]["dct:description"],
463
- "foaf:homepage": t.Additionals["foaf:page"][d]["foaf:homepage"]
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 d = 0; d < t.Additionals["dct:contributor"].length; d++)
472
- e.dataset["dct:contributor"] === void 0 && (e.dataset["dct:contributor"] = []), e.dataset["dct:contributor"].push({
473
- "rdf:type": t.Additionals["dct:contributor"][d]["rdf:type"],
474
- "foaf:name": t.Additionals["dct:contributor"][d]["foaf:name"],
475
- "foaf:mbox": t.Additionals["dct:contributor"][d]["foaf:mbox"],
476
- "foaf:homepage": t.Additionals["dct:contributor"][d]["foaf:homepage"]
477
- }), e.dataset["dct:contributor"][d]["@type"] = "foaf:Agent";
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" && (e.dataset["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" && (e.dataset["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" && (e.dataset["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" && (e.dataset["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" && (e.dataset["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" && (e.dataset["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"]), e.dataset["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 d = 0; d < t.Additionals["dcatde:politicalGeocodingLevelURI"].length; d++)
497
- e.dataset["dcatde:politicalGeocodingLevelURI"] === void 0 && (e.dataset["dcatde:politicalGeocodingLevelURI"] = []), e.dataset["dcatde:politicalGeocodingLevelURI"].push({
498
- "@id": ((ot = (nt = t.Additionals["dcatde:politicalGeocodingLevelURI"]) == null ? void 0 : nt[d]) == null ? void 0 : ot.uri) || ""
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 = bt(e, u);
516
+ let A = st(d, u);
509
517
  return { actionParams: {
510
518
  id: y,
511
- catalog: s.permissions[0].rsname,
519
+ catalog: l.permissions[0].rsname,
512
520
  body: A,
513
- title: e.dataset["dct:title"]["@value"],
514
- description: e.dataset["dct:description"]["@value"]
521
+ title: d.dataset["dct:title"]["@value"],
522
+ description: d.dataset["dct:description"]["@value"]
515
523
  }, body: A };
516
524
  }
517
- function bt(t, g) {
518
- const s = {}, b = Object.keys(t);
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], s[b[c]] = t[b[c]];
521
- let r = {
528
+ b[c], l[b[c]] = t[b[c]];
529
+ let p = {
522
530
  "@graph": [
523
531
  {
524
- ...s.dataset
532
+ ...l.dataset
525
533
  },
526
- s.distribution,
534
+ l.distribution,
527
535
  {
528
- ...s.meta
536
+ ...l.meta
529
537
  }
530
538
  ],
531
539
  "@context": g
532
540
  // Füge die Prefixes hinzu
533
541
  };
534
- return console.log(r), r;
542
+ return console.log(p), p;
535
543
  }
536
544
  export {
537
- ht as default
545
+ gt as default
538
546
  };