Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • kit/ki-allianz/datenplattform-core/piveau-hub/piveau-ui
  • till.riedel/piveau-ui
2 results
Select Git revision
Show changes
Commits on Source (68)
Showing
with 3307 additions and 224 deletions
Subproject commit 213dd60b390a07693073693d9c4900ad5a3121a1
Subproject commit e96c223892da865321050e1574478fe5044bf156
## [4.6.41](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.40...v4.6.41) (2025-04-23)
## [4.6.40](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.39...v4.6.40) (2025-04-23)
## [4.6.39](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.38...v4.6.39) (2025-04-22)
## [4.6.38](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.37...v4.6.38) (2025-04-22)
## [4.6.37](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.36...v4.6.37) (2025-04-17)
## [4.6.36](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.35...v4.6.36) (2025-04-17)
## [4.6.35](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.34...v4.6.35) (2025-04-16)
## [4.6.34](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.32...v4.6.34) (2025-04-16)
### Bug Fixes
* edit endpoint updated ([80ab1da](https://gitlab.com/piveau/ui/piveau-ui/commit/80ab1daea1663557c047cfbcf7694bc679f0580b))
### Features
* add comment moderation button to DPI menu if the comment service is activated ([803df7f](https://gitlab.com/piveau/ui/piveau-ui/commit/803df7fd3fa78189f36845021a8ad1ba2d7fac20))
## [4.6.32](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.30...v4.6.32) (2025-04-09)
### Bug Fixes
* remove unsupported formats ([e742c3d](https://gitlab.com/piveau/ui/piveau-ui/commit/e742c3d7b53f5694bdfb36abc8b8912e5d4e3e74))
### Features
* add compressFormat to the call from frontend to the backend to allow visualisation of compressed files ([275e0ba](https://gitlab.com/piveau/ui/piveau-ui/commit/275e0baa58947d45094f03cc5a316549a40c935a))
## [4.6.30](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.29...v4.6.30) (2025-04-01)
### Features
* added MinDate, MaxDate support in Dataset setter for advanced search in DEU ([8a8c7aa](https://gitlab.com/piveau/ui/piveau-ui/commit/8a8c7aa82860eec208720e830b49a04a5e187556))
## [4.6.29](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.28...v4.6.29) (2025-03-24)
### Bug Fixes
* **dataproviderInterface:** fixed the error that lead to the missing accessurl properties ([b0affd5](https://gitlab.com/piveau/ui/piveau-ui/commit/b0affd5b1de5621afd852e3031a41cd5e44bf241))
* **inputconverter:** needed to rework the inputconverter to make sure all the dates in the distribution are 'dateTime' types ([2ae71ea](https://gitlab.com/piveau/ui/piveau-ui/commit/2ae71ea1fd53a1b28f4460cb99809c65ae0fddcb))
* **Vocabularies:** Fixed the displaying of the dataset-status vocabulary for specific datasets ([df9d608](https://gitlab.com/piveau/ui/piveau-ui/commit/df9d608bf3a697832c891a19a7bcfdf4e7cbbb51))
## [4.6.28](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.27...v4.6.28) (2025-03-21)
## [4.6.27](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.26...v4.6.27) (2025-03-19)
### Bug Fixes
* **DatasetFacets:** provide missing DatasetFacets slot props of 'facet' ([f13f8ee](https://gitlab.com/piveau/ui/piveau-ui/commit/f13f8ee47140adf2d7911ffd3613dec472258b65))
## [4.6.26](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.25...v4.6.26) (2025-03-19)
## [4.6.25](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.24...v4.6.25) (2025-03-19)
### Bug Fixes
* remove debugger statements ([ce2eb34](https://gitlab.com/piveau/ui/piveau-ui/commit/ce2eb3408c6ee4cb70b481802fc8238dd6baa2ae))
## [4.6.24](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.23...v4.6.24) (2025-03-07)
### Bug Fixes
* **dpi:** address issue that caused file upload to fail when creating new datasets ([e7aae58](https://gitlab.com/piveau/ui/piveau-ui/commit/e7aae58a3d39debd5effbca93436274081316782))
## [4.6.23](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.22...v4.6.23) (2025-03-04)
## [4.6.22](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.21...v4.6.22) (2025-02-26)
### Bug Fixes
* **dpi:** remove dcat:catalog dependencies when writing/reading datasets ([4238d6c](https://gitlab.com/piveau/ui/piveau-ui/commit/4238d6c2d7faf374c79a0bfaab82f7b841c7db99))
## [4.6.21](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.20...v4.6.21) (2025-02-25)
......@@ -38,11 +162,7 @@
## [4.6.15](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.14...v4.6.15) (2025-02-18)
## [4.6.14](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.13...v4.6.14) (2025-02-18)
## [4.6.15](https://gitlab.com/piveau/ui/piveau-ui/compare/v4.6.13...v4.6.15) (2025-02-18)
......
......@@ -9,6 +9,7 @@ export const facetSchema = z.object({
useDatasetFacets: z.boolean().default(true),
useDatasetFacetsMap: z.boolean().default(true),
showClearButton: z.boolean().default(false),
showExternalLinkIcon: z.boolean().default(false),
showFacetsTitle: z.boolean().default(false),
cutoff: z.coerce.number().default(5),
MIN_FACET_LIMIT: z.coerce.number().default(10),
......@@ -121,6 +122,7 @@ const datasetDetailsDistributionsSchema = z.object({
descriptionMaxLines: z.coerce.number().default(3),
descriptionMaxChars: z.coerce.number().default(250),
showValidationButton: z.boolean().default(false),
licencingAssistantUrl: z.string().default(''),
}).default({})
const datasetDetailsDownloadAsSchema = z.object({
......
......@@ -122,6 +122,7 @@ export default defineComponent({
edit: {
enabled: route.query.edit === 'true',
id: route.query.id as string || undefined,
catalog: route.query.catalog as string || undefined,
fromDraft: route.query.fromDraft === 'true',
},
..._dpiContext
......
<template>
</template>
<script setup>
</script>
<style scoped>
button{
position: absolute;
top: 8.8rem;
right: 2rem;
}
</style>
\ No newline at end of file
......@@ -25,13 +25,14 @@
</li>
</ul>
<div class="d-flex flex-column w-100">
<div v-for="(stepName, index) in getNavSteps($env.content.dataProviderInterface.specification).distributions"
:key="index">
<div v-for="(stepName, i) in getNavSteps($env.content.dataProviderInterface.specification).distributions"
:key="i">
<InputPageStep :name="stepName">
<!-- <PropertyChooser></PropertyChooser> -->
<FormKitSchema :schema="schema[stepName]" :library="library" />
<p v-if="stepName === 'Mandatory'" class="p-1"> <b>*</b> {{ $t('message.dataupload.steps.MandatoryStep')
}}</p>
}}</p>
</InputPageStep>
</div>
</div>
......@@ -53,7 +54,7 @@
</template>
<script>
import { defineComponent, markRaw } from 'vue';
import { defineComponent, markRaw, reactive } from 'vue';
import { mapGetters } from 'vuex';
import { useDpiStepper } from '../composables/useDpiStepper';
import InputPageStep from '../components/InputPageStep.vue';
......@@ -99,7 +100,8 @@ export default defineComponent({
.replace(/^./, (match) => match.toUpperCase())
.trim(),
isActive: false,
indexOfDis: 1
indexOfDis: 1,
}
},
methods: {
......@@ -174,7 +176,6 @@ export default defineComponent({
checkStepValidity,
goToNextStep,
goToPreviousStep,
library,
}
}
......
<template>
<div class="position-relative w-100 ">
<FormKit name="mode" validation="required" type="text" class="selectInputField formkit-inner " readonly="readonly"
@click="triggerDropdown()" :placeholder="t('message.dataupload.info.preferredInput')" v-model="inputChoice" :validation-messages="{
......@@ -26,7 +25,7 @@
<input type="text" v-model="context.model" @blur="context.blurHandler" hidden />
<div class="file-div position-relative">
<input class="mt-3" type="file" id="aUrlFL" name="fileUpload" @change="validateFile($event)"
:accept="validExtensions">
:accept="validExtensions" :disabled="isLoading || !catalogId">
<div class="upload-feedback position-absolute d-flex" style="right: 0">
<div v-if="isLoading" class="lds-ring">
</div>
......@@ -58,13 +57,14 @@ import axios from 'axios';
import helper from '../utils/general-helper'
import { getNode } from '@formkit/core'
import { reactive, ref, onMounted, computed } from 'vue';
import { reactive, ref, onMounted, computed, defineComponent } from 'vue';
import { onClickOutside } from '@vueuse/core'
import { useRuntimeEnv } from "../../composables/useRuntimeEnv.ts";
import { FormKit } from '@formkit/vue';
import { FormKit, useFormKitNodeById } from '@formkit/vue';
import { useI18n } from 'vue-i18n';
import { useDpiContext } from '../composables';
export default {
export default defineComponent({
props: {
context: {
type: Object,
......@@ -96,9 +96,6 @@ export default {
...mapGetters('dpiStore', [
'getData',
]),
getCatalogue() {
return getNode('dcat:catalog').value;
}
},
methods: {
...mapActions('dpiStore', [
......@@ -202,7 +199,7 @@ export default {
return await this.uploadFile(file, {
method: 'PUT',
url: `${this.$env.api.fileUploadUrl}data/${fileId}?catalog=${this.getCatalogue}`,
url: `${this.$env.api.fileUploadUrl}data/${fileId}?catalog=${this.catalogId}`,
});
}
......@@ -217,7 +214,7 @@ export default {
const form = new FormData();
form.append('file', file);
const catalog = this.getCatalogue;
const catalog = this.catalogId;
const token = this.getUserData.rtpToken;
const resolvedOptions = {
......@@ -287,14 +284,26 @@ export default {
drop.active = !drop.active
}
const dpiContext = useDpiContext();
const catalogIdFromFormkit = useFormKitNodeById('catalog')
const catalogId = computed(() =>
// Extract from catalog input field
catalogIdFromFormkit?.value.value
// Try to recover if catalog is empty for some reason
|| dpiContext.value.edit?.catalog
);
return {
drop,
onClickOutside,
triggerDropdown,
t
t,
catalogId,
};
}
};
},
});
</script>
<style lang="scss" scoped>
......
......@@ -62,6 +62,7 @@ import axios from 'axios';
import { ref, nextTick } from 'vue'
import { getCurrentInstance } from "vue";
import { useI18n } from 'vue-i18n';
import { useDpiContext } from '../composables/useDpiContext';
export default {
name: 'Navigation',
......@@ -169,13 +170,17 @@ export default {
const datasetId = this.getData(this.property)['datasetID'];
const title = this.getData(this.property)['dct:title'];
const description = this.getData(this.property)['dct:description'];
const catalogName = this.getData(this.property)['dcat:catalog'] ? this.getData(this.property)['dcat:catalog'] : '';
const catalogId =
this.dpiContext.edit?.catalog
|| this.getData(this.property)['catalog']
|| this.getData(this.property)['dcat:catalog']
|| this.getData(this.property)['dct:catalog']
let uploadUrl;
let actionName;
let actionParams = {
id: datasetId,
catalog: catalogName,
catalog: catalogId,
body: RDFdata,
title,
description,
......@@ -184,25 +189,43 @@ export default {
if (mode === 'dataset') {
// if no edit mode: just publish dataset regularly
// if edit mode but no draft: publish/save dataset regularly
if (!this.getIsEditMode || (this.getIsEditMode && !this.getIsDraft) || (this.getIsEditMode && this.getIsDraft && localStorage.getItem('dpi_duplicate'))) {
uploadUrl = `${this.$env.api.hubUrl}datasets?id=${datasetId}&catalogue=${catalogName}`;
// if (!this.getIsEditMode || (this.getIsEditMode && !this.getIsDraft) || (this.getIsEditMode && this.getIsDraft && localStorage.getItem('dpi_duplicate'))) {
// uploadUrl = `${this.$env.api.hubUrl}datasets?id=${datasetId}&catalogue=${catalogId}`;
// actionParams = { data: RDFdata, token: rtpToken, url: uploadUrl };
// actionName = 'auth/createDataset';
// }
if (!this.getIsEditMode) {
uploadUrl = `${this.$env.api.hubUrl}datasets?id=${datasetId}&catalogue=${catalogId}`;
actionParams = { data: RDFdata, token: rtpToken, url: uploadUrl };
actionName = 'auth/createDataset';
}
// if edit mode but no draft
else if (this.getIsEditMode && !this.getIsDraft) {
uploadUrl = `${this.$env.api.hubUrl}datasets/${datasetId}`;
actionParams = { data: RDFdata, token: rtpToken, url: uploadUrl };
actionName = 'auth/createDataset';
}
// if edit mode and draft
else if (this.getIsEditMode && this.getIsDraft && localStorage.getItem('dpi_duplicate')) {
uploadUrl = `${this.$env.api.hubUrl}datasets?id=${datasetId}&catalogue=${catalogId}`;
actionParams = { data: RDFdata, token: rtpToken, url: uploadUrl };
actionName = 'auth/createDataset';
} else {
// if edit mode and draft: publish user draft (remove from draft database and add to dataset database)-> publishUserDraftById
actionParams = { id: datasetId, catalog: catalogName };
actionName = 'auth/publishUserDraftById';
}
else {
// if edit mode and draft: publish user draft (remove from draft database and add to dataset database)-> publishUserDraftById
actionParams = { id: datasetId, catalog: catalogId };
actionName = 'auth/publishUserDraftById';
}
} else if (mode === 'draft') {
//if no edit mode: save draft regularly
// if edit mode and draft: save draft regularly
if (!this.getIsEditMode || (this.getIsEditMode && this.getIsDraft)) {
uploadUrl = `${this.$env.api.hubUrl}drafts/datasets/${datasetId}?catalogue=${catalogName}`;
uploadUrl = `${this.$env.api.hubUrl}drafts/datasets/${datasetId}?catalogue=${catalogId}`;
actionName = 'auth/createUserDraft';
} else {
// if edit mode and no draft: save dataset as draft (remove from dataset database and add to draft database)-> putDatasetToDraft
actionParams = { id: datasetId, catalog: catalogName, title, description };
actionParams = { id: datasetId, catalog: catalogId, title, description };
actionName = 'auth/putDatasetToDraft';
}
......@@ -283,6 +306,10 @@ export default {
return isUniqueID
}
},
setup() {
const dpiContext = useDpiContext()
return { dpiContext }
}
};
</script>
......
......@@ -6,7 +6,7 @@
<div v-if="isReady">
<!-- Hidden input that contains the actual catalog id. We rely on that to pass the catalog id to backend later -->
<FormKit v-show="false" v-model="selectedCatalogId" :name="`${props.context.node.name}`" type="text" />
<FormKit v-show="false" v-model="selectedCatalogId" :name="`${props.context.node.name}`" :id="`${props.context.node.id || props.context.node.name}`" type="text" />
<!-- User-facing input that displays the name of the selected catalog -->
<FormKit
......@@ -138,8 +138,12 @@ onMounted(async () => {
// So we need to wait until everything is fetched before proceeding further.
await filterCatList()
await nextTick()
// todo: can this be made more robust by using dpiContext.value.edit?.id?
const catalogIdToLoadForEdit = getNode?.('dcat:catalog')?.value || undefined
const catalogIdToLoadForEdit =
dpiContext.value.edit?.catalog
|| getNode?.('catalog')?.value
|| getNode?.('dcat:catalog')?.value
|| getNode?.('dct:catalog')?.value
|| undefined
const maybeFoundCatalogFromQuery = authorizedCatalogs.value?.find(item => item.id === catalogIdToLoadForEdit)
if (maybeFoundCatalogFromQuery) {
setvalue({ id: maybeFoundCatalogFromQuery.id, name: maybeFoundCatalogFromQuery.name })
......
<template>
<div class="formkitProperty">
<h4 class="">Tag</h4>
<div class="formkitCmpWrap d-flex p-3 w-100">
<div class="formkit-inner">
<input readonly="" placeholder="Wählen Sie die Art des Widgets aus" class="formkit-input" type="text"
name="mode" aria-required="true" :value="widgetType" aria-describedby="input_164-rule_required"
@click="activeList = !activeList">
<ul ref="dropdownListWidget" v-show="activeList" class="autocompleteResultList">
<li v-for="match in matches" :key="match" @click="setValue(match); activeList = !activeList"
class="p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC">{{ match
}}
</li>
</ul>
</div>
<!-- Liste Distribution/ Widget/ Report --- leading kann nur 1 sein und auch nur ein widget -->
<button class="ml-3 widgetButton" v-if="widgetType === 'Widget'"
:class="{ activeLeading: props.context.value && props.context.value['lead'] === 'true' }" type="button" @click="isLeading">
Leading
</button>
</div>
</div>
</template>
<script setup>
import { ref, watch } from 'vue';
import { getNode } from '@formkit/core'
const props = defineProps({
context: Object
})
let disList = ref(getNode('Distributions').value['distributionList'])
let activeButton = ref(false)
const isLeading = () => {
checkForLead()
// console.log(!activeLeadingWidget.value);
if (!activeLeadingWidget.value) {
props.context.node.input({ '@Tag': 'LeadingWidget', 'lead': 'true' })
activeButton.value = !activeButton.value
} else {
activeLeadingWidget.value = false
activeButton.value = false
widgetType.value = "Widget"
props.context.node.input({ '@Tag': 'Widget', 'lead': 'false' })
}
}
const activeList = ref(false)
const matches = ref(['Distribution', 'Widget', 'Report'])
let activeLeadingWidget = ref(false)
let widgetType = ref('')
// Init every dis as distribution if there's nothing set - default state
// console.log(props.context.value);
if (props.context.value != undefined) {
if (props.context.value['@Tag'] === 'LeadingWidget') {
widgetType.value = 'Widget'
} else widgetType.value = props.context.value['@Tag']
} else widgetType.value = 'Distribution'
// console.log(widgetType.value);
const checkForLead = () => {
disList.value = getNode('Distributions').value['distributionList']
for (let index = 0; index < disList.value.length; index++) {
try {
if (disList.value[index]['Mandatory']['pv:distributionType']['lead'] != undefined || disList.value[index]['Mandatory']['pv:distributionType']['lead'] === "true") {
activeLeadingWidget.value = true
}
} catch (error) {
}
// console.log('Is lead?',disList.value[index]['Mandatory']['pv:distributionType']['lead'], activeLeadingWidget.value);
}
}
checkForLead()
const setValue = (item) => {
// console.log('Item ####', item);
checkForLead()
props.context.node.input(item)
widgetType.value = item
}
</script>
<style scoped>
.formkit-inner:focus-within {
margin-top: 0;
}
.formkit-inner {
flex-grow: 1;
}
.formkitCmpWrap {
position: relative;
}
.widgetButton {
border-color: lightgray;
&:hover {
background-color: green;
color: white;
}
}
.activeLeading {
background-color: green;
color: white;
border-color: green;
}
</style>
\ No newline at end of file
......@@ -28,11 +28,11 @@ export const autocompleteKey = Symbol(
) as InjectionKey<AutocompleteInstance>;
export function defaultAutocompleteAdapter(options: {
envs: ResolvedConfig
dpiContext: ComputedDpiContext
envs: ResolvedConfig;
dpiContext: ComputedDpiContext;
}): AutocompleteOptions {
const { envs, dpiContext } = options
const { envs, dpiContext } = options;
return {
name: "default",
adapter: {
......@@ -50,6 +50,8 @@ export function defaultAutocompleteAdapter(options: {
() => toValue(dpiContext)?.specification
);
// console.log('Options:', voc, uri);
// // Catching invalid URIs
if (voc === undefined) return;
if (voc === "application") return;
......@@ -57,9 +59,10 @@ export function defaultAutocompleteAdapter(options: {
let req = "";
// vocabularies for spdx checksum and inana-media-types are structured differently in the backend then other vocabularies
if (voc === "iana-media-types" || voc === "spdx-checksum-algorithm") {
if (voc === "iana-media-types" || voc === "spdx-checksum-algorithm" || voc ==='dataset-status') {
req = `${envs.api.baseUrl}vocabularies/${voc}`;
} else {
}
else {
const value = uri.replace(
(specification.value.vocabPrefixes as any)[voc],
""
......@@ -72,7 +75,12 @@ export function defaultAutocompleteAdapter(options: {
envs.api.baseUrl
}vocabularies/${voc}/vocable?resource=${encodeURIComponent(uri)}`;
}
return axios.get(req);
let result = axios.get(req);
// console.log("#### Req:", req);
return result;
},
},
};
......
......@@ -14,6 +14,7 @@ export interface DpiContext {
specificationName: string
edit?: {
enabled?: boolean
catalog?: string
id?: string
fromDraft?: boolean
}
......
......@@ -1097,8 +1097,10 @@ const dcatapProperties: InputDefinition = {
catalog: {
identifier: 'catalog',
$formkit: 'simpleSelect',
name: 'dcat:catalog',
id: 'dcat:catalog',
// Intentionally not setting something like dcat:catalog here
// Because we don't neeed catalog to be part of the payload
name: 'catalog',
id: 'catalog',
placeholder: 'Catalog',
classes: { outer: 'formkitProperty formkitCmpWrap mx-0 my-3 p-3' }
},
......
......@@ -1344,8 +1344,10 @@ const dcatapProperties: InputDefinition = {
catalog: {
identifier: 'catalog',
$formkit: 'simpleSelect',
name: 'dcat:catalog',
id: 'dcat:catalog',
// Intentionally not setting something like dcat:catalog here
// Because we don't neeed catalog to be part of the payload
name: 'catalog',
id: 'catalog',
class: 'property mandatory',
options: {},
classes: { outer: 'formkitProperty formkitCmpWrap mx-0 my-3 p-3' }
......
// all properties which value is a single URI
const singularURI = {
datasets: [
"dct:accrualPeriodicity",
"dct:accessRights",
"dct:type",
"dcatap:availability",
"dcatde:qualityProcessURI",
// singular URIs nested within other properties
'vcard:hasEmail', // contact point
'vcard:hasURL', // contect point
'dext:isUsedBy', // isUsedBy
'foaf:mbox', // creator, publisher
'foaf:homepage', // creator, publisher
'dct:format', // page
],
distributions: [
"dct:format",
"dct:type",
"dcat:mediaType",
"dcatap:availability",
"dcat:compressFormat",
"dcat:packageFormat",
"adms:status",
// singular URIs nested within other properties
'spdx:algorithm', // checksum
'dcat:endpointURL', // accessservice
"skos:exactMatch", // license,
'dct:license'
],
catalogues: [
'foaf:homepage', // homepage and creator
'dct:isPartOf',
// singular URIs nested within other properties
'foaf:mbox', // creator
'dct:format', // page
"skos:exactMatch", // license
],
};
// all properties with multiple URI values
const multipleURI = {
datasets: [
"dcatde:politicalGeocodingLevelURI",
"dcatde:politicalGeocodingURI",
"dcatde:contributorID",
"dct:language",
"dct:subject",
"dcat:theme",
"dct:source",
"dcat:landingPage",
"dct:relation",
"dcat:qualifiedRelation",
"prov:qualifiedAttribution",
"dct:isReferencedBy",
"prov:wasGeneratedBy",
"dct:isVersionOf",
"dct:hasVersion",
"dct:references",
"dct:spatial",
],
distributions: [
"dcat:accessURL",
"dcat:downloadURL",
"dct:language",
"odrl:hasPolicy",
],
catalogues: [
"dct:hasPart",
'dcat:catalog',
'dct:language',
'dct:spatial',
],
};
// all properties which are typed strings
const typedStrings = {
datasets: [
"dct:issued",
"dct:modified",
"dcat:spatialResolutionInMeters",
// nested typed strings
'dcat:endDate',
'dcat:startDate',
],
distributions: [
"dct:issued",
"dct:modified",
"dcat:spatialResolutionInMeters",
"pv:distributionType",
"pv:isLeading",
"dcat:byteSize",
],
catalogues: [],
};
// all properties with a singular string
const singularString = {
datasets: [
"owl:versionInfo",
// nested singulat strings
'vcard:fn', // contactPoint
'vcard:hasOrganizationName', // contactPoint
'vcard:hasTelephone', // contactPoint
"vcard:country_name", // hasAddress
"vcard:locality", // hasAddress
"vcard:postal_code", // hasAddress
"vcard:street_address", // hasAddress
'rdfs:label', // conformsTo and provenance
'foaf:name', // creator, publisher
],
distributions: [
// nested singular string
'spdx:checksumValue', //checksum
'rdfs:label', // rights !!!
"skos:prefLabel", //license
],
catalogues: [
// nested singular strings
'rdfs:label', // conformsTo and rights
'foaf:name', // creator
"skos:prefLabel", // license
],
};
// all properties which can be provided in different languages
const multilingualStrings = {
datasets: [
"dct:title", // also nested within page
"dct:description", // also nested within page
"dcat:keyword",
"adms:versionNotes",
"dcatde:geocodingDescription",
"dcatde:legalBasis",
],
distributions: [
"dct:title", // also nested within page
"dct:description", // also nested within page
"dcatde:licenseAttributionByText",
],
catalogues: [
'dct:title',
'dct:description',
],
};
// all properties which contain grouped values
const groupedProperties = {
datasets: [
'dcat:contactPoint',
'dct:creator',
'dext:metadataExtension',
'dct:provenance',
'dct:conformsTo',
'foaf:page',
'dct:temporal',
'adms:identifier',
// nested grouped properties
'vcard:hasAddress',
'skos:notation',
"dct:contributor",
"dcatde:originator",
"dcatde:maintainer",
],
distributions: [
'foaf:page',
'dcat:accessService',
'spdx:checksum',
'dct:conformsTo',
],
catalogues: [
'dct:creator',
'dct:conformsTo',
]
};
// some properties provide the ability to choose the input type and therefore the respective fields which will be provided
const conditionalProperties = {
datasets: [
'dct:publisher',
],
distributions: [],
catalogues: [
'dct:publisher',
'dct:license'
],
}
// some properties have additional statement included which must be added to the linked data
const additionalPropertyTypes = {
'dct:temporal': 'dct:PeriodOfTime',
'dct:conformsTo': 'dct:Standard',
'foaf:page': 'foaf:Document',
'dct:provenance': 'dct:ProvenanceStatement',
'dext:metadataExtension': 'dext:MetadataExtension',
'spdx:checksum': 'spdx:Checksum',
'dcat:accessService': 'dcat:DataService',
'dct:publisher': 'foaf:Agent',
}
// some inputs need URIs in diefferent formats
const URIformat = {
// {'name': '', 'resource': ''} mainly needed for vocabulary data
voc: [
'dct:publisher',
'dcat:theme',
"dct:accrualPeriodicity",
"dct:accessRights",
"dct:type",
"dct:format",
"dcat:mediaType",
"dcatap:availability",
"dcat:compressFormat",
"dcat:packageFormat",
'spdx:algorithm',
"dct:subject",
"dct:language",
"adms:status",
"dct:spatial",
"dcatde:politicalGeocodingLevelURI",
"dcatde:contributorID",
"dcatde:politicalGeocodingURI",
'dct:license'
],
// 'URI' mainly used for mail addresses
string: [
'vcard:hasEmail',
'vcard:hasURL',
'foaf:mbox',
"skos:exactMatch",
'foaf:homepage',
'dext:isUsedBy',
'dcat:endpointURL',
'dcatde:qualityProcessURI',
],
// {'@id': ''} mainly used for repeated links
id: [
'dct:source',
"dcat:accessURL",
"dcat:downloadURL",
"odrl:hasPolicy",
"dct:hasPart",
'dcat:catalog',
"dct:source",
"dcat:landingPage",
"dct:relation",
"dcat:qualifiedRelation",
"prov:qualifiedAttribution",
"dct:isReferencedBy",
"prov:wasGeneratedBy",
"dct:isVersionOf",
"dct:hasVersion",
'dct:isPartOf',
"dct:references",
]
}
export default {
singularURI,
multipleURI,
typedStrings,
singularString,
multilingualStrings,
groupedProperties,
additionalPropertyTypes,
conditionalProperties,
URIformat,
};
\ No newline at end of file
const config = {
datasets: {
Mandatory: [ 'title', 'datasetID', 'description', 'catalog', 'publisher', 'theme', 'issued', 'modified' ],
Advised: [ 'politicalGeocodingLevelURI', 'politicalGeocodingURI', 'availabilityDE', 'contributorID', 'geocodingDescription', 'legalBasis', 'qualityProcessURI', 'references', 'contributor', 'originator', 'maintainer', 'keyword', 'contactPoint', 'landingPage', 'accrualPeriodicity', 'language', 'spatial', 'temporal', 'creator', 'identifier', 'admsIdentifier', 'page', 'accessRights' ],
Recommended: [ 'type', 'isUsedBy', 'conformsTo', 'versionInfo', 'versionNotes', 'temporalResolution', 'spatialResolutionInMeters', 'relation', 'qualifiedRelation', 'isReferencedBy', 'hasVersion', 'isVersionOf', 'source', 'provenance', 'qualifiedAttribution', 'wasGeneratedBy' ],
Distributions: [],
Overview: [ 'overview' ]
},
distributions: {
Mandatory: [ 'isWidget','isLeading','accessURL', 'title', 'description' ],
Advised: [ 'licence', 'licenseAttributionByText', 'downloadUrl', 'format', 'mediaType', 'status', 'availability', 'issued', 'modified' ],
Recommended: [ 'type', 'byteSize', 'checksum', 'compressFormat', 'packageFormat', 'language', 'page', 'conformsTo', 'rights', 'hasPolicy', 'temporalResolution', 'spatialResolutionInMeters' ],
DataService: [ 'accessService' ]
},
catalogues: {
Mandatory: [ 'title', 'availabilityCatDE', 'datasetID', 'description', 'publisher', 'language', 'homepage', 'licence' ],
Advised: [ 'spatial', 'hasPart', 'isPartOf', 'rights', 'catalog', 'creator' ],
Overview: ['overview']
}
};
export default config;
\ No newline at end of file
const prefixes = {
adms: "http://www.w3.org/ns/adms#",
dcat: "http://www.w3.org/ns/dcat#",
dcatap: "http://data.europa.eu/r5r/",
dct: "http://purl.org/dc/terms/",
foaf: "http://xmlns.com/foaf/0.1/",
locn: "http://www.w3.org/ns/locn#",
owl: "http://www.w3.org/2002/07/owl#",
odrl: "http://www.w3.org/ns/odrl/2/",
prov: "http://www.w3.org/ns/prov#",
rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
rdfs: "http://www.w3.org/2000/01/rdf-schema#",
schema: "http://schema.org/",
skos: "http://www.w3.org/2004/02/skos/core#",
spdx: "http://spdx.org/rdf/terms#",
xsd: "http://www.w3.org/2001/XMLSchema#",
vann: "http://purl.org/vocab/vann/",
voaf: "http://purl.org/vocommons/voaf#",
vcard: "http://www.w3.org/2006/vcard/ns#",
time: "http://www.w3.org/2006/time#",
dext: "https://data.europa.eu/ns/ext#",
dcatde: "http://dcat-ap.de/def/dcatde/",
pv: "https://piveau.eu/ns/voc#",
};
export default prefixes;
const vocabPrefixesDCATAPDE = {
"licence": "http://dcat-ap.de/def/licenses/",
"contributors": "http://dcat-ap.de/def/contributors/",
"dataset-type": "http://publications.europa.eu/resource/authority/dataset-type/",
"dataset-types": "http://dcat-ap.de/def/datasetTypes/",
"hash-algorithm": "http://dcat-ap.de/def/hashAlgorithms/",
"planned-availability": "http://dcat-ap.de/def/plannedAvailability/",
"political-geocoding-level": "http://dcat-ap.de/def/politicalGeocoding/Level/",
"political-geocoding-district-key": "http://dcat-ap.de/def/politicalGeocoding/districtKey/",
"political-geocoding-government-district-key": "http://dcat-ap.de/def/politicalGeocoding/governmentDistrictKey/",
"political-geocoding-municipal-association-key": "http://dcat-ap.de/def/politicalGeocoding/municipalAssociationKey/",
"political-geocoding-municipality-key": "http://dcat-ap.de/def/politicalGeocoding/municipalityKey/",
"political-geocoding-regional-key": "http://dcat-ap.de/def/politicalGeocoding/regionalKey/",
"political-geocoding-state-key": "http://dcat-ap.de/def/politicalGeocoding/",
"eurovoc": "http://eurovoc.europa.eu/",
"corporate-body": "http://publications.europa.eu/resource/authority/corporate-body/",
"continent": "http://publications.europa.eu/resource/authority/continent/",
"country": "http://publications.europa.eu/resource/authority/country/",
"place": "http://publications.europa.eu/resource/authority/place/",
"data-theme": "http://publications.europa.eu/resource/authority/data-theme/",
"access-right": "http://publications.europa.eu/resource/authority/access-right/",
"file-type": "http://publications.europa.eu/resource/authority/file-type/",
"frequency": "http://publications.europa.eu/resource/authority/frequency/",
"language": "http://publications.europa.eu/resource/authority/language/",
"notation-type": "http://publications.europa.eu/resource/authority/notation-type/",
"iana-media-types": "https://www.iana.org/assignments/media-types/",
"spdx-checksum-algorithm": "http://spdx.org/rdf/terms#",
"distribution-type": "http://publications.europa.eu/resource/authority/distribution-type/",
"dataset-status": "http://publications.europa.eu/resource/authority/dataset-status/",
};
export default vocabPrefixesDCATAPDE;