@piveau/dpi 0.1.0-beta.5 → 0.1.0-beta.6
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/DataProviderInterface.vue2.js +45 -40
- package/dist/data-provider-interface/composables/useDpiEditMode.js +15 -13
- package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +7 -7
- package/dist/data-provider-interface/store/index.js +32 -0
- package/dist/data-provider-interface/store/modules/authStore.js +301 -0
- package/dist/data-provider-interface/store/modules/catalogueDetailsStore.js +34 -0
- package/dist/data-provider-interface/store/modules/cataloguesStore.js +256 -0
- package/dist/data-provider-interface/store/modules/datasetDetailsStore.js +644 -0
- package/dist/data-provider-interface/store/modules/datasetsStore.js +361 -0
- package/dist/data-provider-interface/store/{dpiStore.js → modules/dpiStore.js} +11 -12
- package/dist/data-provider-interface/store/modules/snackbarStore.js +45 -0
- package/dist/index.js +4 -4
- package/dist/utils/draftApi.js +33 -0
- package/dist/utils/helpers.js +36 -22
- package/dist/utils/identifiersApi.js +16 -0
- package/dist/utils/jwt.js +7 -0
- package/package.json +6 -4
- package/dist/data-provider-interface/store/modules/formSchemaStore.js +0 -94
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
import { has as _, isArray as r, isObject as l } from "lodash-es";
|
|
2
|
+
import { mirrorPropertyFn as g, getTranslationFor as o } from "../../../utils/helpers.js";
|
|
3
|
+
const I = g("label", "title"), u = {
|
|
4
|
+
dataset: {
|
|
5
|
+
// DCAT-AP.de
|
|
6
|
+
availability: {},
|
|
7
|
+
applicableLegislation: [{}],
|
|
8
|
+
politicalGeocodingLevelURI: [{}],
|
|
9
|
+
politicalGeocodingURI: [{}],
|
|
10
|
+
contributorID: [{}],
|
|
11
|
+
geocodingDescriptionDe: {},
|
|
12
|
+
hvdCategory: [{}],
|
|
13
|
+
legalBasis: {},
|
|
14
|
+
qualityProcessURI: "",
|
|
15
|
+
typeDe: "",
|
|
16
|
+
references: "",
|
|
17
|
+
contributor: [],
|
|
18
|
+
originator: [],
|
|
19
|
+
maintainer: [],
|
|
20
|
+
//
|
|
21
|
+
accessRights: "",
|
|
22
|
+
accrualPeriodicity: "",
|
|
23
|
+
admsIdentifiers: [],
|
|
24
|
+
attributes: [],
|
|
25
|
+
catalog: {},
|
|
26
|
+
categories: [],
|
|
27
|
+
conformsTo: [],
|
|
28
|
+
contactPoints: [],
|
|
29
|
+
country: {},
|
|
30
|
+
creator: {},
|
|
31
|
+
dateIncorrect: !1,
|
|
32
|
+
deadline: "",
|
|
33
|
+
description: {},
|
|
34
|
+
dimensions: [],
|
|
35
|
+
distributions: [],
|
|
36
|
+
distributionFormats: [],
|
|
37
|
+
documentations: [],
|
|
38
|
+
frequency: {},
|
|
39
|
+
geocodingDescription: {},
|
|
40
|
+
hasQualityAnnotations: [],
|
|
41
|
+
hasVersion: [],
|
|
42
|
+
id: "",
|
|
43
|
+
identifiers: [],
|
|
44
|
+
idName: "",
|
|
45
|
+
isHvd: !1,
|
|
46
|
+
isReferencedBy: [],
|
|
47
|
+
isVersionOf: [],
|
|
48
|
+
keywords: [],
|
|
49
|
+
landingPages: [],
|
|
50
|
+
languages: [],
|
|
51
|
+
licences: [],
|
|
52
|
+
modificationDate: "",
|
|
53
|
+
numSeries: 0,
|
|
54
|
+
originalLanguage: "",
|
|
55
|
+
otherIdentifiers: [],
|
|
56
|
+
pages: [],
|
|
57
|
+
provenances: [],
|
|
58
|
+
publisher: {},
|
|
59
|
+
qualifiedAttributions: [],
|
|
60
|
+
qualifiedRelations: [],
|
|
61
|
+
relations: [],
|
|
62
|
+
relatedResources: [],
|
|
63
|
+
releaseDate: "",
|
|
64
|
+
resource: "",
|
|
65
|
+
sample: [],
|
|
66
|
+
similarDatasetsRequested: "",
|
|
67
|
+
similarDatasets: [],
|
|
68
|
+
sources: [],
|
|
69
|
+
spatial: [],
|
|
70
|
+
spatialResource: [],
|
|
71
|
+
spatialResolutionInMeters: 0,
|
|
72
|
+
statUnitMeasures: [],
|
|
73
|
+
subject: [],
|
|
74
|
+
temporal: [],
|
|
75
|
+
temporalResolution: [],
|
|
76
|
+
theme: [],
|
|
77
|
+
translationMetaData: {},
|
|
78
|
+
title: {},
|
|
79
|
+
type: {},
|
|
80
|
+
versionInfo: "",
|
|
81
|
+
versionNotes: {},
|
|
82
|
+
visualisations: [],
|
|
83
|
+
wasGeneratedBy: [],
|
|
84
|
+
qualityDataRequested: "",
|
|
85
|
+
qualityData: [""],
|
|
86
|
+
qualityDistributionData: [""],
|
|
87
|
+
isDQVDataRequested: "",
|
|
88
|
+
isDQVDataRDFAvailable: !1,
|
|
89
|
+
isDQVDataTTLAvailable: !1,
|
|
90
|
+
isDQVDataN3Available: !1,
|
|
91
|
+
isDQVDataNTAvailable: !1,
|
|
92
|
+
isDQVDataJSONLDAvailable: !1,
|
|
93
|
+
catalogRecord: {},
|
|
94
|
+
isUsedBy: {},
|
|
95
|
+
extendetMetadata: {},
|
|
96
|
+
distributionDownloadAs: {},
|
|
97
|
+
distributionDownloadAsOptions: [],
|
|
98
|
+
descriptionHeight: 0
|
|
99
|
+
},
|
|
100
|
+
activeNavigationTab: 0,
|
|
101
|
+
loading: !1
|
|
102
|
+
}, N = {
|
|
103
|
+
getProperty: (t) => (a) => t.dataset[a],
|
|
104
|
+
// DCAT-AP.de fields
|
|
105
|
+
getAvailability: (t) => t.dataset.availability,
|
|
106
|
+
getPoliticalGeocodingLevelURI: (t) => t.dataset.politicalGeocodingLevelURI,
|
|
107
|
+
getPoliticalGeocodingURI: (t) => t.dataset.politicalGeocodingURI,
|
|
108
|
+
getContributorID: (t) => t.dataset.contributorID,
|
|
109
|
+
getGeocodingDescriptionDe: (t) => t.dataset.geocodingDescriptionDe,
|
|
110
|
+
getLegalBasis: (t) => t.dataset.legalBasis,
|
|
111
|
+
getQualityProcessURI: (t) => t.dataset.qualityProcessURI,
|
|
112
|
+
getTypeDe: (t) => t.dataset.typeDe,
|
|
113
|
+
getReferences: (t) => t.dataset.references,
|
|
114
|
+
getContributor: (t) => t.dataset.contributor,
|
|
115
|
+
getOriginator: (t) => t.dataset.originator,
|
|
116
|
+
getMaintainer: (t) => t.dataset.maintainer,
|
|
117
|
+
//
|
|
118
|
+
getAccessRights: (t) => t.dataset.accessRights,
|
|
119
|
+
getAccrualPeriodicity: (t) => t.dataset.accrualPeriodicity,
|
|
120
|
+
getAdmsIdentifiers: (t) => t.dataset.admsIdentifiers,
|
|
121
|
+
getAttributes: (t) => t.dataset.attributes,
|
|
122
|
+
getCatalog: (t) => t.dataset.catalog,
|
|
123
|
+
getCategories: (t) => t.dataset.categories.length && t.dataset.categories.map(I) || [],
|
|
124
|
+
getConformsTo: (t) => t.dataset.conformsTo.length && t.dataset.conformsTo.map(I) || [],
|
|
125
|
+
getContactPoints: (t) => t.dataset.contactPoints,
|
|
126
|
+
getCountry: (t) => t.dataset.country,
|
|
127
|
+
getCreator: (t) => t.dataset.creator,
|
|
128
|
+
getDateIncorrect: (t) => t.dataset.dateIncorrect,
|
|
129
|
+
getDeadline: (t) => t.dataset.deadline,
|
|
130
|
+
getDescription: (t) => t.dataset.description,
|
|
131
|
+
getDimensions: (t) => t.dataset.dimensions,
|
|
132
|
+
getDistributions: (t) => t.dataset.distributions,
|
|
133
|
+
getDistributionFormats: (t) => t.dataset.distributionFormats,
|
|
134
|
+
getDocumentations: (t) => t.dataset.documentations,
|
|
135
|
+
getFrequency: (t) => t.dataset.frequency,
|
|
136
|
+
getGeocodingDescription: (t) => t.dataset.geocodingDescription,
|
|
137
|
+
getHasQualityAnnotations: (t) => t.dataset.hasQualityAnnotations,
|
|
138
|
+
getHasVersion: (t) => t.dataset.hasVersion,
|
|
139
|
+
getID: (t) => t.dataset.id,
|
|
140
|
+
getIdentifiers: (t) => t.dataset.identifiers,
|
|
141
|
+
getIdName: (t) => t.dataset.idName,
|
|
142
|
+
getIsReferencedBy: (t) => t.dataset.isReferencedBy,
|
|
143
|
+
getIsVersionOf: (t) => t.dataset.isVersionOf,
|
|
144
|
+
getKeywords: (t) => t.dataset.keywords.length && t.dataset.keywords.map(I) || [],
|
|
145
|
+
getSubject: (t) => t.dataset.subject.length && t.dataset.subject.map(I) || [],
|
|
146
|
+
getLandingPages: (t) => t.dataset.landingPages,
|
|
147
|
+
getLanguages: (t) => t.dataset.languages,
|
|
148
|
+
getLicences: (t) => t.dataset.licences,
|
|
149
|
+
getModificationDate: (t) => t.dataset.modificationDate,
|
|
150
|
+
getNumSeries: (t) => t.dataset.numSeries,
|
|
151
|
+
getOriginalLanguage: (t) => t.dataset.originalLanguage,
|
|
152
|
+
getOtherIdentifiers: (t) => t.dataset.otherIdentifiers,
|
|
153
|
+
getPages: (t) => t.dataset.pages,
|
|
154
|
+
getProvenances: (t) => t.dataset.provenances,
|
|
155
|
+
getPublisher: (t) => t.dataset.publisher,
|
|
156
|
+
getQualifiedAttributions: (t) => t.dataset.qualifiedAttributions,
|
|
157
|
+
getQualifiedRelations: (t) => t.dataset.qualifiedRelations,
|
|
158
|
+
getRelations: (t) => t.dataset.relations,
|
|
159
|
+
getRelatedResources: (t) => t.dataset.relatedResources,
|
|
160
|
+
getReleaseDate: (t) => t.dataset.releaseDate,
|
|
161
|
+
getSimilarDatasetsRequested: (t) => t.dataset.similarDatasetsRequested,
|
|
162
|
+
getSimilarDatasets: (t) => t.dataset.similarDatasets,
|
|
163
|
+
getSample: (t) => t.dataset.sample,
|
|
164
|
+
getSources: (t) => t.dataset.sources,
|
|
165
|
+
getSpatial: (t) => t.dataset.spatial,
|
|
166
|
+
getSpatialResource: (t) => t.dataset.spatialResource.length && t.dataset.spatialResource.map(I) || [],
|
|
167
|
+
getSpatialResolutionInMeters: (t) => t.dataset.spatialResolutionInMeters,
|
|
168
|
+
getStatUnitMeasures: (t) => t.dataset.statUnitMeasures,
|
|
169
|
+
getTheme: (t) => t.dataset.theme,
|
|
170
|
+
getTemporal: (t) => t.dataset.temporal,
|
|
171
|
+
getTemporalResolution: (t) => t.dataset.temporalResolution,
|
|
172
|
+
getTranslationMetaData: (t) => t.dataset.translationMetaData,
|
|
173
|
+
getTitle: (t) => t.dataset.title,
|
|
174
|
+
getType: (t) => t.dataset.type,
|
|
175
|
+
getResource: (t) => t.dataset.resource,
|
|
176
|
+
getVersionInfo: (t) => t.dataset.versionInfo,
|
|
177
|
+
getVersionNotes: (t) => t.dataset.versionNotes,
|
|
178
|
+
getVisualisations: (t) => t.dataset.visualisations,
|
|
179
|
+
getWasGeneratedBy: (t) => t.dataset.wasGeneratedBy,
|
|
180
|
+
getLoading: (t) => t.loading,
|
|
181
|
+
getQualityDataRequested: (t) => t.dataset.qualityDataRequested,
|
|
182
|
+
getQualityData: (t) => t.dataset.qualityData,
|
|
183
|
+
getQualityDistributionData: (t) => t.dataset.qualityDistributionData,
|
|
184
|
+
getIsDQVDataRequested: (t) => t.dataset.isDQVDataRequested,
|
|
185
|
+
getIsDQVDataRDFAvailable: (t) => t.dataset.isDQVDataRDFAvailable,
|
|
186
|
+
getIsDQVDataTTLAvailable: (t) => t.dataset.isDQVDataTTLAvailable,
|
|
187
|
+
getIsDQVDataN3Available: (t) => t.dataset.isDQVDataN3Available,
|
|
188
|
+
getIsDQVDataNTAvailable: (t) => t.dataset.isDQVDataNTAvailable,
|
|
189
|
+
getIsDQVDataJSONLDAvailable: (t) => t.dataset.isDQVDataJSONLDAvailable,
|
|
190
|
+
getCatalogRecord: (t) => t.dataset.catalogRecord,
|
|
191
|
+
getExtendedMetadata: (t) => t.dataset.extendetMetadata,
|
|
192
|
+
getDistributionDownloadAs: (t) => t.dataset.distributionDownloadAs,
|
|
193
|
+
getDistributionDownloadAsOptions: (t) => t.dataset.distributionDownloadAsOptions,
|
|
194
|
+
getDatasetDescriptionHeight: (t) => t.dataset.descriptionHeight,
|
|
195
|
+
getIsHvd: (t) => t.dataset.isHvd,
|
|
196
|
+
getApplicableLegislation: (t) => t.dataset.applicableLegislation,
|
|
197
|
+
// getHvdCategory: state => state.dataset.hvdCategory,
|
|
198
|
+
getHvdCategories: (t) => t.dataset.hvdCategory.length && t.dataset.hvdCategory.map(I) || []
|
|
199
|
+
}, O = {
|
|
200
|
+
/**
|
|
201
|
+
* @description Loads details for the dataset with the given ID.
|
|
202
|
+
* @param commit
|
|
203
|
+
* @param state
|
|
204
|
+
* @param id {String} The dataset ID.
|
|
205
|
+
*/
|
|
206
|
+
loadDatasetDetails({ state: t, commit: a }, s) {
|
|
207
|
+
return new Promise((T, i) => {
|
|
208
|
+
a("SET_LOADING", !0), a("SET_ID", s), this.$datasetService.getSingle(s).then((e) => {
|
|
209
|
+
a("SET_AVAILABILITY", e.availability), a("SET_POLITICAL_GEOCODING_LEVEL_URL", e.politicalGeocodingLevelURI), a("SET_POLITICAL_GEOCODING_URL", e.politicalGeocodingURI), a("SET_CONTRIBUTOR_ID", e.contributorID), a("SET_GEOCODING_DESCRIPTION_DE", e.geocodingDescriptionDe), a("SET_LEGAL_BASIS", e.legalBasis), a("SET_QUALITY_PROCESS_URI", e.qualityProcessURI), a("SET_TYPE_DE", e.typeDe), a("SET_REFERENCES", e.references), a("SET_CONTRIBUTER", e.contributor), a("SET_ORIGINATOR", e.originator), a("SET_MAINTAINER", e.maintainer), a("SET_ACCESS_RIGHTS", e.accessRights), a("SET_ACCRUAL_PERIODICITY", e.accrualPeriodicity), a("SET_ATTRIBUTES", e.attributes), a("SET_catalog", e.catalog), a("SET_CATEGORIES", e.categories), a("SET_CONFORMS_TO", e.conformsTo), a("SET_CONTACT_POINTS", e.contactPoints), a("SET_COUNTRY", e.country), a("SET_CREATOR", e.creator), a("SET_DESCRIPTION", e.description), a("SET_DIMENSIONS", e.dimensions), a("SET_DISTRIBUTIONS", e.distributions), a("SET_DISTRIBUTION_FORMATS", e.distributionFormats), a("SET_DOCUMENTATIONS", e.documentations), a("SET_FREQUENCY", e.frequency), a("SET_HAS_QUALITY_ANNOTATIONS", e.hasQualityAnnotations), a("SET_HAS_VERSION", e.hasVersion), a("SET_IDENTIFIERS", e.identifiers), a("SET_ID_NAME", e.idName), a("SET_IS_REFERENCED_BY", e.isReferencedBy), a("SET_IS_VERSION_OF", e.isVersionOf), a("SET_KEYWORDS", e.keywords), a("SET_LANDING_PAGES", e.landingPages), a("SET_LANGUAGES", e.languages), a("SET_LICENCES", e.licences), a("SET_MODIFICATION_DATE", e.modificationDate), a("SET_NUM_SERIES", e.numSeries), a("SET_ORIGINAL_LANGUAGE", e.originalLanguage), a("SET_OTHER_IDENTIFIERS", e.otherIdentifiers), a("SET_PAGES", e.pages), a("SET_PROVENANCES", e.provenances), a("SET_PUBLISHER", e.publisher), a("SET_RELATED_RESOURCES", e.relatedResources), a("SET_RELEASE_DATE", e.releaseDate), a("SET_RESOURCE", e.resource), a("SET_SOURCES", e.sources), a("SET_SPATIAL", e.spatial), a("SET_SPATIAL_RESOURCE", e.spatialResource), a("SET_STAT_UNIT_MEASURES", e.statUnitMeasures), a("SET_TEMPORAL", e.temporal), a("SET_TRANSLATION_META_DATA", e.translationMetaData), a("SET_TITLE", e.title), a("SET_VERSION_INFO", e.versionInfo), a("SET_VERSION_NOTES", e.versionNotes), a("SET_VISUALISATIONS", e.visualisations), a("SET_WAS_GENERATED_BY", e.wasGeneratedBy), a("SET_CATALOG_RECORD", e.catalogRecord), a("SET_ADMS_IDENTIFIERS", e.admsIdentifiers), a("SET_DEADLINE", e.deadline), a("SET_GEOCODING_DESCRIPTION", e.geocodingDescription), a("SET_QUALIFIED_ATTRIBUTIONS", e.qualifiedAttributions), a("SET_QUALIFIED_RELATIONS", e.qualifiedRelations), a("SET_RELATIONS", e.relations), a("SET_SAMPLE", e.sample), a("SET_SPATIAL_RESOLUTION_IN_METERS", e.spatialResolutionInMeters), a("SET_SUBJECT", e.subject), a("SET_TEMPORAL_RESOLUTION", e.temporalResolution), a("SET_THEME", e.theme), a("SET_TYPE", e.type), a("SET_EXTENDET_METADATA", e.extendetMetadata), a("SET_IS_HVD", e.isHvd), a("SET_HVD_CATEGORY", e.hvdCategory), a("SET_LOADING", !1), a("SET_IS_HVD", e.isHvd), a("SET_APPLICABLE_LEGISLATION", e.applicableLegislation), a("SET_HVD_CATEGORY", e.hvdCategory), T();
|
|
210
|
+
}).catch((e) => {
|
|
211
|
+
console.error(e), a("SET_LOADING", !1), i(e);
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
},
|
|
215
|
+
/**
|
|
216
|
+
* @description Loads details for the dataset with the given ID. But unlike loaddatasetDetails,
|
|
217
|
+
* the Mutations after the request differ because this function is meant to fetch details for similar datasets of another dataset.
|
|
218
|
+
* @param commit
|
|
219
|
+
* @param state
|
|
220
|
+
* @param id {String} The dataset ID.
|
|
221
|
+
*/
|
|
222
|
+
loadSimilarDatasetDetails({ state: t, commit: a }, s) {
|
|
223
|
+
return a("SET_LOADING", !0), new Promise((T, i) => {
|
|
224
|
+
this.$datasetService.getSingle(s).then((e) => {
|
|
225
|
+
a("SET_SD_DESCRIPTION", { id: s, description: e.description }), a("SET_SD_TITLE", { id: s, title: e.title }), a("SET_SD_DISTRIBUTION_FORMATS", { id: s, distributionFormats: e.distributionFormats }), a("SET_LOADING", !1), T(e);
|
|
226
|
+
}).catch((e) => {
|
|
227
|
+
console.error(e), a("SET_LOADING", !1), i(e);
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
},
|
|
231
|
+
/**
|
|
232
|
+
* @description Fetches similar datasets of the provided dataset id
|
|
233
|
+
* @param idOrPayload {string | LoadSimilarDatasetsPayload} - id or payload
|
|
234
|
+
*/
|
|
235
|
+
loadSimilarDatasets({ state: t, commit: a }, s) {
|
|
236
|
+
let T, i;
|
|
237
|
+
if (typeof s == "string")
|
|
238
|
+
T = s, i = {};
|
|
239
|
+
else if (l(s))
|
|
240
|
+
T = s.id, i = s == null ? void 0 : s.query, s == null || s.description;
|
|
241
|
+
else
|
|
242
|
+
throw new Error("invalid payload argument passed to method loadSimilarDatasets: " + JSON.stringify(s));
|
|
243
|
+
return a("SET_LOADING", !0), new Promise((e, S) => {
|
|
244
|
+
a("SET_ID", T), a("SET_SIMILAR_DATASETS_REQUESTED", T);
|
|
245
|
+
const d = {
|
|
246
|
+
description: o(t.dataset.description, "en", "en"),
|
|
247
|
+
title: o(t.dataset.title, "en", "en")
|
|
248
|
+
};
|
|
249
|
+
t.dataset.keywords && (d.keywords = t.dataset.keywords.map((E) => E.label)), this.$datasetService.getSimilarDatasets(T, d, i).then((E) => {
|
|
250
|
+
var A;
|
|
251
|
+
const n = (A = E.data) == null ? void 0 : A.result;
|
|
252
|
+
if (n) {
|
|
253
|
+
const R = "http://data.europa.eu/88u/dataset/";
|
|
254
|
+
n.forEach((D) => {
|
|
255
|
+
D.id = D.uri.substring(R.length), D.uri = "https://data.europa.eu/88u/dataset/" + D.id;
|
|
256
|
+
}), a("SET_SIMILAR_DATASETS", n), a("SET_LOADING", !1), e(n);
|
|
257
|
+
} else
|
|
258
|
+
a("SET_SIMILAR_DATASETS", E.data), a("SET_LOADING", !1), e(E.data);
|
|
259
|
+
}).catch((E) => {
|
|
260
|
+
console.error(E), a("SET_LOADING", !1), S(E);
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
},
|
|
264
|
+
loadQualityData({ commit: t }, a) {
|
|
265
|
+
return t("SET_LOADING", !0), new Promise((s, T) => {
|
|
266
|
+
t("SET_ID", a), t("SET_QUALITY_DATA_REQUESTED", a), this.$datasetService.getQualityData(a).then((i) => {
|
|
267
|
+
t("SET_QUALITY_DATA", i.data), t("SET_LOADING", !1), s(i.data);
|
|
268
|
+
}).catch((i) => {
|
|
269
|
+
console.error(i), t("SET_LOADING", !1), T(i);
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
},
|
|
273
|
+
loadQualityDistributionData({ commit: t }, a) {
|
|
274
|
+
return t("SET_LOADING", !0), new Promise((s, T) => {
|
|
275
|
+
t("SET_ID", a), t("SET_QUALITY_DATA_REQUESTED", a), this.$datasetService.getQualityDistributionData(a).then((i) => {
|
|
276
|
+
t("SET_QUALITY_DISTRIBUTION_DATA", i.data), t("SET_LOADING", !1), s(i.data);
|
|
277
|
+
}).catch((i) => {
|
|
278
|
+
console.error(i), t("SET_LOADING", !1), T(i);
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
},
|
|
282
|
+
/**
|
|
283
|
+
* @description load dqv data
|
|
284
|
+
* @param commit
|
|
285
|
+
* @param id {String}
|
|
286
|
+
* @param formats {Array}
|
|
287
|
+
* @param locale {String}
|
|
288
|
+
*/
|
|
289
|
+
loadDQVData({ commit: t }, { id: a, formats: s, locale: T }) {
|
|
290
|
+
return new Promise((i, e) => {
|
|
291
|
+
t("SET_ID", a), t("SET_IS_DQV_DATA_REQUESTED", a), this.$datasetService.getDQVDataHead(a, T).then((S) => {
|
|
292
|
+
const d = S.status === 200;
|
|
293
|
+
s.forEach((E) => t(`SET_IS_DQV_DATA_${E.toUpperCase()}_AVAILABLE`, d)), i(S);
|
|
294
|
+
}).catch((S) => {
|
|
295
|
+
s.forEach((d) => t(`SET_IS_DQV_DATA_${d.toUpperCase()}_AVAILABLE`, !1)), e(S);
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
},
|
|
299
|
+
setLoading({ commit: t }, a) {
|
|
300
|
+
t("SET_LOADING", a);
|
|
301
|
+
},
|
|
302
|
+
/**
|
|
303
|
+
* @description Selects distribution for download as (format convertion) service, sets available format options.
|
|
304
|
+
* @param commit
|
|
305
|
+
* @param distribution - Selected distribution.
|
|
306
|
+
* @param selectOptions - Available file formats for convertion
|
|
307
|
+
*/
|
|
308
|
+
selectDistributionForDownloadAs({ commit: t }, { distribution: a, selectOptions: s }) {
|
|
309
|
+
t("SET_DISTRIBUTION_DOWNLOAD_AS", a), t("SET_DISTRIBUTION_DOWNLOAD_AS_OPTIONS", s);
|
|
310
|
+
},
|
|
311
|
+
/**
|
|
312
|
+
* @description Sets datasetDescription height
|
|
313
|
+
* @param commit
|
|
314
|
+
* @param height
|
|
315
|
+
*/
|
|
316
|
+
setDatasetDescriptionHeight({ commit: t }, a) {
|
|
317
|
+
t("SET_DATASET_DESCRIPTION_HEIGHT", a);
|
|
318
|
+
},
|
|
319
|
+
/**
|
|
320
|
+
* @description Sets dateIncorrect to true if date is not plausible
|
|
321
|
+
* @param commit
|
|
322
|
+
*/
|
|
323
|
+
setDateIncorrect({ commit: t }) {
|
|
324
|
+
t("SET_DATE_INCORRECT");
|
|
325
|
+
}
|
|
326
|
+
}, L = {
|
|
327
|
+
// DCAT-AP.de
|
|
328
|
+
SET_AVAILABILITY(t, a) {
|
|
329
|
+
t.dataset.availability = a;
|
|
330
|
+
},
|
|
331
|
+
SET_POLITICAL_GEOCODING_LEVEL_URL(t, a) {
|
|
332
|
+
t.dataset.politicalGeocodingLevelURI = a;
|
|
333
|
+
},
|
|
334
|
+
SET_POLITICAL_GEOCODING_URL(t, a) {
|
|
335
|
+
t.dataset.politicalGeocodingURI = a;
|
|
336
|
+
},
|
|
337
|
+
SET_CONTRIBUTOR_ID(t, a) {
|
|
338
|
+
t.dataset.contributorID = a;
|
|
339
|
+
},
|
|
340
|
+
SET_LEGAL_BASIS(t, a) {
|
|
341
|
+
t.dataset.legalBasis = a;
|
|
342
|
+
},
|
|
343
|
+
SET_QUALITY_PROCESS_URI(t, a) {
|
|
344
|
+
t.dataset.qualityProcessURI = a;
|
|
345
|
+
},
|
|
346
|
+
SET_TYPE_DE(t, a) {
|
|
347
|
+
t.dataset.typeDe = a;
|
|
348
|
+
},
|
|
349
|
+
SET_REFERENCES(t, a) {
|
|
350
|
+
t.dataset.references = a;
|
|
351
|
+
},
|
|
352
|
+
SET_CONTRIBUTER(t, a) {
|
|
353
|
+
t.dataset.contributor = a;
|
|
354
|
+
},
|
|
355
|
+
SET_GEOCODING_DESCRIPTION_DE(t, a) {
|
|
356
|
+
t.dataset.geocodingDescriptionDe = a;
|
|
357
|
+
},
|
|
358
|
+
SET_ORIGINATOR(t, a) {
|
|
359
|
+
t.dataset.originator = a;
|
|
360
|
+
},
|
|
361
|
+
SET_MAINTAINER(t, a) {
|
|
362
|
+
t.dataset.maintainer = a;
|
|
363
|
+
},
|
|
364
|
+
//
|
|
365
|
+
SET_ACCESS_RIGHTS(t, a) {
|
|
366
|
+
t.dataset.accessRights = a;
|
|
367
|
+
},
|
|
368
|
+
SET_ACCRUAL_PERIODICITY(t, a) {
|
|
369
|
+
t.dataset.accrualPeriodicity = a;
|
|
370
|
+
},
|
|
371
|
+
SET_ATTRIBUTES(t, a) {
|
|
372
|
+
t.dataset.attributes = a;
|
|
373
|
+
},
|
|
374
|
+
SET_catalog(t, a) {
|
|
375
|
+
t.dataset.catalog = a;
|
|
376
|
+
},
|
|
377
|
+
SET_CATEGORIES(t, a) {
|
|
378
|
+
t.dataset.categories = a;
|
|
379
|
+
},
|
|
380
|
+
SET_CONFORMS_TO(t, a) {
|
|
381
|
+
t.dataset.conformsTo = a;
|
|
382
|
+
},
|
|
383
|
+
SET_CONTACT_POINTS(t, a) {
|
|
384
|
+
t.dataset.contactPoints = a;
|
|
385
|
+
},
|
|
386
|
+
SET_COUNTRY(t, a) {
|
|
387
|
+
t.dataset.country = a;
|
|
388
|
+
},
|
|
389
|
+
SET_CREATOR(t, a) {
|
|
390
|
+
t.dataset.creator = a;
|
|
391
|
+
},
|
|
392
|
+
SET_DATE_INCORRECT(t) {
|
|
393
|
+
t.dataset.dateIncorrect = !0;
|
|
394
|
+
},
|
|
395
|
+
SET_DESCRIPTION(t, a) {
|
|
396
|
+
t.dataset.description = a;
|
|
397
|
+
},
|
|
398
|
+
SET_DIMENSIONS(t, a) {
|
|
399
|
+
t.dataset.dimensions = a;
|
|
400
|
+
},
|
|
401
|
+
SET_DISTRIBUTIONS(t, a) {
|
|
402
|
+
t.dataset.distributions = a;
|
|
403
|
+
},
|
|
404
|
+
SET_DISTRIBUTION_FORMATS(t, a) {
|
|
405
|
+
t.dataset.distributionFormats = a;
|
|
406
|
+
},
|
|
407
|
+
SET_DOCUMENTATIONS(t, a) {
|
|
408
|
+
t.dataset.documentations = a;
|
|
409
|
+
},
|
|
410
|
+
SET_FREQUENCY(t, a) {
|
|
411
|
+
t.dataset.frequency = a;
|
|
412
|
+
},
|
|
413
|
+
SET_HAS_QUALITY_ANNOTATIONS(t, a) {
|
|
414
|
+
t.dataset.hasQualityAnnotations = a;
|
|
415
|
+
},
|
|
416
|
+
SET_HAS_VERSION(t, a) {
|
|
417
|
+
t.dataset.hasVersion = a;
|
|
418
|
+
},
|
|
419
|
+
SET_ID(t, a) {
|
|
420
|
+
t.dataset.id = a;
|
|
421
|
+
},
|
|
422
|
+
SET_IDENTIFIERS(t, a) {
|
|
423
|
+
t.dataset.identifiers = a;
|
|
424
|
+
},
|
|
425
|
+
SET_ID_NAME(t, a) {
|
|
426
|
+
t.dataset.idName = a;
|
|
427
|
+
},
|
|
428
|
+
SET_IS_REFERENCED_BY(t, a) {
|
|
429
|
+
t.dataset.isReferencedBy = a;
|
|
430
|
+
},
|
|
431
|
+
SET_IS_VERSION_OF(t, a) {
|
|
432
|
+
t.dataset.isVersionOf = a;
|
|
433
|
+
},
|
|
434
|
+
SET_KEYWORDS(t, a) {
|
|
435
|
+
t.dataset.keywords = a;
|
|
436
|
+
},
|
|
437
|
+
SET_LANDING_PAGES(t, a) {
|
|
438
|
+
t.dataset.landingPages = a;
|
|
439
|
+
},
|
|
440
|
+
SET_LANGUAGES(t, a) {
|
|
441
|
+
t.dataset.languages = a;
|
|
442
|
+
},
|
|
443
|
+
SET_LICENCES(t, a) {
|
|
444
|
+
t.dataset.licences = a;
|
|
445
|
+
},
|
|
446
|
+
SET_MODIFICATION_DATE(t, a) {
|
|
447
|
+
t.dataset.modificationDate = a;
|
|
448
|
+
},
|
|
449
|
+
SET_NUM_SERIES(t, a) {
|
|
450
|
+
t.dataset.numSeries = a;
|
|
451
|
+
},
|
|
452
|
+
SET_ORIGINAL_LANGUAGE(t, a) {
|
|
453
|
+
t.dataset.originalLanguage = a;
|
|
454
|
+
},
|
|
455
|
+
SET_OTHER_IDENTIFIERS(t, a) {
|
|
456
|
+
t.dataset.otherIdentifiers = a;
|
|
457
|
+
},
|
|
458
|
+
SET_PAGES(t, a) {
|
|
459
|
+
t.dataset.pages = a;
|
|
460
|
+
},
|
|
461
|
+
SET_PROVENANCES(t, a) {
|
|
462
|
+
t.dataset.provenances = a;
|
|
463
|
+
},
|
|
464
|
+
SET_PUBLISHER(t, a) {
|
|
465
|
+
t.dataset.publisher = a;
|
|
466
|
+
},
|
|
467
|
+
SET_RELATED_RESOURCES(t, a) {
|
|
468
|
+
t.dataset.relatedResources = a;
|
|
469
|
+
},
|
|
470
|
+
SET_RELEASE_DATE(t, a) {
|
|
471
|
+
t.dataset.releaseDate = a;
|
|
472
|
+
},
|
|
473
|
+
SET_RESOURCE(t, a) {
|
|
474
|
+
t.dataset.resource = a;
|
|
475
|
+
},
|
|
476
|
+
SET_SOURCES(t, a) {
|
|
477
|
+
t.dataset.sources = a;
|
|
478
|
+
},
|
|
479
|
+
SET_SPATIAL(t, a) {
|
|
480
|
+
t.dataset.spatial = a;
|
|
481
|
+
},
|
|
482
|
+
SET_SPATIAL_RESOURCE(t, a) {
|
|
483
|
+
t.dataset.spatialResource = a;
|
|
484
|
+
},
|
|
485
|
+
SET_STAT_UNIT_MEASURES(t, a) {
|
|
486
|
+
t.dataset.statUnitMeasures = a;
|
|
487
|
+
},
|
|
488
|
+
SET_TEMPORAL(t, a) {
|
|
489
|
+
t.dataset.temporal = a;
|
|
490
|
+
},
|
|
491
|
+
SET_TRANSLATION_META_DATA(t, a) {
|
|
492
|
+
t.dataset.translationMetaData = a;
|
|
493
|
+
},
|
|
494
|
+
SET_TITLE(t, a) {
|
|
495
|
+
t.dataset.title = a;
|
|
496
|
+
},
|
|
497
|
+
SET_VERSION_INFO(t, a) {
|
|
498
|
+
t.dataset.versionInfo = a;
|
|
499
|
+
},
|
|
500
|
+
SET_VERSION_NOTES(t, a) {
|
|
501
|
+
t.dataset.versionNotes = a;
|
|
502
|
+
},
|
|
503
|
+
SET_VISUALISATIONS(t, a) {
|
|
504
|
+
t.dataset.visualisations = a;
|
|
505
|
+
},
|
|
506
|
+
SET_WAS_GENERATED_BY(t, a) {
|
|
507
|
+
t.dataset.wasGeneratedBy = a;
|
|
508
|
+
},
|
|
509
|
+
SET_SIMILAR_DATASETS_REQUESTED(t, a) {
|
|
510
|
+
t.dataset.similarDatasetsRequested = a;
|
|
511
|
+
},
|
|
512
|
+
SET_SIMILAR_DATASETS(t, a) {
|
|
513
|
+
t.dataset.similarDatasets = a;
|
|
514
|
+
},
|
|
515
|
+
SET_SD_DESCRIPTION(t, a) {
|
|
516
|
+
if (_(a, "id") && _(a, "description")) {
|
|
517
|
+
const s = a.id, T = a.description;
|
|
518
|
+
if (r(t.dataset.similarDatasets)) {
|
|
519
|
+
const i = t.dataset.similarDatasets.filter((e) => e.id === s)[0];
|
|
520
|
+
l(i) && (i.description = T);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
SET_SD_TITLE(t, a) {
|
|
525
|
+
if (_(a, "id") && _(a, "title")) {
|
|
526
|
+
const s = a.id, T = a.title;
|
|
527
|
+
if (r(t.dataset.similarDatasets)) {
|
|
528
|
+
const i = t.dataset.similarDatasets.filter((e) => e.id === s)[0];
|
|
529
|
+
l(i) && (i.title = T);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
SET_SD_DISTRIBUTION_FORMATS(t, a) {
|
|
534
|
+
if (_(a, "id") && _(a, "distributionFormats")) {
|
|
535
|
+
const s = a.id, T = a.distributionFormats;
|
|
536
|
+
if (r(t.dataset.similarDatasets)) {
|
|
537
|
+
const i = t.dataset.similarDatasets.filter((e) => e.id === s)[0];
|
|
538
|
+
l(i) && (i.distributionFormats = T);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
SET_ACTIVE_NAVIGATION_TAB(t, a) {
|
|
543
|
+
t.activeNavigationTab = a;
|
|
544
|
+
},
|
|
545
|
+
SET_LOADING(t, a) {
|
|
546
|
+
t.loading = a;
|
|
547
|
+
},
|
|
548
|
+
SET_QUALITY_DATA_REQUESTED(t, a) {
|
|
549
|
+
t.dataset.qualityDataRequested = a;
|
|
550
|
+
},
|
|
551
|
+
SET_QUALITY_DATA(t, a) {
|
|
552
|
+
t.dataset.qualityData = a;
|
|
553
|
+
},
|
|
554
|
+
SET_QUALITY_DISTRIBUTION_DATA(t, a) {
|
|
555
|
+
t.dataset.qualityDistributionData = a;
|
|
556
|
+
},
|
|
557
|
+
SET_IS_DQV_DATA_REQUESTED(t, a) {
|
|
558
|
+
t.dataset.isDQVDataRequested = a;
|
|
559
|
+
},
|
|
560
|
+
SET_IS_DQV_DATA_RDF_AVAILABLE(t, a) {
|
|
561
|
+
t.dataset.isDQVDataRDFAvailable = a;
|
|
562
|
+
},
|
|
563
|
+
SET_IS_DQV_DATA_TTL_AVAILABLE(t, a) {
|
|
564
|
+
t.dataset.isDQVDataTTLAvailable = a;
|
|
565
|
+
},
|
|
566
|
+
SET_IS_DQV_DATA_N3_AVAILABLE(t, a) {
|
|
567
|
+
t.dataset.isDQVDataN3Available = a;
|
|
568
|
+
},
|
|
569
|
+
SET_IS_DQV_DATA_NT_AVAILABLE(t, a) {
|
|
570
|
+
t.dataset.isDQVDataNTAvailable = a;
|
|
571
|
+
},
|
|
572
|
+
SET_IS_DQV_DATA_JSONLD_AVAILABLE(t, a) {
|
|
573
|
+
t.dataset.isDQVDataJSONLDAvailable = a;
|
|
574
|
+
},
|
|
575
|
+
SET_CATALOG_RECORD(t, a) {
|
|
576
|
+
t.dataset.catalogRecord = a;
|
|
577
|
+
},
|
|
578
|
+
SET_ADMS_IDENTIFIERS(t, a) {
|
|
579
|
+
t.dataset.admsIdentifiers = a;
|
|
580
|
+
},
|
|
581
|
+
SET_DEADLINE(t, a) {
|
|
582
|
+
t.dataset.deadline = a;
|
|
583
|
+
},
|
|
584
|
+
SET_GEOCODING_DESCRIPTION(t, a) {
|
|
585
|
+
t.dataset.geocodingDescription = a;
|
|
586
|
+
},
|
|
587
|
+
SET_QUALIFIED_ATTRIBUTIONS(t, a) {
|
|
588
|
+
t.dataset.qualifiedAttributions = a;
|
|
589
|
+
},
|
|
590
|
+
SET_QUALIFIED_RELATIONS(t, a) {
|
|
591
|
+
t.dataset.qualifiedRelations = a;
|
|
592
|
+
},
|
|
593
|
+
SET_RELATIONS(t, a) {
|
|
594
|
+
t.dataset.relations = a;
|
|
595
|
+
},
|
|
596
|
+
SET_SAMPLE(t, a) {
|
|
597
|
+
t.dataset.sample = a;
|
|
598
|
+
},
|
|
599
|
+
SET_SPATIAL_RESOLUTION_IN_METERS(t, a) {
|
|
600
|
+
t.dataset.spatialResolutionInMeters = a;
|
|
601
|
+
},
|
|
602
|
+
SET_SUBJECT(t, a) {
|
|
603
|
+
t.dataset.subject = a;
|
|
604
|
+
},
|
|
605
|
+
SET_TEMPORAL_RESOLUTION(t, a) {
|
|
606
|
+
t.dataset.temporalResolution = a;
|
|
607
|
+
},
|
|
608
|
+
SET_THEME(t, a) {
|
|
609
|
+
t.dataset.theme = a;
|
|
610
|
+
},
|
|
611
|
+
SET_TYPE(t, a) {
|
|
612
|
+
t.dataset.type = a;
|
|
613
|
+
},
|
|
614
|
+
SET_EXTENDET_METADATA(t, a) {
|
|
615
|
+
t.dataset.extendetMetadata = a;
|
|
616
|
+
},
|
|
617
|
+
SET_DISTRIBUTION_DOWNLOAD_AS(t, a) {
|
|
618
|
+
t.dataset.distributionDownloadAs = a;
|
|
619
|
+
},
|
|
620
|
+
SET_DISTRIBUTION_DOWNLOAD_AS_OPTIONS(t, a) {
|
|
621
|
+
t.dataset.distributionDownloadAsOptions = a;
|
|
622
|
+
},
|
|
623
|
+
SET_DATASET_DESCRIPTION_HEIGHT(t, a) {
|
|
624
|
+
t.dataset.descriptionHeight = a;
|
|
625
|
+
},
|
|
626
|
+
SET_IS_HVD(t, a) {
|
|
627
|
+
t.dataset.isHvd = a;
|
|
628
|
+
},
|
|
629
|
+
SET_APPLICABLE_LEGISLATION(t, a) {
|
|
630
|
+
t.dataset.applicableLegislation = [...a];
|
|
631
|
+
},
|
|
632
|
+
SET_HVD_CATEGORY(t, a) {
|
|
633
|
+
t.dataset.hvdCategory = [...a];
|
|
634
|
+
}
|
|
635
|
+
}, U = {
|
|
636
|
+
namespaced: !0,
|
|
637
|
+
state: u,
|
|
638
|
+
actions: O,
|
|
639
|
+
mutations: L,
|
|
640
|
+
getters: N
|
|
641
|
+
};
|
|
642
|
+
export {
|
|
643
|
+
U as default
|
|
644
|
+
};
|