@piveau/piveau-hub-ui-modules 4.3.12 → 4.3.14
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/data-provider-interface/DPIMenu.vue.d.ts +2 -2
- package/dist/data-provider-interface/DataProviderInterface.vue.d.ts +29 -7
- package/dist/data-provider-interface/DataProviderInterface.vue.mjs +12 -69
- package/dist/data-provider-interface/DataProviderInterface.vue.mjs.map +1 -1
- package/dist/data-provider-interface/DataProviderInterface.vue2.mjs +91 -2
- package/dist/data-provider-interface/DataProviderInterface.vue2.mjs.map +1 -1
- package/dist/data-provider-interface/DataProviderInterface.vue3.mjs +5 -0
- package/dist/data-provider-interface/DataProviderInterface.vue3.mjs.map +1 -0
- package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs +30 -32
- package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/DataFetchingComponent.vue.d.ts +1 -1
- package/dist/data-provider-interface/components/DataFetchingComponent.vue.mjs +23 -18
- package/dist/data-provider-interface/components/DataFetchingComponent.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/FileUpload.vue.d.ts +1 -1
- package/dist/data-provider-interface/components/Navigation.vue.d.ts +4 -4
- package/dist/data-provider-interface/composables/index.d.ts +2 -0
- package/dist/data-provider-interface/composables/useDpiContext.d.ts +17 -0
- package/dist/data-provider-interface/composables/useDpiContext.mjs +19 -0
- package/dist/data-provider-interface/composables/useDpiContext.mjs.map +1 -0
- package/dist/data-provider-interface/composables/useDpiEditMode.d.ts +16 -0
- package/dist/data-provider-interface/composables/useDpiEditMode.mjs +39 -0
- package/dist/data-provider-interface/composables/useDpiEditMode.mjs.map +1 -0
- package/dist/data-provider-interface/config/dpi-spec-config.mjs +1 -0
- package/dist/data-provider-interface/config/dpi-spec-config.mjs.map +1 -1
- package/dist/data-provider-interface/index.d.ts +2 -0
- package/dist/data-provider-interface/index.mjs +11 -0
- package/dist/data-provider-interface/index.mjs.map +1 -0
- package/dist/data-provider-interface/store/dpiStore.d.ts +31 -15
- package/dist/data-provider-interface/store/dpiStore.mjs +30 -13
- package/dist/data-provider-interface/store/dpiStore.mjs.map +1 -1
- package/dist/data-provider-interface/store/modules/autocompleteStore.d.ts +3 -1
- package/dist/data-provider-interface/store/modules/autocompleteStore.mjs +28 -29
- package/dist/data-provider-interface/store/modules/autocompleteStore.mjs.map +1 -1
- package/dist/data-provider-interface/store/modules/conversionStore.d.ts +6 -6
- package/dist/data-provider-interface/store/modules/conversionStore.mjs +21 -22
- package/dist/data-provider-interface/store/modules/conversionStore.mjs.map +1 -1
- package/dist/data-provider-interface/store/modules/formSchemaStore.d.ts +5 -3
- package/dist/data-provider-interface/store/modules/formSchemaStore.mjs +29 -29
- package/dist/data-provider-interface/store/modules/formSchemaStore.mjs.map +1 -1
- package/dist/data-provider-interface/store/modules/navigationStore.d.ts +1 -1
- package/dist/data-provider-interface/store/modules/navigationStore.mjs +13 -14
- package/dist/data-provider-interface/store/modules/navigationStore.mjs.map +1 -1
- package/dist/data-provider-interface/utils/RDFconverter.mjs +63 -60
- package/dist/data-provider-interface/utils/RDFconverter.mjs.map +1 -1
- package/dist/data-provider-interface/views/DraftsPage.vue.d.ts +1 -1
- package/dist/data-provider-interface/views/InputPage.vue.d.ts +3 -3
- package/dist/data-provider-interface/views/OverviewPage/Properties/URIProp.vue.mjs +1 -1
- package/dist/data-provider-interface/views/OverviewPage.vue.d.ts +1 -1
- package/dist/datasetDetails/DatasetDetails.vue.d.ts +1 -1
- package/dist/datasetDetails/DatasetDetailsDescription.vue.d.ts +1 -1
- package/dist/datasetDetails/distributions/DistributionFormat.vue.d.ts +3 -3
- package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.d.ts +2 -2
- package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.d.ts +3 -3
- package/dist/datasetDetails/header/DatasetDetailsHeaderTitle.vue.d.ts +1 -1
- package/dist/datasetDetails/navigation/DatasetDetailsNavigation.vue.d.ts +1 -1
- package/dist/datasetDetails/navigation/DatasetDetailsNavigationLinks.vue.d.ts +1 -1
- package/dist/embed/EmbedDataset.vue.d.ts +1 -1
- package/dist/embed/EmbedDatasetSnippet.vue.d.ts +2 -2
- package/dist/external/@vueuse/core/index +129 -80
- package/dist/external/@vueuse/core/index.map +1 -1
- package/dist/external/@vueuse/shared/index +121 -17
- package/dist/external/@vueuse/shared/index.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +250 -248
- package/dist/index.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/package.json +1 -1
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import a from "n3";
|
|
2
2
|
import { isEmpty as f, has as D } from "lodash-es";
|
|
3
|
-
import
|
|
3
|
+
import "../config/dcatapdeODB/page-content-config.mjs";
|
|
4
|
+
import "../config/dcatapdeODB/input-definition.mjs";
|
|
5
|
+
import "../config/dcatapdeODB/prefixes.mjs";
|
|
6
|
+
import "../config/dcatapdeODB/format-types.mjs";
|
|
7
|
+
import "../config/dcatapdeODB/vocab-prefixes.mjs";
|
|
4
8
|
import l from "./general-helper.mjs";
|
|
5
|
-
function
|
|
6
|
-
let d,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (Q(n, r[o], o, "", "", !0, i, u), o === "datasets")
|
|
9
|
+
function g(r, o, t) {
|
|
10
|
+
let d, i = t;
|
|
11
|
+
const u = new a.Writer({ prefixes: i.prefixes, format: "N-Triples" }), n = `https://piveau.eu/set/data/${r.datasets.datasetID}`;
|
|
12
|
+
if (Q(u, r[o], o, "", "", !0, n, i), o === "datasets")
|
|
10
13
|
for (let c = 0; c < r.distributions.length; c += 1)
|
|
11
|
-
Q(
|
|
12
|
-
return
|
|
14
|
+
Q(u, r.distributions[c], "distributions", "", "", !0, n, i);
|
|
15
|
+
return u.end((c, N) => d = N), d;
|
|
13
16
|
}
|
|
14
|
-
function Q(r, o, t, d, u, n,
|
|
17
|
+
function Q(r, o, t, d, i, u, n, c) {
|
|
15
18
|
const N = c.formatTypes;
|
|
16
19
|
let y, v;
|
|
17
|
-
if (
|
|
20
|
+
if (u) {
|
|
18
21
|
if (t === "datasets")
|
|
19
|
-
v = l.addNamespace("dcat:Dataset", c), y = a.DataFactory.namedNode(
|
|
22
|
+
v = l.addNamespace("dcat:Dataset", c), y = a.DataFactory.namedNode(n);
|
|
20
23
|
else if (t === "catalogues")
|
|
21
24
|
v = l.addNamespace("dcat:Catalog", c), y = a.DataFactory.namedNode(`https://piveau.eu/set/data/${o.datasetID}`);
|
|
22
25
|
else {
|
|
@@ -24,23 +27,23 @@ function Q(r, o, t, d, u, n, i, c) {
|
|
|
24
27
|
const q = l.makeId(10);
|
|
25
28
|
y = a.DataFactory.namedNode(`https://piveau.eu/set/data/${q}`);
|
|
26
29
|
}
|
|
27
|
-
|
|
30
|
+
H(r, o, y, v, t, n, c);
|
|
28
31
|
} else
|
|
29
|
-
y = d, v =
|
|
32
|
+
y = d, v = i;
|
|
30
33
|
const T = Object.keys(o);
|
|
31
34
|
for (let q = 0; q < T.length; q += 1) {
|
|
32
35
|
const e = T[q];
|
|
33
36
|
if (l.propertyHasValue(o[e]))
|
|
34
37
|
if (N.singularString[t].includes(e))
|
|
35
|
-
|
|
38
|
+
A(r, y, o, e, c);
|
|
36
39
|
else if (N.singularURI[t].includes(e))
|
|
37
|
-
|
|
40
|
+
P(r, y, o, e, c);
|
|
38
41
|
else if (N.multipleURI[t].includes(e))
|
|
39
|
-
|
|
42
|
+
U(r, y, o, e, t, c);
|
|
40
43
|
else if (N.typedStrings[t].includes(e))
|
|
41
|
-
|
|
44
|
+
Y(r, y, o, e, c);
|
|
42
45
|
else if (N.multilingualStrings[t].includes(e))
|
|
43
|
-
|
|
46
|
+
j(r, y, o, e, c);
|
|
44
47
|
else if (N.groupedProperties[t].includes(e)) {
|
|
45
48
|
let s;
|
|
46
49
|
e === "vcard:hasAddress" || e === "dct:creator" || e === "skos:notation" || e === "spdx:checksum" ? s = [o[e]] : s = o[e];
|
|
@@ -65,9 +68,9 @@ function Q(r, o, t, d, u, n, i, c) {
|
|
|
65
68
|
(e === "foaf:page" || e === "adms:identifier" || e === "dct:conformsTo") && D(m, "@id") && (p = a.DataFactory.namedNode(m["@id"]));
|
|
66
69
|
let b = !1;
|
|
67
70
|
if (e === "foaf:page") {
|
|
68
|
-
const
|
|
71
|
+
const V = D(m, "dct:title"), $ = D(m, "dct:description");
|
|
69
72
|
let I = !0, S = !0, x = !0, M = !0;
|
|
70
|
-
|
|
73
|
+
V && (I = !m["dct:title"].every((h) => D(h, "@value")), S = m["dct:title"].every((h) => f(h["@value"]))), $ && (x = !m["dct:description"].every((h) => D(h, "@value")), M = m["dct:description"].every((h) => f(h["@value"]))), (I || S) && (x || M) && (b = !0);
|
|
71
74
|
}
|
|
72
75
|
b || (p || (p = a.DataFactory.blankNode("")), r.addQuad(a.DataFactory.quad(
|
|
73
76
|
y,
|
|
@@ -83,7 +86,7 @@ function Q(r, o, t, d, u, n, i, c) {
|
|
|
83
86
|
} else if (N.conditionalProperties[t].includes(e)) {
|
|
84
87
|
if (e === "dct:publisher" || e === "dct:license")
|
|
85
88
|
if (D(o[e], "resource"))
|
|
86
|
-
|
|
89
|
+
P(r, y, o, e, c);
|
|
87
90
|
else {
|
|
88
91
|
const s = a.DataFactory.blankNode("");
|
|
89
92
|
D(N.additionalPropertyTypes, e) && r.addQuad(a.DataFactory.quad(
|
|
@@ -137,100 +140,100 @@ function Q(r, o, t, d, u, n, i, c) {
|
|
|
137
140
|
));
|
|
138
141
|
}
|
|
139
142
|
}
|
|
140
|
-
function
|
|
143
|
+
function H(r, o, t, d, i, u, n) {
|
|
141
144
|
r.addQuad(a.DataFactory.quad(
|
|
142
145
|
t,
|
|
143
|
-
a.DataFactory.namedNode(l.addNamespace("rdf:type",
|
|
146
|
+
a.DataFactory.namedNode(l.addNamespace("rdf:type", n)),
|
|
144
147
|
a.DataFactory.namedNode(d)
|
|
145
|
-
)),
|
|
148
|
+
)), i === "datasets" && r.addQuad(a.DataFactory.quad(
|
|
146
149
|
t,
|
|
147
|
-
a.DataFactory.namedNode(l.addNamespace("dcat:catalog",
|
|
150
|
+
a.DataFactory.namedNode(l.addNamespace("dcat:catalog", n)),
|
|
148
151
|
// no actual vocabulary
|
|
149
152
|
a.DataFactory.literal(o["dcat:catalog"])
|
|
150
153
|
// hould never be empty because of frontend checking
|
|
151
|
-
)),
|
|
154
|
+
)), i === "catalogues" && r.addQuad(a.DataFactory.quad(
|
|
152
155
|
t,
|
|
153
|
-
a.DataFactory.namedNode(l.addNamespace("dct:type",
|
|
156
|
+
a.DataFactory.namedNode(l.addNamespace("dct:type", n)),
|
|
154
157
|
a.DataFactory.literal("dcat-ap")
|
|
155
|
-
)),
|
|
156
|
-
a.DataFactory.namedNode(
|
|
157
|
-
a.DataFactory.namedNode(l.addNamespace("dcat:distribution",
|
|
158
|
+
)), i === "distributions" && r.addQuad(a.DataFactory.quad(
|
|
159
|
+
a.DataFactory.namedNode(u),
|
|
160
|
+
a.DataFactory.namedNode(l.addNamespace("dcat:distribution", n)),
|
|
158
161
|
t
|
|
159
162
|
));
|
|
160
163
|
}
|
|
161
|
-
function
|
|
164
|
+
function A(r, o, t, d, i) {
|
|
162
165
|
f(t[d]) || r.addQuad(a.DataFactory.quad(
|
|
163
166
|
o,
|
|
164
|
-
a.DataFactory.namedNode(l.addNamespace(d,
|
|
167
|
+
a.DataFactory.namedNode(l.addNamespace(d, i)),
|
|
165
168
|
a.DataFactory.literal(t[d])
|
|
166
169
|
));
|
|
167
170
|
}
|
|
168
|
-
function
|
|
171
|
+
function P(r, o, t, d, i) {
|
|
169
172
|
if (!f(t[d])) {
|
|
170
|
-
let
|
|
171
|
-
typeof t[d] == "object" ? D(t[d], "resource") && (
|
|
173
|
+
let u;
|
|
174
|
+
typeof t[d] == "object" ? D(t[d], "resource") && (u = t[d].resource) : t[d].includes("@") ? u = `mailto:${t[d]}` : u = t[d], r.addQuad(a.DataFactory.quad(
|
|
172
175
|
o,
|
|
173
|
-
a.DataFactory.namedNode(l.addNamespace(d,
|
|
174
|
-
a.DataFactory.namedNode(
|
|
176
|
+
a.DataFactory.namedNode(l.addNamespace(d, i)),
|
|
177
|
+
a.DataFactory.namedNode(u)
|
|
175
178
|
));
|
|
176
179
|
}
|
|
177
180
|
}
|
|
178
|
-
function
|
|
179
|
-
for (let
|
|
181
|
+
function U(r, o, t, d, i, u) {
|
|
182
|
+
for (let n = 0; n < t[d].length; n += 1) {
|
|
180
183
|
let c;
|
|
181
|
-
const N = t[d][
|
|
184
|
+
const N = t[d][n];
|
|
182
185
|
f(N) || (D(N, "resource") ? c = N.resource : D(N, "@id") && (c = N["@id"])), r.addQuad(a.DataFactory.quad(
|
|
183
186
|
o,
|
|
184
|
-
a.DataFactory.namedNode(l.addNamespace(d,
|
|
187
|
+
a.DataFactory.namedNode(l.addNamespace(d, u)),
|
|
185
188
|
a.DataFactory.namedNode(c)
|
|
186
189
|
));
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
|
-
function
|
|
192
|
+
function Y(r, o, t, d, i) {
|
|
190
193
|
if (!f(t[d]))
|
|
191
194
|
if (d === "dct:issued" || d === "dct:modified") {
|
|
192
195
|
if (D(t[d], "@value") && !f(t[d]["@value"])) {
|
|
193
|
-
const
|
|
196
|
+
const u = t[d]["@type"] === "date" ? t[d]["@type"] : "dateTime", n = l.addNamespace(`xsd:${u}`, i);
|
|
194
197
|
r.addQuad(a.DataFactory.quad(
|
|
195
198
|
o,
|
|
196
|
-
a.DataFactory.namedNode(l.addNamespace(d,
|
|
197
|
-
a.DataFactory.literal(t[d]["@value"], a.DataFactory.namedNode(
|
|
199
|
+
a.DataFactory.namedNode(l.addNamespace(d, i)),
|
|
200
|
+
a.DataFactory.literal(t[d]["@value"], a.DataFactory.namedNode(n))
|
|
198
201
|
));
|
|
199
202
|
}
|
|
200
203
|
} else {
|
|
201
|
-
let
|
|
202
|
-
d === "dcat:endDate" || d === "dcat:startDate" ?
|
|
204
|
+
let u;
|
|
205
|
+
d === "dcat:endDate" || d === "dcat:startDate" ? u = l.addNamespace("xsd:dateTime", i) : (d === "dcat:spatialResolutionInMeters" || d === "dcat:byteSize") && (u = l.addNamespace("xsd:decimal", i)), r.addQuad(a.DataFactory.quad(
|
|
203
206
|
o,
|
|
204
|
-
a.DataFactory.namedNode(l.addNamespace(d,
|
|
205
|
-
a.DataFactory.literal(t[d], a.DataFactory.namedNode(
|
|
207
|
+
a.DataFactory.namedNode(l.addNamespace(d, i)),
|
|
208
|
+
a.DataFactory.literal(t[d], a.DataFactory.namedNode(u))
|
|
206
209
|
));
|
|
207
210
|
}
|
|
208
211
|
}
|
|
209
|
-
function
|
|
212
|
+
function j(r, o, t, d, i) {
|
|
210
213
|
if (!f(t[d]))
|
|
211
214
|
if (!Array.isArray(t[d]))
|
|
212
215
|
r.addQuad(a.DataFactory.quad(
|
|
213
216
|
o,
|
|
214
|
-
a.DataFactory.namedNode(l.addNamespace(d,
|
|
217
|
+
a.DataFactory.namedNode(l.addNamespace(d, i)),
|
|
215
218
|
a.DataFactory.literal(t[d])
|
|
216
219
|
));
|
|
217
220
|
else
|
|
218
|
-
for (let
|
|
219
|
-
const
|
|
220
|
-
if (!f(
|
|
221
|
+
for (let u = 0; u < t[d].length; u += 1) {
|
|
222
|
+
const n = t[d][u];
|
|
223
|
+
if (!f(n) && D(n, "@value") && !f(n["@value"])) {
|
|
221
224
|
let c;
|
|
222
|
-
!D(
|
|
225
|
+
!D(n, "@language") || f(n, "@language") ? c = "en" : c = n["@language"], r.addQuad(a.DataFactory.quad(
|
|
223
226
|
o,
|
|
224
|
-
a.DataFactory.namedNode(l.addNamespace(d,
|
|
225
|
-
a.DataFactory.literal(
|
|
227
|
+
a.DataFactory.namedNode(l.addNamespace(d, i)),
|
|
228
|
+
a.DataFactory.literal(n["@value"], c)
|
|
226
229
|
));
|
|
227
230
|
}
|
|
228
231
|
}
|
|
229
232
|
}
|
|
230
|
-
const
|
|
231
|
-
convertToRDF:
|
|
233
|
+
const J = {
|
|
234
|
+
convertToRDF: g
|
|
232
235
|
};
|
|
233
236
|
export {
|
|
234
|
-
|
|
237
|
+
J as default
|
|
235
238
|
};
|
|
236
239
|
//# sourceMappingURL=RDFconverter.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RDFconverter.mjs","sources":["../../../lib/data-provider-interface/utils/RDFconverter.js"],"sourcesContent":["import N3 from 'n3';\nimport { isEmpty } from 'lodash';\nimport { has } from 'lodash';\n\nimport generalDpiConfig from '../config/dpi-spec-config';\n\nimport generalHelper from './general-helper';\n\n/**\n * Converts all properties for given data from form input data into RDF (N-Triples)\n * @param {Object} data Data given within an object. Data stored as follows { datasets: {...}, distributions: [{...},...], catalogues: {...}} \n * @param {String} property Name of property which should be converted (either 'datasets' or 'catalogues')\n * @returns String of converted data in RDF format (N-Triples)\n */\nfunction convertToRDF(data, property, specification) {\n\n let finishedRDFdata;\n\n let dpiConfig;\n if (specification === undefined) {\n dpiConfig = generalDpiConfig[\"dcatap\"]\n } else dpiConfig = generalDpiConfig[specification];\n\n // writer for adding data as quads\n const RDFdata = new N3.Writer({ prefixes: dpiConfig.prefixes, format: 'N-Triples' });\n // datasetURI also needed for distribution creation (add distributionURI to dataset (dcat:distribution))\n const datasetURI = `https://piveau.eu/set/data/${data.datasets.datasetID}`;\n\n // convert values for datasets/catalogues\n convertPropertyValues(RDFdata, data[property], property, '', '', true, datasetURI, dpiConfig); // datasets and catalogues\n\n // include distribution data into same graph\n // differentiation neccessary because datasets also include distributions\n if (property === 'datasets') {\n // multiple distributions possible -> [{data of distribution 1}, {data of distribution 2}, ...]\n for (let index = 0; index < data.distributions.length; index += 1) {\n convertPropertyValues(RDFdata, data.distributions[index], 'distributions', '', '', true, datasetURI, dpiConfig);\n }\n }\n\n RDFdata.end((error, result) => finishedRDFdata = result);\n return finishedRDFdata;\n}\n\n/**\n * Converts each single value of given form data based on type into RDF\n * @param {N3.Writer} RDFdataset Dataset the converted RDF data should be added to\n * @param {Object} data Object containing data as key-value pairs\n * @param {String} property String determining which property is handled (datasets/distributions/catalogues)\n * @param {DataFactory} preMainURI (can be undefined) Could be a namedNode or BlankNode containing an URI\n * @param {DataFactory} preMainType (can be undefined) NamedNode determining the type of the current property (e.g. dcat:Dataset (as object))\n * @param {Boolean} setMain Value determining if additional values should be set (type, id, sample...)\n * @param {String} datasetURI URI of dataset for use in distribution conversion \n */\nfunction convertPropertyValues(RDFdataset, data, property, preMainURI, preMainType, setMain, datasetURI, dpiConfig) {\n\n const formatTypes = dpiConfig.formatTypes;\n\n // method can be called recursively for nested properties\n // need to access id of parent node for later use as subject -> provide via method parameters (preMainURI & preMainType)\n let mainURI;\n let mainType;\n\n // parent method can be called recursively for nested values\n // if called on non-nested values a overall id and type muste be set (setMain -> true)\n if (setMain) {\n if (property === 'datasets') {\n mainType = generalHelper.addNamespace('dcat:Dataset', dpiConfig);\n mainURI = N3.DataFactory.namedNode(datasetURI); // datasetID should never be empty because of frontend checking\n } else if (property === 'catalogues') {\n mainType = generalHelper.addNamespace('dcat:Catalog', dpiConfig);\n mainURI = N3.DataFactory.namedNode(`https://piveau.eu/set/data/${data.datasetID}`); // datasetID should never be empty because of frontend checking\n } else {\n mainType = generalHelper.addNamespace('dcat:Distribution', dpiConfig);\n const randomId = generalHelper.makeId(10);\n // distribution id can be random, will be overwritten by backend on saving data\n mainURI = N3.DataFactory.namedNode(`https://piveau.eu/set/data/${randomId}`);\n }\n\n // parent method can be called recursively to convert nested values\n // but setting the overal type and id of a dataset/catalogue is only required once at the beginning\n // -> only set additional properties when setMain === true\n setAdditionalProperties(RDFdataset, data, mainURI, mainType, property, datasetURI, dpiConfig);\n } else {\n // called on nested properties with already given URI and type which should used in the following conversion process\n mainURI = preMainURI;\n mainType = preMainType;\n }\n\n // distributions may have download URLs, if no downloadURL is provided -> provided accessUrls will be also set as downloadUrls\n // accessUrl is a required property and therefore always provided (made sure by the frontend)\n // const downloadUrlsProvided = has(data, 'dcat:downloadURL') && !isEmpty(data['dcat:downloadURL']) && data['dcat:downloadURL'].map(el => !isEmpty(el['@id'])).reduce((a, b) => b);\n\n // loop trough all keys within data object and convert values (or nested values) to RDF\n const valueKeys = Object.keys(data);\n for (let index = 0; index < valueKeys.length; index += 1) {\n const key = valueKeys[index]; // key format: either a normal name for special properties (e.g. datasetID) or namespaced keys (e.g. dct:title)\n\n if(generalHelper.propertyHasValue(data[key])) {\n // all properties are sorted by their format (see .../data-provider-interface/config/format-types.js)\n // depending on the format the corresponding conversion-method is used, writing the result to the overall RDF-writer\n if (formatTypes.singularString[property].includes(key)) {\n convertSingularString(RDFdataset, mainURI, data, key, dpiConfig);\n } else if (formatTypes.singularURI[property].includes(key)) {\n convertSingularURI(RDFdataset, mainURI, data, key, dpiConfig);\n } else if (formatTypes.multipleURI[property].includes(key)) {\n // if no dowloadURL is provided, set accessUrls as downloadUrls\n // if (!downloadUrlsProvided && key === 'dcat:accessURL') {\n // // copy accessurl array to donwloadurl array and convert data\n\n // data['dcat:downloadURL'] = cloneDeep(data['dcat:accessURL']);\n // convertMultipleURI(RDFdataset, mainURI, data, 'dcat:downloadURL', property, dpiConfig);\n // }\n\n convertMultipleURI(RDFdataset, mainURI, data, key, property, dpiConfig);\n } else if (formatTypes.typedStrings[property].includes(key)) {\n convertTypedString(RDFdataset, mainURI, data, key, dpiConfig);\n } else if (formatTypes.multilingualStrings[property].includes(key)) {\n convertMultilingual(RDFdataset, mainURI, data, key, dpiConfig);\n } else if (formatTypes.groupedProperties[property].includes(key)) {\n\n // grouped properties are properties provided by the form which consist of multiple properties (e.g contactPoint)\n // the properties values are stored within an object located within an array\n // for repeatable properties there are multiple objects in this array, otherwise there is just one\n \n let actualData;\n // vcard:hasAdress is an object as well as dct:creator and skos:notation\n if (key === 'vcard:hasAddress' || key === 'dct:creator' || key === 'skos:notation' || key === 'spdx:checksum' ) actualData = [data[key]];\n else actualData = data[key];\n\n // looping trough all existing objects within the array\n for (let groupId = 0; groupId < actualData.length; groupId += 1) {\n let currentGroupData = actualData[groupId];\n\n if (!isEmpty(currentGroupData)) {\n if (key === 'skos:notation') {\n // property skos:notation work a little bit different then other properties\n // the form provides a value and a type from two seperated fields ({'@value': '...', '@type': '...'})\n // the resulting RDF should merge these values into a typed literal (value^^type)\n if (has(currentGroupData, '@value') && !isEmpty(currentGroupData['@value'])) {\n let notationValue;\n\n // if a type is given, use to form typed literal\n // if no type is given, only use value to create literal\n if (has(currentGroupData, '@type') && !isEmpty(currentGroupData['@type'])) { // typed literal\n notationValue = N3.DataFactory.literal(currentGroupData['@value'], N3.DataFactory.namedNode(currentGroupData['@type'].resource));\n } else { // literal\n notationValue = N3.DataFactory.literal(currentGroupData['@value']);\n }\n\n // add type for adms:identifier\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdf:type', dpiConfig)),\n N3.DataFactory.namedNode(generalHelper.addNamespace('adms:Identifier', dpiConfig))\n ))\n\n // save quadruple with typed or untyped literal\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n notationValue\n ))\n\n // resulting rdf quads should look like this:\n // datasetId adms:identifier admsIdentifierUtl\n // admsIdentifierUrl rdf:type adms:Identifier\n // admsIdentifierUrl skos:notation value^^type\n }\n } else {\n let groupBlankNode;\n\n // because grouped properties have a list of nested properties we need an initial quadruple stating the parent property\n // using a blank node as object which later serves as subject for the nested properties\n // RDF example:\n // datasetID dct:contactPoint blankNodeId\n // blankNodeId foaf:mbox email@exmaple.com\n // blankNodeId fn:name InsitutionName ...\n\n // some form fields provide an URL which should serves as namedNode for other nested values (e.g. conformsTo)\n // RDF example:\n // datasetID dct:conformsTo conformsToURI\n // conformsToURI dct:title conformsTitle\n if ((key === 'foaf:page' || key === 'adms:identifier' || key === 'dct:conformsTo') && has(currentGroupData, '@id')) {\n groupBlankNode = N3.DataFactory.namedNode(currentGroupData['@id']);\n }\n // all properties that don't provide an URL serving as namedNode for nested values need to define a blank node\n\n // page gets type but also has multilingual fields with preseleted langauge\n // don't create blank node if there is not data for page beside the preselected language\n let emptyPage = false;\n\n if (key === 'foaf:page') {\n\n // if page has title and/or description property given, check if there are values given \n const hasTitle = has(currentGroupData, 'dct:title');\n const hasDescription = has(currentGroupData, 'dct:description');\n\n let hasNoValueKeysTitle = true;\n let hasEmptyValueTitle = true;\n let hasNoValueKeysDescription = true;\n let hasEmptyValueDescription = true;\n\n if (hasTitle) {\n hasNoValueKeysTitle = !currentGroupData['dct:title'].every(el => has(el, '@value'));\n hasEmptyValueTitle = currentGroupData['dct:title'].every(el => isEmpty(el['@value']));\n }\n\n if (hasDescription) {\n hasNoValueKeysDescription = !currentGroupData['dct:description'].every(el => has(el, '@value'));\n hasEmptyValueDescription = currentGroupData['dct:description'].every(el => isEmpty(el['@value']));\n }\n\n // page should be handled as empty if:\n // no title and/or no description given\n // if properties given: no value given or value empty\n if ((hasNoValueKeysTitle || hasEmptyValueTitle) && (hasNoValueKeysDescription || hasEmptyValueDescription)) emptyPage = true;\n }\n\n if (!emptyPage) {\n if (!groupBlankNode) groupBlankNode = N3.DataFactory.blankNode('');\n\n // save inital quadruple using the named or blank node as object\n // e.g. datasetId dct:contactPoint blankNode/namedNode\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n groupBlankNode\n ))\n\n // some properties provide additional types\n if (has(formatTypes.additionalPropertyTypes, key)) {\n RDFdataset.addQuad(N3.DataFactory.quad(\n groupBlankNode,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdf:type', dpiConfig)),\n N3.DataFactory.namedNode(generalHelper.addNamespace(formatTypes.additionalPropertyTypes[key], dpiConfig))\n ))\n }\n\n // temporal values nested inside another object: \"dct:temporal\": [{ \"dct:temporal\": { \"dcat:startDate\": \"...\", \"dcat:endDate\": \"...\" } }] \n if (key === 'dct:temporal') {\n if (has(currentGroupData, 'dct:temporal')) {\n currentGroupData = currentGroupData['dct:temporal'];\n }\n }\n\n // convert all nested values provided by form\n convertPropertyValues(RDFdataset, currentGroupData, property, groupBlankNode, mainType, false, dpiConfig, dpiConfig);\n }\n }\n }\n }\n } else if (formatTypes.conditionalProperties[property].includes(key)) {\n // publisher either is an URI or a group with multiple values (name, homepage, email)\n // license either is an URI or a group with multiple values ()\n if (key === 'dct:publisher' || key === 'dct:license') {\n\n // data contains either {resource: '...', name: '...'} or object containing other keys\n if (has(data[key], 'resource')) {\n convertSingularURI(RDFdataset, mainURI, data, key, dpiConfig);\n } else {\n const groupBlankNode = N3.DataFactory.blankNode('');\n\n // some properties provide additional types\n if (has(formatTypes.additionalPropertyTypes, key)) {\n RDFdataset.addQuad(N3.DataFactory.quad(\n groupBlankNode,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdf:type', dpiConfig)),\n N3.DataFactory.namedNode(generalHelper.addNamespace(formatTypes.additionalPropertyTypes[key], dpiConfig))\n ))\n }\n\n // save inital quadruple using the named or blank node as object\n // e.g. datasetId dct:contactPoint blankNode/namedNode\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n groupBlankNode\n ))\n\n convertPropertyValues(RDFdataset, data[key], property, groupBlankNode, mainType, false, dpiConfig, dpiConfig);\n }\n \n\n }\n } else if (key === 'dcat:temporalResolution') {\n // temporal resolution is displayed as group of input forms for each property (year, month, day, ...)\n // the form provides the data as following: [ { 'Year': '...', 'Month': '...', ... } ]\n // the final format of this property should look like this: P?Y?M?DT?H?M?S\n // not all values must be filled and therefore be present -> default behavior if not given: value = 0\n\n const resolutionValues = data[key];\n const valueString = `P${resolutionValues.Year ? resolutionValues.Year : 0}Y${resolutionValues.Month ? resolutionValues.Month : 0}M${resolutionValues.Day ? resolutionValues.Day : 0}DT${resolutionValues.Hour ? resolutionValues.Hour : 0}H${resolutionValues.Minute ? resolutionValues.Minute : 0}M${resolutionValues.Second ? resolutionValues.Second : 0}S`;\n\n // frontend always provides temporalResolution even if there is no value resulting in P0Y0M0DT0H0M0S\n // don't save if value is equal to P0Y0M0DT0H0M0S\n if (valueString !== \"P0Y0M0DT0H0M0S\") {\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(valueString, N3.DataFactory.namedNode(generalHelper.addNamespace('xsd:duration', dpiConfig)))\n ))\n }\n } else if (key === 'dct:identifier') {\n // form provides data as array of objects with strings: [ { '@value': 'string1' }, { '@value': 'string2' }, ... ]\n // create quadruple for each given object in the array\n for (let valueId = 0; valueId < data[key].length; valueId += 1) {\n const currentValue = data[key][valueId];\n if (has(currentValue, '@value') && !isEmpty(currentValue['@value'])) {\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(currentValue['@value'])\n ))\n }\n }\n } else if (key === 'dct:rights') {\n // rights has a static type (RightsStatement) which needs to be added to linked data as additional node\n // therefore we need to create an initial quadruple for with 'rights' being the predicate having a blank node\n // blank node serves as subject for the following quadruples which contain the type and actual value of the form field\n // RDF:\n // datasetID dct:rights blankNodeID\n // blankNodeId rdf:type RightsStatement\n // blankNodeId rdfs:label LabelValue\n\n // blank node as object for inital quadruple and also as subject for following quadruples\n const rightsBlankNode = N3.DataFactory.blankNode('');\n\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n rightsBlankNode\n ))\n\n // add additional type declaration\n RDFdataset.addQuad(N3.DataFactory.quad(\n rightsBlankNode,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdf:type', dpiConfig)),\n N3.DataFactory.namedNode(generalHelper.addNamespace('dct:RightsStatement', dpiConfig))\n ))\n\n // rights is a conditional property and provides either an URI or a string ( { rdfs:label : 'URL/string' } )\n let rightsValue;\n\n if (data[key]['@type'] === 'url') {\n rightsValue = N3.DataFactory.namedNode(data[key]['rdfs:label']);\n } else {\n rightsValue = N3.DataFactory.literal(data[key]['rdfs:label']);\n }\n\n // add actual value\n RDFdataset.addQuad(N3.DataFactory.quad(\n rightsBlankNode,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdfs:label', dpiConfig)),\n rightsValue\n ))\n \n } else if (key === 'rdf:type') {\n // some properties have additional type information which needs to be added to graph\n // e.g contactPoint -> vcard:Individual\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdf:type', dpiConfig)),\n N3.DataFactory.namedNode(generalHelper.addNamespace(data[key], dpiConfig))\n ))\n }\n } \n }\n}\n\n/**\n * Creates additional quads depending on given property and saves them to given RDF dataset\n * @param {N3.Writer} RDFdataset RDF dataset the quads are saved to\n * @param {Object} data Object containing data as key-value pairs\n * @param {DataFactory.namedNode} mainURI NamedNode defining URI of current property graph\n * @param {DataFactory} mainType NamedNode defining type of current property graph\n * @param {String} property String determining which property is converted (datasets/distributions/catalogues)\n * @param {String} datasetURI URI of dataset used to add distribution URI to dct:distribution within dataset graph\n */\nfunction setAdditionalProperties(RDFdataset, data, mainURI, mainType, property, datasetURI, dpiConfig) {\n\n // adding id and type of property\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdf:type', dpiConfig)),\n N3.DataFactory.namedNode(mainType)\n ))\n\n // adding sample and catalog for datasets\n if (property === 'datasets') {\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace('dcat:catalog', dpiConfig)), // no actual vocabulary\n N3.DataFactory.literal(data['dcat:catalog']) // hould never be empty because of frontend checking\n ))\n }\n\n // catalogues always have to contain the property dct:type with the value 'dcat-ap'\n if (property === 'catalogues') {\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace('dct:type', dpiConfig)),\n N3.DataFactory.literal('dcat-ap')\n ))\n }\n\n // add distribution id to dataset graph (dcat:distribution)\n if (property === 'distributions') {\n RDFdataset.addQuad(N3.DataFactory.quad(\n N3.DataFactory.namedNode(datasetURI),\n N3.DataFactory.namedNode(generalHelper.addNamespace('dcat:distribution', dpiConfig)),\n mainURI\n ))\n }\n}\n\n//-----------------------------------------------------------------------------------------------------\n// basic conversion (input to RDF) methods for different categories of data\n//-----------------------------------------------------------------------------------------------------\n// seems unnecessary at first but if we want to convert nested properties as well, we need these \n// methods (especially to provide the correct parent URI)\n\n/**\n * Converts provided data to quad and saves it to given dataset\n * @param {N3.Writer} RDFdataset Dataset the converter saves the converted data to\n * @param {DataFactory} id Node (Blank or Named) used as subject in quad\n * @param {String} data Data given by form used as object in quad\n * @param {String} key Name of current value (e.g. dct:title) used as predicate in quad\n */\nfunction convertSingularString(RDFdataset, id, data, key, dpiConfig) {\n if (!isEmpty(data[key])) {\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(data[key])\n ))\n }\n}\n\n/**\n * Converts provided data to quad and saves it to given dataset\n * @param {N3.Writer} RDFdata Dataset the converter saves the converted data to\n * @param {DataFactory} id Node (Blank or Named) used as subject in quad\n * @param {String} data Data given by form used as object in quad\n * @param {String} key Name of current value (e.g. dct:title) used as predicate in quad\n */\nfunction convertSingularURI(RDFdataset, id, data, key, dpiConfig) {\n // there are two different formats the frontend delivers URIs\n // 1: 'URI' or 2: {'name': 'abc', 'resource': 'URI'}\n\n // URIs can either be a normal URL or an email address\n // mail addresses typicall include '@' which is used to determine if the given string is a normal URL or an email address\n if (!isEmpty(data[key])) {\n\n let singleURI;\n\n if (typeof data[key] === 'object') {\n if (has(data[key], 'resource')) {\n singleURI = data[key].resource;\n }\n } else {\n if (data[key].includes('@')) {\n // mail address\n singleURI = `mailto:${data[key]}`;\n } else {\n // normal URL\n singleURI = data[key];\n }\n }\n\n // save quad to dataset\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.namedNode(singleURI)\n ));\n }\n}\n\n/**\n * Converts provided data to quads and saves them to given dataset\n * @param {N3.Writer} RDFdataset Dataset the converter saves the converted data to\n * @param {DataFactory} id Node (Blank or Named) used as subject in quads\n * @param {Array} data Array containing URLs used as object within quads\n * @param {String} key Name of current value (e.g. dct:title) used as predicate in quads\n * @param {String} property Determining which property is concerted (datasets/distributions/catalogues)\n */\nfunction convertMultipleURI(RDFdataset, id, data, key, property, dpiConfig) {\n // there are two different formats the frontend delivers multiple URIs\n // 1: [ {\"name\": '...', \"resource\": 'URI'}, {...} ] -> multi-autocomplete fields\n // 2: [ { \"@id\": \"URI1\" }, { \"@id\": \"URI2\" } ] repeatable fields\n\n for (let uriIndex = 0; uriIndex < data[key].length; uriIndex += 1) {\n\n let currentURI;\n const valueObject = data[key][uriIndex];\n if (!isEmpty(valueObject)) {\n if (has(valueObject, 'resource')) currentURI = valueObject.resource;\n else if (has(valueObject, '@id')) currentURI = valueObject['@id'];\n }\n\n // save quad to dataset\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.namedNode(currentURI)\n ));\n }\n}\n\n/**\n * Converts provided data to quad and saves them to given dataset\n * @param {N3.Writer} RDFdataset Dataset the converter saves the converted data to\n * @param {DataFactory} id Node (Blank or Named) used as subject in quad\n * @param {String} data String data used as object with type in quad\n * @param {String} key Name of current value (e.g. dct:title) used as predicate in quad and to determine quad-object type\n */\nfunction convertTypedString(RDFdataset, id, data, key, dpiConfig) {\n if (!isEmpty(data[key])) {\n\n // there is a variety of properties which can have different types\n // issued and motified already provide a type definition ({'@type': 'date/datetime', '@value': '...'})\n if (key === 'dct:issued' || key === 'dct:modified') {\n if (has(data[key], '@value') && !isEmpty(data[key]['@value'])) {\n const imValueType = data[key]['@type'] === 'date' ? data[key]['@type'] : 'dateTime';\n const valueType = generalHelper.addNamespace(`xsd:${imValueType}`, dpiConfig);\n\n /// save quad to dataset\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(data[key]['@value'], N3.DataFactory.namedNode(valueType))\n ));\n }\n } else {\n // all other properties are given as a simple string\n let valueType;\n if (key === 'dcat:endDate' || key === 'dcat:startDate') {\n // dcat:endDate and dcat:startDate are xsd:dateTime\n valueType = generalHelper.addNamespace('xsd:dateTime', dpiConfig);\n } else if (key === 'dcat:spatialResolutionInMeters' || key === \"dcat:byteSize\") {\n // dcat:spatialResolutionInMeters and dcat:byteSize are xsd:decimal\n valueType = generalHelper.addNamespace('xsd:decimal', dpiConfig);\n }\n\n /// save quad to dataset\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(data[key], N3.DataFactory.namedNode(valueType))\n ));\n }\n }\n}\n\n/**\n * Converts provided data to quads and saves them to given dataset\n * @param {N3.Writer} RDFdataset Dataset the converter saves the converted data to\n * @param {DataFactory} id Node (Blank or Named) used as subject in quads\n * @param {Array} data Array of objects containing data and language converted into literal with language for quad\n * @param {String} key Name of current value (e.g. dct:title) used as predicate in quads\n */\nfunction convertMultilingual(RDFdataset, id, data, key, dpiConfig) {\n // multilingual fields mostly provide data as followed\n // [ { '@value': '....', '@language': '...' }, ... ]\n // only the licence title provides no language\n\n if (!isEmpty(data[key])) {\n\n // licence title\n if (!Array.isArray(data[key])) {\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(data[key])\n ))\n } else {\n for (let langIndex = 0; langIndex < data[key].length; langIndex += 1) {\n const currentData = data[key][langIndex];\n // only save data if a value is given (forntend provides preselected language which don't need to be saved if there is no actaul value)\n if (!isEmpty(currentData) && has(currentData, '@value') && !isEmpty(currentData['@value'])) {\n let languageTag;\n \n // if there is no langauge given, set language to english\n if (!has(currentData, '@language') || isEmpty(currentData, '@language')) {\n languageTag = 'en';\n } else {\n // if language is given, use given tag\n languageTag = currentData['@language'];\n }\n \n // saving quad to dataset\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(currentData['@value'], languageTag)\n ))\n }\n }\n }\n }\n}\n\nexport default {\n convertToRDF,\n};"],"names":["convertToRDF","data","property","specification","finishedRDFdata","dpiConfig","generalDpiConfig","RDFdata","N3","datasetURI","convertPropertyValues","index","error","result","RDFdataset","preMainURI","preMainType","setMain","formatTypes","mainURI","mainType","generalHelper","randomId","setAdditionalProperties","valueKeys","key","convertSingularString","convertSingularURI","convertMultipleURI","convertTypedString","convertMultilingual","actualData","groupId","currentGroupData","isEmpty","has","notationValue","groupBlankNode","emptyPage","hasTitle","hasDescription","hasNoValueKeysTitle","hasEmptyValueTitle","hasNoValueKeysDescription","hasEmptyValueDescription","el","resolutionValues","valueString","valueId","currentValue","rightsBlankNode","rightsValue","id","singleURI","uriIndex","currentURI","valueObject","imValueType","valueType","langIndex","currentData","languageTag","toRDF"],"mappings":";;;;AAcA,SAASA,EAAaC,GAAMC,GAAUC,GAAe;AAEjD,MAAIC,GAEAC;AACJ,EAAIF,MAAkB,SAClBE,IAAYC,EAAiB,SAC1BD,IAAYC,EAAiBH,CAAa;AAGjD,QAAMI,IAAU,IAAIC,EAAG,OAAO,EAAE,UAAUH,EAAU,UAAU,QAAQ,YAAW,CAAE,GAE7EI,IAAa,8BAA8BR,EAAK,SAAS,SAAS;AAOxE,MAJAS,EAAsBH,GAASN,EAAKC,CAAQ,GAAGA,GAAU,IAAI,IAAI,IA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1B,EAAQ0B,GAAa,WAAW,IAClEC,IAAc,OAGdA,IAAcD,EAAY,WAAW,GAIzC9C,EAAW,QAAQN,EAAG,YAAY;AAAA,YAC9B4C;AAAA,YACA5C,EAAG,YAAY,UAAUa,EAAc,aAAaI,GAAKpB,CAAS,CAAC;AAAA,YACnEG,EAAG,YAAY,QAAQoD,EAAY,QAAQ,GAAGC,CAAW;AAAA,UACjF,CAAqB;AAAA,QACJ;AAAA,MACJ;AAGb;AAEA,MAAeC,IAAA;AAAA,EACX,cAAA9D;AACJ;"}
|
|
1
|
+
{"version":3,"file":"RDFconverter.mjs","sources":["../../../lib/data-provider-interface/utils/RDFconverter.js"],"sourcesContent":["import N3 from 'n3';\nimport { isEmpty } from 'lodash';\nimport { has } from 'lodash';\n\nimport generalDpiConfig from '../config/dpi-spec-config';\n\nimport generalHelper from './general-helper';\n\n/**\n * Converts all properties for given data from form input data into RDF (N-Triples)\n * @param {Object} data Data given within an object. Data stored as follows { datasets: {...}, distributions: [{...},...], catalogues: {...}} \n * @param {String} property Name of property which should be converted (either 'datasets' or 'catalogues')\n * @returns String of converted data in RDF format (N-Triples)\n */\nfunction convertToRDF(data, property, specification) {\n\n let finishedRDFdata;\n\n let dpiConfig = specification;\n\n // writer for adding data as quads\n const RDFdata = new N3.Writer({ prefixes: dpiConfig.prefixes, format: 'N-Triples' });\n // datasetURI also needed for distribution creation (add distributionURI to dataset (dcat:distribution))\n const datasetURI = `https://piveau.eu/set/data/${data.datasets.datasetID}`;\n\n // convert values for datasets/catalogues\n convertPropertyValues(RDFdata, data[property], property, '', '', true, datasetURI, dpiConfig); // datasets and catalogues\n\n // include distribution data into same graph\n // differentiation neccessary because datasets also include distributions\n if (property === 'datasets') {\n // multiple distributions possible -> [{data of distribution 1}, {data of distribution 2}, ...]\n for (let index = 0; index < data.distributions.length; index += 1) {\n convertPropertyValues(RDFdata, data.distributions[index], 'distributions', '', '', true, datasetURI, dpiConfig);\n }\n }\n\n RDFdata.end((error, result) => finishedRDFdata = result);\n return finishedRDFdata;\n}\n\n/**\n * Converts each single value of given form data based on type into RDF\n * @param {N3.Writer} RDFdataset Dataset the converted RDF data should be added to\n * @param {Object} data Object containing data as key-value pairs\n * @param {String} property String determining which property is handled (datasets/distributions/catalogues)\n * @param {DataFactory} preMainURI (can be undefined) Could be a namedNode or BlankNode containing an URI\n * @param {DataFactory} preMainType (can be undefined) NamedNode determining the type of the current property (e.g. dcat:Dataset (as object))\n * @param {Boolean} setMain Value determining if additional values should be set (type, id, sample...)\n * @param {String} datasetURI URI of dataset for use in distribution conversion \n */\nfunction convertPropertyValues(RDFdataset, data, property, preMainURI, preMainType, setMain, datasetURI, dpiConfig) {\n\n const formatTypes = dpiConfig.formatTypes;\n\n // method can be called recursively for nested properties\n // need to access id of parent node for later use as subject -> provide via method parameters (preMainURI & preMainType)\n let mainURI;\n let mainType;\n\n // parent method can be called recursively for nested values\n // if called on non-nested values a overall id and type muste be set (setMain -> true)\n if (setMain) {\n if (property === 'datasets') {\n mainType = generalHelper.addNamespace('dcat:Dataset', dpiConfig);\n mainURI = N3.DataFactory.namedNode(datasetURI); // datasetID should never be empty because of frontend checking\n } else if (property === 'catalogues') {\n mainType = generalHelper.addNamespace('dcat:Catalog', dpiConfig);\n mainURI = N3.DataFactory.namedNode(`https://piveau.eu/set/data/${data.datasetID}`); // datasetID should never be empty because of frontend checking\n } else {\n mainType = generalHelper.addNamespace('dcat:Distribution', dpiConfig);\n const randomId = generalHelper.makeId(10);\n // distribution id can be random, will be overwritten by backend on saving data\n mainURI = N3.DataFactory.namedNode(`https://piveau.eu/set/data/${randomId}`);\n }\n\n // parent method can be called recursively to convert nested values\n // but setting the overal type and id of a dataset/catalogue is only required once at the beginning\n // -> only set additional properties when setMain === true\n setAdditionalProperties(RDFdataset, data, mainURI, mainType, property, datasetURI, dpiConfig);\n } else {\n // called on nested properties with already given URI and type which should used in the following conversion process\n mainURI = preMainURI;\n mainType = preMainType;\n }\n\n // distributions may have download URLs, if no downloadURL is provided -> provided accessUrls will be also set as downloadUrls\n // accessUrl is a required property and therefore always provided (made sure by the frontend)\n // const downloadUrlsProvided = has(data, 'dcat:downloadURL') && !isEmpty(data['dcat:downloadURL']) && data['dcat:downloadURL'].map(el => !isEmpty(el['@id'])).reduce((a, b) => b);\n\n // loop trough all keys within data object and convert values (or nested values) to RDF\n const valueKeys = Object.keys(data);\n for (let index = 0; index < valueKeys.length; index += 1) {\n const key = valueKeys[index]; // key format: either a normal name for special properties (e.g. datasetID) or namespaced keys (e.g. dct:title)\n\n if(generalHelper.propertyHasValue(data[key])) {\n // all properties are sorted by their format (see .../data-provider-interface/config/format-types.js)\n // depending on the format the corresponding conversion-method is used, writing the result to the overall RDF-writer\n if (formatTypes.singularString[property].includes(key)) {\n convertSingularString(RDFdataset, mainURI, data, key, dpiConfig);\n } else if (formatTypes.singularURI[property].includes(key)) {\n convertSingularURI(RDFdataset, mainURI, data, key, dpiConfig);\n } else if (formatTypes.multipleURI[property].includes(key)) {\n // if no dowloadURL is provided, set accessUrls as downloadUrls\n // if (!downloadUrlsProvided && key === 'dcat:accessURL') {\n // // copy accessurl array to donwloadurl array and convert data\n\n // data['dcat:downloadURL'] = cloneDeep(data['dcat:accessURL']);\n // convertMultipleURI(RDFdataset, mainURI, data, 'dcat:downloadURL', property, dpiConfig);\n // }\n\n convertMultipleURI(RDFdataset, mainURI, data, key, property, dpiConfig);\n } else if (formatTypes.typedStrings[property].includes(key)) {\n convertTypedString(RDFdataset, mainURI, data, key, dpiConfig);\n } else if (formatTypes.multilingualStrings[property].includes(key)) {\n convertMultilingual(RDFdataset, mainURI, data, key, dpiConfig);\n } else if (formatTypes.groupedProperties[property].includes(key)) {\n\n // grouped properties are properties provided by the form which consist of multiple properties (e.g contactPoint)\n // the properties values are stored within an object located within an array\n // for repeatable properties there are multiple objects in this array, otherwise there is just one\n \n let actualData;\n // vcard:hasAdress is an object as well as dct:creator and skos:notation\n if (key === 'vcard:hasAddress' || key === 'dct:creator' || key === 'skos:notation' || key === 'spdx:checksum' ) actualData = [data[key]];\n else actualData = data[key];\n\n // looping trough all existing objects within the array\n for (let groupId = 0; groupId < actualData.length; groupId += 1) {\n let currentGroupData = actualData[groupId];\n\n if (!isEmpty(currentGroupData)) {\n if (key === 'skos:notation') {\n // property skos:notation work a little bit different then other properties\n // the form provides a value and a type from two seperated fields ({'@value': '...', '@type': '...'})\n // the resulting RDF should merge these values into a typed literal (value^^type)\n if (has(currentGroupData, '@value') && !isEmpty(currentGroupData['@value'])) {\n let notationValue;\n\n // if a type is given, use to form typed literal\n // if no type is given, only use value to create literal\n if (has(currentGroupData, '@type') && !isEmpty(currentGroupData['@type'])) { // typed literal\n notationValue = N3.DataFactory.literal(currentGroupData['@value'], N3.DataFactory.namedNode(currentGroupData['@type'].resource));\n } else { // literal\n notationValue = N3.DataFactory.literal(currentGroupData['@value']);\n }\n\n // add type for adms:identifier\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdf:type', dpiConfig)),\n N3.DataFactory.namedNode(generalHelper.addNamespace('adms:Identifier', dpiConfig))\n ))\n\n // save quadruple with typed or untyped literal\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n notationValue\n ))\n\n // resulting rdf quads should look like this:\n // datasetId adms:identifier admsIdentifierUtl\n // admsIdentifierUrl rdf:type adms:Identifier\n // admsIdentifierUrl skos:notation value^^type\n }\n } else {\n let groupBlankNode;\n\n // because grouped properties have a list of nested properties we need an initial quadruple stating the parent property\n // using a blank node as object which later serves as subject for the nested properties\n // RDF example:\n // datasetID dct:contactPoint blankNodeId\n // blankNodeId foaf:mbox email@exmaple.com\n // blankNodeId fn:name InsitutionName ...\n\n // some form fields provide an URL which should serves as namedNode for other nested values (e.g. conformsTo)\n // RDF example:\n // datasetID dct:conformsTo conformsToURI\n // conformsToURI dct:title conformsTitle\n if ((key === 'foaf:page' || key === 'adms:identifier' || key === 'dct:conformsTo') && has(currentGroupData, '@id')) {\n groupBlankNode = N3.DataFactory.namedNode(currentGroupData['@id']);\n }\n // all properties that don't provide an URL serving as namedNode for nested values need to define a blank node\n\n // page gets type but also has multilingual fields with preseleted langauge\n // don't create blank node if there is not data for page beside the preselected language\n let emptyPage = false;\n\n if (key === 'foaf:page') {\n\n // if page has title and/or description property given, check if there are values given \n const hasTitle = has(currentGroupData, 'dct:title');\n const hasDescription = has(currentGroupData, 'dct:description');\n\n let hasNoValueKeysTitle = true;\n let hasEmptyValueTitle = true;\n let hasNoValueKeysDescription = true;\n let hasEmptyValueDescription = true;\n\n if (hasTitle) {\n hasNoValueKeysTitle = !currentGroupData['dct:title'].every(el => has(el, '@value'));\n hasEmptyValueTitle = currentGroupData['dct:title'].every(el => isEmpty(el['@value']));\n }\n\n if (hasDescription) {\n hasNoValueKeysDescription = !currentGroupData['dct:description'].every(el => has(el, '@value'));\n hasEmptyValueDescription = currentGroupData['dct:description'].every(el => isEmpty(el['@value']));\n }\n\n // page should be handled as empty if:\n // no title and/or no description given\n // if properties given: no value given or value empty\n if ((hasNoValueKeysTitle || hasEmptyValueTitle) && (hasNoValueKeysDescription || hasEmptyValueDescription)) emptyPage = true;\n }\n\n if (!emptyPage) {\n if (!groupBlankNode) groupBlankNode = N3.DataFactory.blankNode('');\n\n // save inital quadruple using the named or blank node as object\n // e.g. datasetId dct:contactPoint blankNode/namedNode\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n groupBlankNode\n ))\n\n // some properties provide additional types\n if (has(formatTypes.additionalPropertyTypes, key)) {\n RDFdataset.addQuad(N3.DataFactory.quad(\n groupBlankNode,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdf:type', dpiConfig)),\n N3.DataFactory.namedNode(generalHelper.addNamespace(formatTypes.additionalPropertyTypes[key], dpiConfig))\n ))\n }\n\n // temporal values nested inside another object: \"dct:temporal\": [{ \"dct:temporal\": { \"dcat:startDate\": \"...\", \"dcat:endDate\": \"...\" } }] \n if (key === 'dct:temporal') {\n if (has(currentGroupData, 'dct:temporal')) {\n currentGroupData = currentGroupData['dct:temporal'];\n }\n }\n\n // convert all nested values provided by form\n convertPropertyValues(RDFdataset, currentGroupData, property, groupBlankNode, mainType, false, dpiConfig, dpiConfig);\n }\n }\n }\n }\n } else if (formatTypes.conditionalProperties[property].includes(key)) {\n // publisher either is an URI or a group with multiple values (name, homepage, email)\n // license either is an URI or a group with multiple values ()\n if (key === 'dct:publisher' || key === 'dct:license') {\n\n // data contains either {resource: '...', name: '...'} or object containing other keys\n if (has(data[key], 'resource')) {\n convertSingularURI(RDFdataset, mainURI, data, key, dpiConfig);\n } else {\n const groupBlankNode = N3.DataFactory.blankNode('');\n\n // some properties provide additional types\n if (has(formatTypes.additionalPropertyTypes, key)) {\n RDFdataset.addQuad(N3.DataFactory.quad(\n groupBlankNode,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdf:type', dpiConfig)),\n N3.DataFactory.namedNode(generalHelper.addNamespace(formatTypes.additionalPropertyTypes[key], dpiConfig))\n ))\n }\n\n // save inital quadruple using the named or blank node as object\n // e.g. datasetId dct:contactPoint blankNode/namedNode\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n groupBlankNode\n ))\n\n convertPropertyValues(RDFdataset, data[key], property, groupBlankNode, mainType, false, dpiConfig, dpiConfig);\n }\n \n\n }\n } else if (key === 'dcat:temporalResolution') {\n // temporal resolution is displayed as group of input forms for each property (year, month, day, ...)\n // the form provides the data as following: [ { 'Year': '...', 'Month': '...', ... } ]\n // the final format of this property should look like this: P?Y?M?DT?H?M?S\n // not all values must be filled and therefore be present -> default behavior if not given: value = 0\n\n const resolutionValues = data[key];\n const valueString = `P${resolutionValues.Year ? resolutionValues.Year : 0}Y${resolutionValues.Month ? resolutionValues.Month : 0}M${resolutionValues.Day ? resolutionValues.Day : 0}DT${resolutionValues.Hour ? resolutionValues.Hour : 0}H${resolutionValues.Minute ? resolutionValues.Minute : 0}M${resolutionValues.Second ? resolutionValues.Second : 0}S`;\n\n // frontend always provides temporalResolution even if there is no value resulting in P0Y0M0DT0H0M0S\n // don't save if value is equal to P0Y0M0DT0H0M0S\n if (valueString !== \"P0Y0M0DT0H0M0S\") {\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(valueString, N3.DataFactory.namedNode(generalHelper.addNamespace('xsd:duration', dpiConfig)))\n ))\n }\n } else if (key === 'dct:identifier') {\n // form provides data as array of objects with strings: [ { '@value': 'string1' }, { '@value': 'string2' }, ... ]\n // create quadruple for each given object in the array\n for (let valueId = 0; valueId < data[key].length; valueId += 1) {\n const currentValue = data[key][valueId];\n if (has(currentValue, '@value') && !isEmpty(currentValue['@value'])) {\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(currentValue['@value'])\n ))\n }\n }\n } else if (key === 'dct:rights') {\n // rights has a static type (RightsStatement) which needs to be added to linked data as additional node\n // therefore we need to create an initial quadruple for with 'rights' being the predicate having a blank node\n // blank node serves as subject for the following quadruples which contain the type and actual value of the form field\n // RDF:\n // datasetID dct:rights blankNodeID\n // blankNodeId rdf:type RightsStatement\n // blankNodeId rdfs:label LabelValue\n\n // blank node as object for inital quadruple and also as subject for following quadruples\n const rightsBlankNode = N3.DataFactory.blankNode('');\n\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n rightsBlankNode\n ))\n\n // add additional type declaration\n RDFdataset.addQuad(N3.DataFactory.quad(\n rightsBlankNode,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdf:type', dpiConfig)),\n N3.DataFactory.namedNode(generalHelper.addNamespace('dct:RightsStatement', dpiConfig))\n ))\n\n // rights is a conditional property and provides either an URI or a string ( { rdfs:label : 'URL/string' } )\n let rightsValue;\n\n if (data[key]['@type'] === 'url') {\n rightsValue = N3.DataFactory.namedNode(data[key]['rdfs:label']);\n } else {\n rightsValue = N3.DataFactory.literal(data[key]['rdfs:label']);\n }\n\n // add actual value\n RDFdataset.addQuad(N3.DataFactory.quad(\n rightsBlankNode,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdfs:label', dpiConfig)),\n rightsValue\n ))\n \n } else if (key === 'rdf:type') {\n // some properties have additional type information which needs to be added to graph\n // e.g contactPoint -> vcard:Individual\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdf:type', dpiConfig)),\n N3.DataFactory.namedNode(generalHelper.addNamespace(data[key], dpiConfig))\n ))\n }\n } \n }\n}\n\n/**\n * Creates additional quads depending on given property and saves them to given RDF dataset\n * @param {N3.Writer} RDFdataset RDF dataset the quads are saved to\n * @param {Object} data Object containing data as key-value pairs\n * @param {DataFactory.namedNode} mainURI NamedNode defining URI of current property graph\n * @param {DataFactory} mainType NamedNode defining type of current property graph\n * @param {String} property String determining which property is converted (datasets/distributions/catalogues)\n * @param {String} datasetURI URI of dataset used to add distribution URI to dct:distribution within dataset graph\n */\nfunction setAdditionalProperties(RDFdataset, data, mainURI, mainType, property, datasetURI, dpiConfig) {\n\n // adding id and type of property\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace('rdf:type', dpiConfig)),\n N3.DataFactory.namedNode(mainType)\n ))\n\n // adding sample and catalog for datasets\n if (property === 'datasets') {\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace('dcat:catalog', dpiConfig)), // no actual vocabulary\n N3.DataFactory.literal(data['dcat:catalog']) // hould never be empty because of frontend checking\n ))\n }\n\n // catalogues always have to contain the property dct:type with the value 'dcat-ap'\n if (property === 'catalogues') {\n RDFdataset.addQuad(N3.DataFactory.quad(\n mainURI,\n N3.DataFactory.namedNode(generalHelper.addNamespace('dct:type', dpiConfig)),\n N3.DataFactory.literal('dcat-ap')\n ))\n }\n\n // add distribution id to dataset graph (dcat:distribution)\n if (property === 'distributions') {\n RDFdataset.addQuad(N3.DataFactory.quad(\n N3.DataFactory.namedNode(datasetURI),\n N3.DataFactory.namedNode(generalHelper.addNamespace('dcat:distribution', dpiConfig)),\n mainURI\n ))\n }\n}\n\n//-----------------------------------------------------------------------------------------------------\n// basic conversion (input to RDF) methods for different categories of data\n//-----------------------------------------------------------------------------------------------------\n// seems unnecessary at first but if we want to convert nested properties as well, we need these \n// methods (especially to provide the correct parent URI)\n\n/**\n * Converts provided data to quad and saves it to given dataset\n * @param {N3.Writer} RDFdataset Dataset the converter saves the converted data to\n * @param {DataFactory} id Node (Blank or Named) used as subject in quad\n * @param {String} data Data given by form used as object in quad\n * @param {String} key Name of current value (e.g. dct:title) used as predicate in quad\n */\nfunction convertSingularString(RDFdataset, id, data, key, dpiConfig) {\n if (!isEmpty(data[key])) {\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(data[key])\n ))\n }\n}\n\n/**\n * Converts provided data to quad and saves it to given dataset\n * @param {N3.Writer} RDFdata Dataset the converter saves the converted data to\n * @param {DataFactory} id Node (Blank or Named) used as subject in quad\n * @param {String} data Data given by form used as object in quad\n * @param {String} key Name of current value (e.g. dct:title) used as predicate in quad\n */\nfunction convertSingularURI(RDFdataset, id, data, key, dpiConfig) {\n // there are two different formats the frontend delivers URIs\n // 1: 'URI' or 2: {'name': 'abc', 'resource': 'URI'}\n\n // URIs can either be a normal URL or an email address\n // mail addresses typicall include '@' which is used to determine if the given string is a normal URL or an email address\n if (!isEmpty(data[key])) {\n\n let singleURI;\n\n if (typeof data[key] === 'object') {\n if (has(data[key], 'resource')) {\n singleURI = data[key].resource;\n }\n } else {\n if (data[key].includes('@')) {\n // mail address\n singleURI = `mailto:${data[key]}`;\n } else {\n // normal URL\n singleURI = data[key];\n }\n }\n\n // save quad to dataset\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.namedNode(singleURI)\n ));\n }\n}\n\n/**\n * Converts provided data to quads and saves them to given dataset\n * @param {N3.Writer} RDFdataset Dataset the converter saves the converted data to\n * @param {DataFactory} id Node (Blank or Named) used as subject in quads\n * @param {Array} data Array containing URLs used as object within quads\n * @param {String} key Name of current value (e.g. dct:title) used as predicate in quads\n * @param {String} property Determining which property is concerted (datasets/distributions/catalogues)\n */\nfunction convertMultipleURI(RDFdataset, id, data, key, property, dpiConfig) {\n // there are two different formats the frontend delivers multiple URIs\n // 1: [ {\"name\": '...', \"resource\": 'URI'}, {...} ] -> multi-autocomplete fields\n // 2: [ { \"@id\": \"URI1\" }, { \"@id\": \"URI2\" } ] repeatable fields\n\n for (let uriIndex = 0; uriIndex < data[key].length; uriIndex += 1) {\n\n let currentURI;\n const valueObject = data[key][uriIndex];\n if (!isEmpty(valueObject)) {\n if (has(valueObject, 'resource')) currentURI = valueObject.resource;\n else if (has(valueObject, '@id')) currentURI = valueObject['@id'];\n }\n\n // save quad to dataset\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.namedNode(currentURI)\n ));\n }\n}\n\n/**\n * Converts provided data to quad and saves them to given dataset\n * @param {N3.Writer} RDFdataset Dataset the converter saves the converted data to\n * @param {DataFactory} id Node (Blank or Named) used as subject in quad\n * @param {String} data String data used as object with type in quad\n * @param {String} key Name of current value (e.g. dct:title) used as predicate in quad and to determine quad-object type\n */\nfunction convertTypedString(RDFdataset, id, data, key, dpiConfig) {\n if (!isEmpty(data[key])) {\n\n // there is a variety of properties which can have different types\n // issued and motified already provide a type definition ({'@type': 'date/datetime', '@value': '...'})\n if (key === 'dct:issued' || key === 'dct:modified') {\n if (has(data[key], '@value') && !isEmpty(data[key]['@value'])) {\n const imValueType = data[key]['@type'] === 'date' ? data[key]['@type'] : 'dateTime';\n const valueType = generalHelper.addNamespace(`xsd:${imValueType}`, dpiConfig);\n\n /// save quad to dataset\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(data[key]['@value'], N3.DataFactory.namedNode(valueType))\n ));\n }\n } else {\n // all other properties are given as a simple string\n let valueType;\n if (key === 'dcat:endDate' || key === 'dcat:startDate') {\n // dcat:endDate and dcat:startDate are xsd:dateTime\n valueType = generalHelper.addNamespace('xsd:dateTime', dpiConfig);\n } else if (key === 'dcat:spatialResolutionInMeters' || key === \"dcat:byteSize\") {\n // dcat:spatialResolutionInMeters and dcat:byteSize are xsd:decimal\n valueType = generalHelper.addNamespace('xsd:decimal', dpiConfig);\n }\n\n /// save quad to dataset\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(data[key], N3.DataFactory.namedNode(valueType))\n ));\n }\n }\n}\n\n/**\n * Converts provided data to quads and saves them to given dataset\n * @param {N3.Writer} RDFdataset Dataset the converter saves the converted data to\n * @param {DataFactory} id Node (Blank or Named) used as subject in quads\n * @param {Array} data Array of objects containing data and language converted into literal with language for quad\n * @param {String} key Name of current value (e.g. dct:title) used as predicate in quads\n */\nfunction convertMultilingual(RDFdataset, id, data, key, dpiConfig) {\n // multilingual fields mostly provide data as followed\n // [ { '@value': '....', '@language': '...' }, ... ]\n // only the licence title provides no language\n\n if (!isEmpty(data[key])) {\n\n // licence title\n if (!Array.isArray(data[key])) {\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(data[key])\n ))\n } else {\n for (let langIndex = 0; langIndex < data[key].length; langIndex += 1) {\n const currentData = data[key][langIndex];\n // only save data if a value is given (forntend provides preselected language which don't need to be saved if there is no actaul value)\n if (!isEmpty(currentData) && has(currentData, '@value') && !isEmpty(currentData['@value'])) {\n let languageTag;\n \n // if there is no langauge given, set language to english\n if (!has(currentData, '@language') || isEmpty(currentData, '@language')) {\n languageTag = 'en';\n } else {\n // if language is given, use given tag\n languageTag = currentData['@language'];\n }\n \n // saving quad to dataset\n RDFdataset.addQuad(N3.DataFactory.quad(\n id,\n N3.DataFactory.namedNode(generalHelper.addNamespace(key, dpiConfig)),\n N3.DataFactory.literal(currentData['@value'], languageTag)\n ))\n }\n }\n }\n }\n}\n\nexport default {\n convertToRDF,\n};"],"names":["convertToRDF","data","property","specification","finishedRDFdata","dpiConfig","RDFdata","N3","datasetURI","convertPropertyValues","index","error","result","RDFdataset","preMainURI","preMainType","setMain","formatTypes","mainURI","mainType","generalHelper","randomId","setAdditionalProperties","valueKeys","key","convertSingularString","convertSingularURI","convertMultipleURI","convertTypedString","convertMultilingual","actualData","groupId","currentGroupData","isEmpty","has","notationValue","groupBlankNode","emptyPage","hasTitle","hasDescription","hasNoValueKeysTitle","hasEmptyValueTitle","hasNoValueKeysDescription","hasEmptyValueDescription","el","resolutionValues","valueString","valueId","currentValue","rightsBlankNode","rightsValue","id","singleURI","uriIndex","currentURI","valueObject","imValueType","valueType","langIndex","currentData","languageTag","toRDF"],"mappings":";;;;;;;;AAcA,SAASA,EAAaC,GAAMC,GAAUC,GAAe;AAEjD,MAAIC,GAEAC,IAAYF;AAGhB,QAAMG,IAAU,IAAIC,EAAG,OAAO,EAAE,UAAUF,EAAU,UAAU,QAAQ,YAAW,CAAE,GAE7EG,IAAa,8BAA8BP,EAAK,SAAS,SAAS;AAOxE,MAJAQ,EAAsBH,GAASL,EAAKC,CAAQ,GAAGA,GAAU,IAAI,IAAI,I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a,WAAW,IAClEC,IAAc,OAGdA,IAAcD,EAAY,WAAW,GAIzC9C,EAAW,QAAQN,EAAG,YAAY;AAAA,YAC9B4C;AAAA,YACA5C,EAAG,YAAY,UAAUa,EAAc,aAAaI,GAAKnB,CAAS,CAAC;AAAA,YACnEE,EAAG,YAAY,QAAQoD,EAAY,QAAQ,GAAGC,CAAW;AAAA,UACjF,CAAqB;AAAA,QACJ;AAAA,MACJ;AAGb;AAEA,MAAeC,IAAA;AAAA,EACX,cAAA7D;AACJ;"}
|
|
@@ -352,9 +352,9 @@ declare const _default: import('vue').DefineComponent<Readonly<{}>, any, {
|
|
|
352
352
|
url: any;
|
|
353
353
|
token: any;
|
|
354
354
|
}): Promise<void>;
|
|
355
|
-
convertToInput: import('vuex').ActionMethod;
|
|
356
355
|
convertToRDF: import('vuex').ActionMethod;
|
|
357
356
|
clearAll: import('vuex').ActionMethod;
|
|
357
|
+
convertToInput: import('vuex').ActionMethod;
|
|
358
358
|
showSnackbar: import('vuex').ActionMethod;
|
|
359
359
|
setIsEditMode: import('vuex').ActionMethod;
|
|
360
360
|
setIsDraft: import('vuex').ActionMethod;
|
|
@@ -36,8 +36,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
36
36
|
clear(): void;
|
|
37
37
|
checkID(property: any): void;
|
|
38
38
|
checkUniqueID(property: any): Promise<any>;
|
|
39
|
-
saveLocalstorageValues: import('vuex').ActionMethod;
|
|
40
39
|
clearAll: import('vuex').ActionMethod;
|
|
40
|
+
saveLocalstorageValues: import('vuex').ActionMethod;
|
|
41
41
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
42
42
|
property: {
|
|
43
43
|
type: StringConstructor;
|
|
@@ -61,8 +61,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
61
61
|
createIDFromTitle(): any;
|
|
62
62
|
getFirstTitleFromForm(): any;
|
|
63
63
|
isInput(): boolean;
|
|
64
|
-
getNavSteps: import('vuex').Computed;
|
|
65
64
|
getSchema: import('vuex').Computed;
|
|
65
|
+
getNavSteps: import('vuex').Computed;
|
|
66
66
|
getDeleteDistributionInline: import('vuex').Computed;
|
|
67
67
|
getIsEditMode: import('vuex').Computed;
|
|
68
68
|
getUserCatalogIds: import('vuex').Computed;
|
|
@@ -74,11 +74,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
74
74
|
initInputPage(): void;
|
|
75
75
|
createDatasetID(): void;
|
|
76
76
|
generateandTranslateSchema(property: any): void;
|
|
77
|
-
saveLocalstorageValues: import('vuex').ActionMethod;
|
|
78
77
|
clearAll: import('vuex').ActionMethod;
|
|
79
78
|
createSchema: import('vuex').ActionMethod;
|
|
80
79
|
translateSchema: import('vuex').ActionMethod;
|
|
81
80
|
saveFormValues: import('vuex').ActionMethod;
|
|
81
|
+
saveLocalstorageValues: import('vuex').ActionMethod;
|
|
82
82
|
addCatalogOptions: import('vuex').ActionMethod;
|
|
83
83
|
setIsEditMode: import('vuex').ActionMethod;
|
|
84
84
|
setIsDraft: import('vuex').ActionMethod;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mapActions as m } from "vuex";
|
|
2
2
|
import { getTranslationFor as h } from "../../../../utils/helpers.mjs";
|
|
3
3
|
import g from "../../../utils/general-helper.mjs";
|
|
4
|
-
import p from "../../../config/dpi-spec-config.mjs";
|
|
4
|
+
import { config as p } from "../../../config/dpi-spec-config.mjs";
|
|
5
5
|
import { openBlock as a, createElementBlock as r, Fragment as f, toDisplayString as c, createCommentVNode as u, createTextVNode as o, normalizeClass as v, renderList as _ } from "vue";
|
|
6
6
|
import "./URIProp.vue2.mjs";
|
|
7
7
|
import b from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
@@ -17,8 +17,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
17
17
|
/*** Overview Page checker functionality ***/
|
|
18
18
|
checkID(property: any): void;
|
|
19
19
|
checkUniqueID(property: any): Promise<any>;
|
|
20
|
-
saveLocalstorageValues: import('vuex').ActionMethod;
|
|
21
20
|
clearAll: import('vuex').ActionMethod;
|
|
21
|
+
saveLocalstorageValues: import('vuex').ActionMethod;
|
|
22
22
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
23
23
|
property: {
|
|
24
24
|
type: StringConstructor;
|
|
@@ -8,9 +8,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
8
8
|
}, void, {
|
|
9
9
|
topTitle: boolean;
|
|
10
10
|
}, {
|
|
11
|
+
getTitle: import('vuex').Computed;
|
|
11
12
|
getLanguages: import('vuex').Computed;
|
|
12
13
|
getID: import('vuex').Computed;
|
|
13
|
-
getTitle: import('vuex').Computed;
|
|
14
14
|
}, {
|
|
15
15
|
getRepresentativeLocaleOf: typeof getRepresentativeLocaleOf;
|
|
16
16
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -11,8 +11,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
getDatasetDescription(): any;
|
|
13
13
|
getDatasetDescriptionLength(): any;
|
|
14
|
-
getLanguages: import('vuex').Computed;
|
|
15
14
|
getDescription: import('vuex').Computed;
|
|
15
|
+
getLanguages: import('vuex').Computed;
|
|
16
16
|
}, {
|
|
17
17
|
truncate: typeof truncate;
|
|
18
18
|
toggleDatasetDescription(): void;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { truncate } from '../../utils/helpers';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<Readonly<{
|
|
3
3
|
embed?: any;
|
|
4
|
-
distribution?: any;
|
|
5
4
|
getDistributionFormat?: any;
|
|
5
|
+
distribution?: any;
|
|
6
6
|
distributionFormatTruncated?: any;
|
|
7
7
|
}>, any, any, {}, {
|
|
8
8
|
truncate: typeof truncate;
|
|
9
9
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<Readonly<{
|
|
10
10
|
embed?: any;
|
|
11
|
-
distribution?: any;
|
|
12
11
|
getDistributionFormat?: any;
|
|
12
|
+
distribution?: any;
|
|
13
13
|
distributionFormatTruncated?: any;
|
|
14
14
|
}>>>, {
|
|
15
15
|
readonly embed?: any;
|
|
16
|
-
readonly distribution?: any;
|
|
17
16
|
readonly getDistributionFormat?: any;
|
|
17
|
+
readonly distribution?: any;
|
|
18
18
|
readonly distributionFormatTruncated?: any;
|
|
19
19
|
}, {}>;
|
|
20
20
|
export default _default;
|
|
@@ -25,10 +25,10 @@ declare const _default: import('vue').DefineComponent<Readonly<{
|
|
|
25
25
|
};
|
|
26
26
|
}, {
|
|
27
27
|
files(): any;
|
|
28
|
-
getCatalog: import('vuex').Computed;
|
|
29
28
|
getDistributions: import('vuex').Computed;
|
|
30
|
-
getLanguages: import('vuex').Computed;
|
|
31
29
|
getTitle: import('vuex').Computed;
|
|
30
|
+
getCatalog: import('vuex').Computed;
|
|
31
|
+
getLanguages: import('vuex').Computed;
|
|
32
32
|
}, {
|
|
33
33
|
getTranslationFor: typeof getTranslationFor;
|
|
34
34
|
fetchDistributionFiles(zip: any, files: any, folder: any, getContentTypeFormat: any): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<Readonly<{
|
|
2
|
-
distribution?: any;
|
|
3
2
|
getDistributionFormat?: any;
|
|
3
|
+
distribution?: any;
|
|
4
4
|
isOnlyOneUrl?: any;
|
|
5
5
|
getDownloadUrl?: any;
|
|
6
6
|
trackGoto?: any;
|
|
@@ -12,16 +12,16 @@ declare const _default: import('vue').DefineComponent<Readonly<{
|
|
|
12
12
|
setClipboard(value: any): void;
|
|
13
13
|
popupCopyUrlAlert(): void;
|
|
14
14
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<Readonly<{
|
|
15
|
-
distribution?: any;
|
|
16
15
|
getDistributionFormat?: any;
|
|
16
|
+
distribution?: any;
|
|
17
17
|
isOnlyOneUrl?: any;
|
|
18
18
|
getDownloadUrl?: any;
|
|
19
19
|
trackGoto?: any;
|
|
20
20
|
showAccessUrls?: any;
|
|
21
21
|
replaceHttp?: any;
|
|
22
22
|
}>>>, {
|
|
23
|
-
readonly distribution?: any;
|
|
24
23
|
readonly getDistributionFormat?: any;
|
|
24
|
+
readonly distribution?: any;
|
|
25
25
|
readonly isOnlyOneUrl?: any;
|
|
26
26
|
readonly getDownloadUrl?: any;
|
|
27
27
|
readonly trackGoto?: any;
|
|
@@ -6,10 +6,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
6
6
|
default: () => boolean;
|
|
7
7
|
};
|
|
8
8
|
}, any, any, {
|
|
9
|
+
getTitle: import('vuex').Computed;
|
|
9
10
|
getCatalog: import('vuex').Computed;
|
|
10
11
|
getLanguages: import('vuex').Computed;
|
|
11
12
|
getID: import('vuex').Computed;
|
|
12
|
-
getTitle: import('vuex').Computed;
|
|
13
13
|
}, {
|
|
14
14
|
getTranslationFor: typeof getTranslationFor;
|
|
15
15
|
isErpdActive(): boolean;
|