geonetwork-ui 2.4.0-dev.e97caaf2 → 2.4.0-dev.f5019723
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/esm2022/libs/api/metadata-converter/src/index.mjs +4 -1
- package/esm2022/libs/api/metadata-converter/src/lib/common/license.mjs +64 -0
- package/esm2022/libs/api/metadata-converter/src/lib/common/url.mjs +14 -0
- package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.mjs +254 -0
- package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/index.mjs +2 -0
- package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/namespaces.mjs +17 -0
- package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/read-parts.mjs +196 -0
- package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/utils/graph-utils.mjs +46 -0
- package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/utils/serialize-to-xml.mjs +74 -0
- package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/utils/uri.mjs +2 -0
- package/esm2022/libs/api/metadata-converter/src/lib/dcat-ap/write-parts.mjs +27 -0
- package/esm2022/libs/api/metadata-converter/src/lib/find-converter.mjs +11 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +10 -3
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.mjs +6 -6
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.mjs +7 -4
- package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.mjs +17 -29
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +8 -15
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +6 -6
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +54 -54
- package/esm2022/libs/api/metadata-converter/src/lib/xml-utils.mjs +35 -3
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +78 -39
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +41 -7
- package/esm2022/libs/common/domain/src/lib/model/record/contact.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
- package/esm2022/libs/data-access/gn4/src/fixtures/site.fixtures.mjs +5 -5
- package/esm2022/libs/data-access/gn4/src/fixtures/ui.fixtures.mjs +3 -3
- package/esm2022/libs/feature/catalog/src/lib/feature-catalog.module.mjs +7 -4
- package/esm2022/libs/feature/catalog/src/lib/organisations/organisations.component.mjs +6 -6
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/feature-dataviz.module.mjs +10 -7
- package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +40 -50
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +1 -1
- package/esm2022/libs/feature/editor/src/index.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/+state/editor.effects.mjs +5 -5
- package/esm2022/libs/feature/editor/src/lib/components/contact-card/contact-card.component.mjs +4 -16
- package/esm2022/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.mjs +4 -2
- package/esm2022/libs/feature/editor/src/lib/components/import-record/import-record.component.mjs +95 -0
- package/esm2022/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.mjs +71 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.mjs +109 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +15 -32
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.mjs +19 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +23 -10
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.mjs +38 -60
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.mjs +148 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.mjs +86 -11
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +4 -8
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +36 -7
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.mjs +35 -59
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +4 -4
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +14 -5
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/wizard/wizard.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +41 -7
- package/esm2022/libs/feature/editor/src/lib/models/editor-config.model.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/services/editor.service.mjs +5 -5
- package/esm2022/libs/feature/map/src/index.mjs +2 -9
- package/esm2022/libs/feature/map/src/lib/+state/map.actions.mjs +4 -7
- package/esm2022/libs/feature/map/src/lib/+state/map.facade.mjs +9 -15
- package/esm2022/libs/feature/map/src/lib/+state/map.reducer.mjs +13 -44
- package/esm2022/libs/feature/map/src/lib/+state/map.selectors.mjs +3 -2
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.mjs +16 -16
- package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +16 -10
- package/esm2022/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.mjs +10 -8
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +11 -7
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +10 -6
- package/esm2022/libs/feature/map/src/lib/constant/index.mjs +1 -2
- package/esm2022/libs/feature/map/src/lib/feature-map.module.mjs +4 -44
- package/esm2022/libs/feature/map/src/lib/geocoding/geocoding.component.mjs +43 -29
- package/esm2022/libs/feature/map/src/lib/layers-panel/layers-panel.component.mjs +17 -8
- package/esm2022/libs/feature/map/src/lib/map-state-container/map-state-container.component.mjs +27 -0
- package/esm2022/libs/feature/map/src/lib/style/map-style.fixtures.mjs +3 -3
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +4 -168
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +1 -1
- package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +21 -17
- package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +14 -8
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +40 -52
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +4 -2
- package/esm2022/libs/feature/router/src/lib/default/state/router.facade.mjs +1 -1
- package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +3 -3
- package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +12 -6
- package/esm2022/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.mjs +7 -7
- package/esm2022/libs/ui/catalog/src/lib/ui-catalog.module.mjs +1 -6
- package/esm2022/libs/ui/dataviz/src/lib/table/table.fixtures.mjs +3 -3
- package/esm2022/libs/ui/elements/src/index.mjs +2 -2
- package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +2 -2
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +1 -1
- package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +2 -2
- package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +6 -6
- package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +2 -2
- package/esm2022/libs/ui/inputs/src/index.mjs +5 -1
- package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +7 -4
- package/esm2022/libs/ui/inputs/src/lib/badge/badge.component.mjs +5 -3
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +8 -1
- package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +11 -4
- package/esm2022/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.mjs +9 -3
- package/esm2022/libs/ui/inputs/src/lib/file-input/file-input.component.mjs +87 -0
- package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +5 -4
- package/esm2022/libs/ui/inputs/src/lib/search-input/search-input.component.mjs +6 -4
- package/esm2022/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +4 -3
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +2 -7
- package/esm2022/libs/ui/inputs/src/lib/url-input/url-input.component.mjs +3 -3
- package/esm2022/libs/ui/layout/src/index.mjs +3 -1
- package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +5 -3
- package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +3 -3
- package/esm2022/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.mjs +29 -0
- package/esm2022/libs/ui/layout/src/lib/sortable-list/sortable-list.component.mjs +43 -0
- package/esm2022/libs/ui/map/src/index.mjs +4 -3
- package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +8 -6
- package/esm2022/libs/ui/map/src/lib/components/map-container/map-container.component.mjs +137 -0
- package/esm2022/libs/ui/map/src/lib/components/map-container/map-settings.token.mjs +13 -0
- package/esm2022/libs/ui/map/src/lib/map-utils.mjs +37 -0
- package/esm2022/libs/ui/search/src/lib/facets/fixtures/aggregations-model-response.mjs +7 -7
- package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +8 -8
- package/esm2022/libs/util/app-config/src/index.mjs +2 -1
- package/esm2022/libs/util/app-config/src/lib/fixtures.mjs +10 -10
- package/esm2022/libs/util/app-config/src/lib/map-layers.mjs +27 -0
- package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +1 -1
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +1 -1
- package/esm2022/libs/util/shared/src/lib/services/theme.service.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/utils/bytes-convert.mjs +4 -1
- package/esm2022/translations/de.json +28 -2
- package/esm2022/translations/en.json +59 -33
- package/esm2022/translations/es.json +26 -0
- package/esm2022/translations/fr.json +90 -64
- package/esm2022/translations/it.json +28 -2
- package/esm2022/translations/nl.json +26 -0
- package/esm2022/translations/pt.json +26 -0
- package/fesm2022/geonetwork-ui.mjs +9462 -8515
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/index.d.ts +3 -0
- package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/common/license.d.ts +3 -0
- package/libs/api/metadata-converter/src/lib/common/license.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/common/url.d.ts +7 -0
- package/libs/api/metadata-converter/src/lib/common/url.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.d.ts +13 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/index.d.ts +2 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/index.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/namespaces.d.ts +16 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/namespaces.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/read-parts.d.ts +20 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/read-parts.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/utils/graph-utils.d.ts +9 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/utils/graph-utils.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/utils/serialize-to-xml.d.ts +8 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/utils/serialize-to-xml.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/utils/uri.d.ts +2 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/utils/uri.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/write-parts.d.ts +6 -0
- package/libs/api/metadata-converter/src/lib/dcat-ap/write-parts.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/find-converter.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts +3 -3
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts +2 -2
- package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts +1 -2
- package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +4 -5
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +10 -11
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/xml-utils.d.ts +58 -0
- package/libs/api/metadata-converter/src/lib/xml-utils.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +12 -7
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +21 -2
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/contact.model.d.ts +1 -1
- package/libs/common/domain/src/lib/model/record/contact.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +6 -6
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/platform.service.interface.d.ts +15 -0
- package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +7 -0
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
- package/libs/data-access/gn4/src/fixtures/site.fixtures.d.ts +2 -2
- package/libs/data-access/gn4/src/fixtures/site.fixtures.d.ts.map +1 -1
- package/libs/data-access/gn4/src/fixtures/ui.fixtures.d.ts +1 -1
- package/libs/data-access/gn4/src/fixtures/ui.fixtures.d.ts.map +1 -1
- package/libs/feature/catalog/src/lib/feature-catalog.module.d.ts +2 -1
- package/libs/feature/catalog/src/lib/feature-catalog.module.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +2 -2
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/feature-dataviz.module.d.ts +10 -9
- package/libs/feature/dataviz/src/lib/feature-dataviz.module.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts +13 -20
- package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts +6 -6
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +3 -3
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
- package/libs/feature/editor/src/index.d.ts +1 -0
- package/libs/feature/editor/src/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.effects.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts +1 -5
- package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts +2 -1
- package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/import-record/import-record.component.d.ts +34 -0
- package/libs/feature/editor/src/lib/components/import-record/import-record.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.d.ts +15 -0
- package/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.d.ts +38 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts +2 -5
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.d.ts +9 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts +5 -2
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts +6 -13
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.d.ts +35 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts +20 -2
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts +1 -3
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts +7 -2
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts +9 -15
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +5 -3
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts +3 -2
- package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts +10 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/models/editor-config.model.d.ts +6 -0
- package/libs/feature/editor/src/lib/models/editor-config.model.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/services/editor.service.d.ts +2 -2
- package/libs/feature/editor/src/lib/services/editor.service.d.ts.map +1 -1
- package/libs/feature/map/src/index.d.ts +1 -8
- package/libs/feature/map/src/index.d.ts.map +1 -1
- package/libs/feature/map/src/lib/+state/map.actions.d.ts +13 -39
- package/libs/feature/map/src/lib/+state/map.actions.d.ts.map +1 -1
- package/libs/feature/map/src/lib/+state/map.facade.d.ts +9 -10
- package/libs/feature/map/src/lib/+state/map.facade.d.ts.map +1 -1
- package/libs/feature/map/src/lib/+state/map.reducer.d.ts +4 -2
- package/libs/feature/map/src/lib/+state/map.reducer.d.ts.map +1 -1
- package/libs/feature/map/src/lib/+state/map.selectors.d.ts +6 -1
- package/libs/feature/map/src/lib/+state/map.selectors.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.d.ts +7 -9
- package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts +2 -2
- package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.d.ts +1 -1
- package/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.d.ts +1 -1
- package/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/constant/index.d.ts +0 -1
- package/libs/feature/map/src/lib/constant/index.d.ts.map +1 -1
- package/libs/feature/map/src/lib/feature-map.module.d.ts +12 -18
- package/libs/feature/map/src/lib/feature-map.module.d.ts.map +1 -1
- package/libs/feature/map/src/lib/geocoding/geocoding.component.d.ts +7 -7
- package/libs/feature/map/src/lib/geocoding/geocoding.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/layers-panel/layers-panel.component.d.ts +4 -3
- package/libs/feature/map/src/lib/layers-panel/layers-panel.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/map-state-container/map-state-container.component.d.ts +14 -0
- package/libs/feature/map/src/lib/map-state-container/map-state-container.component.d.ts.map +1 -0
- package/libs/feature/map/src/lib/style/map-style.fixtures.d.ts +2 -2
- package/libs/feature/map/src/lib/style/map-style.fixtures.d.ts.map +1 -1
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts +0 -30
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +3 -3
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +10 -7
- package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/feature-record.module.d.ts +13 -11
- package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +14 -20
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts +7 -7
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +5 -3
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
- package/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.d.ts +1 -1
- package/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.d.ts.map +1 -1
- package/libs/ui/catalog/src/lib/ui-catalog.module.d.ts +9 -10
- package/libs/ui/catalog/src/lib/ui-catalog.module.d.ts.map +1 -1
- package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts +2 -2
- package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +1 -1
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts +2 -2
- package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +7 -7
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +2 -2
- package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts +2 -2
- package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +1 -1
- package/libs/ui/inputs/src/index.d.ts +4 -0
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/badge/badge.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/file-input/file-input.component.d.ts +24 -0
- package/libs/ui/inputs/src/lib/file-input/file-input.component.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/search-input/search-input.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/search-input/search-input.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.d.ts +0 -1
- package/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +25 -26
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
- package/libs/ui/layout/src/index.d.ts +2 -0
- package/libs/ui/layout/src/index.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +2 -2
- package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts +1 -1
- package/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.d.ts +20 -0
- package/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.d.ts.map +1 -0
- package/libs/ui/layout/src/lib/sortable-list/sortable-list.component.d.ts +14 -0
- package/libs/ui/layout/src/lib/sortable-list/sortable-list.component.d.ts.map +1 -0
- package/libs/ui/map/src/index.d.ts +3 -2
- package/libs/ui/map/src/index.d.ts.map +1 -1
- package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +3 -4
- package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
- package/libs/ui/map/src/lib/components/map-container/map-container.component.d.ts +37 -0
- package/libs/ui/map/src/lib/components/map-container/map-container.component.d.ts.map +1 -0
- package/libs/ui/map/src/lib/components/map-container/map-settings.token.d.ts +18 -0
- package/libs/ui/map/src/lib/components/map-container/map-settings.token.d.ts.map +1 -0
- package/libs/ui/map/src/lib/map-utils.d.ts +7 -0
- package/libs/ui/map/src/lib/map-utils.d.ts.map +1 -0
- package/libs/ui/search/src/lib/facets/fixtures/aggregations-model-response.d.ts +3 -3
- package/libs/ui/search/src/lib/facets/fixtures/aggregations-model-response.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +3 -3
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
- package/libs/util/app-config/src/index.d.ts +1 -0
- package/libs/util/app-config/src/index.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/fixtures.d.ts +8 -8
- package/libs/util/app-config/src/lib/fixtures.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/map-layers.d.ts +4 -0
- package/libs/util/app-config/src/lib/map-layers.d.ts.map +1 -0
- package/libs/util/shared/src/lib/links/link-classifier.service.d.ts +3 -3
- package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +6 -6
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/libs/util/shared/src/lib/services/theme.service.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/bytes-convert.d.ts +2 -1
- package/libs/util/shared/src/lib/utils/bytes-convert.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/libs/api/metadata-converter/src/index.ts +3 -0
- package/src/libs/api/metadata-converter/src/lib/common/license.ts +66 -0
- package/src/libs/api/metadata-converter/src/lib/common/url.ts +15 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.ts +378 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/index.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/namespaces.ts +17 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/read-parts.ts +370 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/graph-utils.ts +95 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/individual-name.ts +20 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/keyword.mapper.ts +16 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/role.mapper.ts +48 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/serialize-to-xml.ts +97 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/status.mapper.ts +19 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/update-frequency.mapper.ts +67 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/uri.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/write-parts.ts +68 -0
- package/src/libs/api/metadata-converter/src/lib/find-converter.ts +13 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/eu.dcat-ap.records.ts +272 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/opendataswiss.records.ts +110 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/sextant.records.ts +85 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/vlaanderen.dcat-ap.records.ts +73 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +18 -16
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +5 -6
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +12 -4
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +21 -43
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +5 -14
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +13 -15
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +133 -156
- package/src/libs/api/metadata-converter/src/lib/xml-utils.ts +37 -2
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +132 -68
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +47 -3
- package/src/libs/common/domain/src/lib/model/record/contact.model.ts +1 -1
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +7 -7
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +26 -0
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +10 -0
- package/src/libs/common/fixtures/src/index.ts +4 -1
- package/src/libs/common/fixtures/src/lib/editor/editor.fixtures.ts +37 -37
- package/src/libs/common/fixtures/src/lib/elasticsearch/{aggregations-request.ts → aggregations-request.fixtures.ts} +1 -3
- package/src/libs/common/fixtures/src/lib/elasticsearch/{aggregations-response.ts → aggregations-response.fixtures.ts} +6 -8
- package/src/libs/common/fixtures/src/lib/elasticsearch/{full-response.ts → full-response.fixtures.ts} +1 -3
- package/src/libs/common/fixtures/src/lib/elasticsearch/index.ts +5 -5
- package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +1 -3
- package/src/libs/common/fixtures/src/lib/elasticsearch/metadata.fixtures.ts +1739 -1742
- package/src/libs/common/fixtures/src/lib/elasticsearch/{search-requests.ts → search-requests.fixtures.ts} +1 -3
- package/src/libs/common/fixtures/src/lib/elasticsearch/{search-responses.ts → search-responses.fixtures.ts} +4 -6
- package/src/libs/common/fixtures/src/lib/geojson.fixtures.ts +57178 -57195
- package/src/libs/common/fixtures/src/lib/gn4/groups.fixtures.ts +2 -4
- package/src/libs/common/fixtures/src/lib/individual.fixtures.ts +61 -0
- package/src/libs/common/fixtures/src/lib/link.fixtures.ts +233 -164
- package/src/libs/common/fixtures/src/lib/map/index.ts +1 -0
- package/src/libs/common/fixtures/src/lib/map/map-context.fixtures.ts +53 -0
- package/src/libs/common/fixtures/src/lib/ol-feature.fixtures.ts +10 -0
- package/src/libs/common/fixtures/src/lib/organisations.fixture.ts +35 -11
- package/src/libs/common/fixtures/src/lib/record-link.fixtures.ts +9 -7
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +9 -9
- package/src/libs/common/fixtures/src/lib/repository.fixtures.ts +4 -4
- package/src/libs/common/fixtures/src/lib/search/aggregations.ts +2 -3
- package/src/libs/common/fixtures/src/lib/user-feedbacks.fixtures.ts +14 -15
- package/src/libs/common/fixtures/src/lib/user.fixtures.ts +45 -15
- package/src/libs/data-access/gn4/src/fixtures/site.fixtures.ts +4 -4
- package/src/libs/data-access/gn4/src/fixtures/ui.fixtures.ts +2 -2
- package/src/libs/feature/catalog/src/lib/feature-catalog.module.ts +5 -1
- package/src/libs/feature/catalog/src/lib/sources/sources.fixture.ts +1 -1
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +3 -3
- package/src/libs/feature/dataviz/src/lib/feature-dataviz.module.ts +6 -2
- package/src/libs/feature/dataviz/src/lib/figure/figure.fixtures.ts +2 -2
- package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.html +5 -2
- package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.ts +38 -78
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +6 -6
- package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +4 -4
- package/src/libs/feature/editor/src/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +11 -4
- package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.html +12 -24
- package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.ts +1 -13
- package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/import-record/import-record.component.html +47 -0
- package/src/libs/feature/editor/src/lib/components/import-record/import-record.component.ts +132 -0
- package/src/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.html +35 -0
- package/src/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.ts +79 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.html +40 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.ts +170 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.css +4 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.html +13 -23
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +11 -50
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-resource-updated/form-field-resource-updated.component.ts → form-field-date-updated/form-field-date-updated.component.ts} +4 -4
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.html +3 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.ts +35 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.css +8 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.html +1 -4
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-map-container/form-field-map-container.component.ts +41 -83
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.html +34 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.ts +182 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.html +11 -5
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.ts +93 -4
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +13 -6
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +0 -9
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +7 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +62 -6
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.css +4 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.html +23 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.ts +37 -69
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.css +4 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.html +16 -14
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.ts +1 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +34 -20
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +12 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +1 -1
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +31 -29
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +2 -1
- package/src/libs/feature/editor/src/lib/components/wizard/wizard.component.html +2 -6
- package/src/libs/feature/editor/src/lib/fields.config.ts +45 -6
- package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +12 -0
- package/src/libs/feature/editor/src/lib/services/editor.service.ts +7 -3
- package/src/libs/feature/map/src/index.ts +1 -8
- package/src/libs/feature/map/src/lib/+state/map.actions.ts +10 -25
- package/src/libs/feature/map/src/lib/+state/map.facade.ts +11 -15
- package/src/libs/feature/map/src/lib/+state/map.reducer.ts +16 -53
- package/src/libs/feature/map/src/lib/+state/map.selectors.ts +7 -2
- package/src/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.ts +18 -21
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.ts +17 -11
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts +11 -12
- package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.ts +12 -10
- package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.ts +11 -9
- package/src/libs/feature/map/src/lib/constant/index.ts +0 -1
- package/src/libs/feature/map/src/lib/feature-map.module.ts +0 -26
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.ts +38 -20
- package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.html +2 -2
- package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.ts +15 -5
- package/src/libs/feature/map/src/lib/map-state-container/map-state-container.component.html +4 -0
- package/src/libs/feature/map/src/lib/map-state-container/map-state-container.component.ts +29 -0
- package/src/libs/feature/map/src/lib/style/map-style.fixtures.ts +29 -27
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +1 -229
- package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +3 -3
- package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +29 -20
- package/src/libs/feature/record/src/lib/feature-record.module.ts +11 -3
- package/src/libs/feature/record/src/lib/map-view/map-view.component.html +4 -4
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +45 -72
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +5 -1
- package/src/libs/feature/router/src/lib/default/state/router.facade.ts +1 -1
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -0
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +5 -1
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +14 -3
- package/src/libs/feature/search/src/lib/state/fixtures/search-state.fixtures.ts +2 -2
- package/src/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.ts +8 -1
- package/src/libs/ui/catalog/src/lib/ui-catalog.module.ts +0 -3
- package/src/libs/ui/dataviz/src/lib/chart/chart.fixtures.ts +2 -2
- package/src/libs/ui/dataviz/src/lib/table/table.fixtures.ts +2 -2
- package/src/libs/ui/elements/src/index.ts +1 -1
- package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +4 -4
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +7 -7
- package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +3 -3
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +13 -20
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +1 -1
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.css +5 -0
- package/src/libs/ui/inputs/src/index.ts +4 -0
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.css +25 -18
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +38 -24
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +4 -1
- package/src/libs/ui/inputs/src/lib/badge/badge.component.html +11 -3
- package/src/libs/ui/inputs/src/lib/badge/badge.component.ts +2 -1
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +15 -1
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.css +7 -2
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.html +14 -6
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +7 -1
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.css +7 -2
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.html +28 -23
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +7 -1
- package/src/libs/ui/inputs/src/lib/file-input/file-input.component.css +4 -0
- package/src/libs/ui/inputs/src/lib/file-input/file-input.component.html +7 -3
- package/src/libs/ui/inputs/src/lib/file-input/file-input.component.ts +2 -1
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.css +4 -0
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +30 -22
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +2 -1
- package/src/libs/ui/inputs/src/lib/search-input/search-input.component.ts +5 -1
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.css +4 -3
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.html +0 -1
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.ts +1 -2
- package/src/libs/ui/inputs/src/lib/text-area/text-area.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +1 -1
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +0 -3
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.html +1 -1
- package/src/libs/ui/layout/src/index.ts +2 -0
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +8 -3
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +4 -3
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.css +1 -1
- package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +2 -2
- package/src/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.html +15 -0
- package/src/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.ts +44 -0
- package/src/libs/ui/layout/src/lib/sortable-list/sortable-list.component.html +37 -0
- package/src/libs/ui/{elements → layout}/src/lib/sortable-list/sortable-list.component.ts +13 -16
- package/src/libs/ui/map/src/index.ts +3 -2
- package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +1 -1
- package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +8 -5
- package/src/libs/ui/map/src/lib/components/map-container/map-container.component.css +0 -0
- package/src/libs/ui/map/src/lib/components/map-container/map-container.component.ts +203 -0
- package/src/libs/ui/map/src/lib/components/map-container/map-settings.token.ts +23 -0
- package/src/libs/ui/map/src/lib/map-utils.ts +54 -0
- package/src/libs/ui/search/src/lib/facets/fixtures/aggregations-model-response.ts +7 -6
- package/src/libs/ui/search/src/lib/results-table/results-table.component.html +20 -9
- package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +5 -6
- package/src/libs/util/app-config/src/index.ts +1 -0
- package/src/libs/util/app-config/src/lib/fixtures.ts +9 -9
- package/src/libs/util/app-config/src/lib/map-layers.ts +31 -0
- package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +4 -3
- package/src/libs/util/shared/src/lib/links/link-utils.ts +6 -6
- package/src/libs/util/shared/src/lib/services/theme.service.ts +1 -0
- package/src/libs/util/shared/src/lib/utils/bytes-convert.ts +4 -1
- package/tailwind.base.config.js +1 -0
- package/tailwind.base.css +38 -6
- package/translations/de.json +28 -2
- package/translations/en.json +59 -33
- package/translations/es.json +26 -0
- package/translations/fr.json +90 -64
- package/translations/it.json +28 -2
- package/translations/nl.json +26 -0
- package/translations/pt.json +26 -0
- package/translations/sk.json +26 -0
- package/esm2022/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.mjs +0 -96
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.mjs +0 -19
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.mjs +0 -17
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.mjs +0 -17
- package/esm2022/libs/feature/map/src/lib/+state/map.effects.mjs +0 -15
- package/esm2022/libs/feature/map/src/lib/+state/map.models.mjs +0 -2
- package/esm2022/libs/feature/map/src/lib/constant/map-options.mjs +0 -8
- package/esm2022/libs/feature/map/src/lib/constant/style.constant.mjs +0 -17
- package/esm2022/libs/feature/map/src/lib/feature-info/feature-info.service.mjs +0 -38
- package/esm2022/libs/feature/map/src/lib/manager/map-instance.directive.mjs +0 -19
- package/esm2022/libs/feature/map/src/lib/manager/map-manager.service.mjs +0 -19
- package/esm2022/libs/feature/map/src/lib/map-container/map-container.component.mjs +0 -27
- package/esm2022/libs/feature/map/src/lib/map-context/component/map-context.component.mjs +0 -46
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.model.mjs +0 -10
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +0 -289
- package/esm2022/libs/ui/elements/src/lib/sortable-list/sortable-list.component.mjs +0 -39
- package/esm2022/libs/ui/map/src/lib/components/map/map.component.mjs +0 -40
- package/esm2022/libs/ui/map/src/lib/ui-map.module.mjs +0 -33
- package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts +0 -27
- package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts.map +0 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts +0 -9
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts.map +0 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.d.ts +0 -8
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.d.ts.map +0 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.d.ts +0 -8
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.d.ts.map +0 -1
- package/libs/feature/map/src/lib/+state/map.effects.d.ts +0 -9
- package/libs/feature/map/src/lib/+state/map.effects.d.ts.map +0 -1
- package/libs/feature/map/src/lib/+state/map.models.d.ts +0 -9
- package/libs/feature/map/src/lib/+state/map.models.d.ts.map +0 -1
- package/libs/feature/map/src/lib/constant/map-options.d.ts +0 -9
- package/libs/feature/map/src/lib/constant/map-options.d.ts.map +0 -1
- package/libs/feature/map/src/lib/constant/style.constant.d.ts +0 -4
- package/libs/feature/map/src/lib/constant/style.constant.d.ts.map +0 -1
- package/libs/feature/map/src/lib/feature-info/feature-info.service.d.ts +0 -16
- package/libs/feature/map/src/lib/feature-info/feature-info.service.d.ts.map +0 -1
- package/libs/feature/map/src/lib/manager/map-instance.directive.d.ts +0 -9
- package/libs/feature/map/src/lib/manager/map-instance.directive.d.ts.map +0 -1
- package/libs/feature/map/src/lib/manager/map-manager.service.d.ts +0 -11
- package/libs/feature/map/src/lib/manager/map-manager.service.d.ts.map +0 -1
- package/libs/feature/map/src/lib/map-container/map-container.component.d.ts +0 -12
- package/libs/feature/map/src/lib/map-container/map-container.component.d.ts.map +0 -1
- package/libs/feature/map/src/lib/map-context/component/map-context.component.d.ts +0 -26
- package/libs/feature/map/src/lib/map-context/component/map-context.component.d.ts.map +0 -1
- package/libs/feature/map/src/lib/map-context/map-context.model.d.ts +0 -77
- package/libs/feature/map/src/lib/map-context/map-context.model.d.ts.map +0 -1
- package/libs/feature/map/src/lib/map-context/map-context.service.d.ts +0 -26
- package/libs/feature/map/src/lib/map-context/map-context.service.d.ts.map +0 -1
- package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts +0 -17
- package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts.map +0 -1
- package/libs/ui/map/src/lib/components/map/map.component.d.ts +0 -19
- package/libs/ui/map/src/lib/components/map/map.component.d.ts.map +0 -1
- package/libs/ui/map/src/lib/ui-map.module.d.ts +0 -13
- package/libs/ui/map/src/lib/ui-map.module.d.ts.map +0 -1
- package/src/libs/common/fixtures/src/lib/ol-feature.fixture.ts +0 -7
- package/src/libs/common/fixtures/src/lib/utils/freeze.ts +0 -10
- package/src/libs/common/fixtures/src/lib/utils/index.ts +0 -1
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +0 -9
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +0 -113
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.html +0 -7
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.ts +0 -16
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.html +0 -13
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.ts +0 -16
- package/src/libs/feature/map/src/lib/+state/map.effects.ts +0 -7
- package/src/libs/feature/map/src/lib/+state/map.models.ts +0 -9
- package/src/libs/feature/map/src/lib/constant/map-options.ts +0 -17
- package/src/libs/feature/map/src/lib/feature-info/feature-info.service.ts +0 -42
- package/src/libs/feature/map/src/lib/manager/map-instance.directive.ts +0 -10
- package/src/libs/feature/map/src/lib/manager/map-manager.service.ts +0 -13
- package/src/libs/feature/map/src/lib/map-container/map-container.component.html +0 -1
- package/src/libs/feature/map/src/lib/map-container/map-container.component.ts +0 -26
- package/src/libs/feature/map/src/lib/map-context/component/map-context.component.html +0 -1
- package/src/libs/feature/map/src/lib/map-context/component/map-context.component.ts +0 -57
- package/src/libs/feature/map/src/lib/map-context/map-context.fixtures.ts +0 -51
- package/src/libs/feature/map/src/lib/map-context/map-context.model.ts +0 -95
- package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +0 -318
- package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.html +0 -29
- package/src/libs/ui/map/src/lib/components/map/map.component.ts +0 -57
- package/src/libs/ui/map/src/lib/ui-map.module.ts +0 -19
- /package/src/libs/feature/editor/src/lib/components/{overview-upload/overview-upload.component.css → import-record/import-record.component.css} +0 -0
- /package/src/libs/feature/editor/src/lib/components/{record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.css → online-resource-card/online-resource-card.component.css} +0 -0
- /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.css → form-field-contacts/form-field-contacts.component.css} +0 -0
- /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.css → form-field-date-updated/form-field-date-updated.component.css} +0 -0
- /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-resource-updated/form-field-resource-updated.component.html → form-field-date-updated/form-field-date-updated.component.html} +0 -0
- /package/src/libs/feature/{map/src/lib/map-container/map-container.component.css → editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.css} +0 -0
- /package/src/libs/feature/map/src/lib/{map-context/component/map-context.component.css → map-state-container/map-state-container.component.css} +0 -0
- /package/src/libs/ui/{map/src/lib/components/map/map.component.css → layout/src/lib/modal-dialog/modal-dialog.component.css} +0 -0
- /package/src/libs/ui/{elements → layout}/src/lib/sortable-list/sortable-list.component.css +0 -0
- /package/src/libs/ui/map/src/lib/components/{map/map.component.html → map-container/map-container.component.html} +0 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import { NamedNode, Statement, Store } from 'rdflib'
|
|
2
|
+
import { DCAT, DCTERMS, FOAF, LOCN, RDF, SKOS, VCARD } from './namespaces'
|
|
3
|
+
import { findNodeLocalized } from './utils/graph-utils'
|
|
4
|
+
import {
|
|
5
|
+
DatasetDownloadDistribution,
|
|
6
|
+
DatasetServiceDistribution,
|
|
7
|
+
DatasetSpatialExtent,
|
|
8
|
+
Individual,
|
|
9
|
+
Keyword,
|
|
10
|
+
OnlineLinkResource,
|
|
11
|
+
OnlineResource,
|
|
12
|
+
Organization,
|
|
13
|
+
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
14
|
+
import { getAsValidUrl } from '../common/url'
|
|
15
|
+
import { fullNameToParts } from '../iso19139/utils/individual-name'
|
|
16
|
+
import { readLicenseFromString } from '../common/license'
|
|
17
|
+
import { matchProtocol } from '../common/distribution.mapper'
|
|
18
|
+
|
|
19
|
+
function getDataset(dataStore: Store, recordNode: NamedNode): NamedNode {
|
|
20
|
+
return (dataStore.the(recordNode, FOAF('primaryTopic'), null) ||
|
|
21
|
+
dataStore.the(null, RDF('type'), DCAT('Dataset'))) as NamedNode
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function readUniqueIdentifier(
|
|
25
|
+
dataStore: Store,
|
|
26
|
+
recordNode: NamedNode
|
|
27
|
+
): string {
|
|
28
|
+
return dataStore.the(recordNode, DCTERMS('identifier'), null)?.value
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function readTitle(dataStore: Store, recordNode: NamedNode): string {
|
|
32
|
+
const dataset = getDataset(dataStore, recordNode)
|
|
33
|
+
return findNodeLocalized(dataStore, dataset, DCTERMS('title'), null, 'en')
|
|
34
|
+
?.value
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function readAbstract(dataStore: Store, recordNode: NamedNode): string {
|
|
38
|
+
const dataset = getDataset(dataStore, recordNode)
|
|
39
|
+
return findNodeLocalized(
|
|
40
|
+
dataStore,
|
|
41
|
+
dataset,
|
|
42
|
+
DCTERMS('description'),
|
|
43
|
+
null,
|
|
44
|
+
'en'
|
|
45
|
+
)?.value
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function mapContactFromStatement(
|
|
49
|
+
dataStore: Store,
|
|
50
|
+
statement: Statement
|
|
51
|
+
): Individual {
|
|
52
|
+
const contactNode = statement.object as NamedNode
|
|
53
|
+
const fullName =
|
|
54
|
+
dataStore.the(contactNode, VCARD('fn'), null) ??
|
|
55
|
+
dataStore.the(contactNode, VCARD('title'), null) ??
|
|
56
|
+
dataStore.the(contactNode, VCARD('organisation-name'), null)
|
|
57
|
+
let firstName, lastName
|
|
58
|
+
if (fullName) {
|
|
59
|
+
const parts = fullNameToParts(fullName.value)
|
|
60
|
+
firstName = parts[0]
|
|
61
|
+
lastName = parts[1]
|
|
62
|
+
}
|
|
63
|
+
const role = dataStore.the(contactNode, VCARD('role'), null)
|
|
64
|
+
const email = dataStore.the(contactNode, VCARD('hasEmail'), null)
|
|
65
|
+
const emailValue = email
|
|
66
|
+
? email.value.replace(/^mailto:/, '')
|
|
67
|
+
: 'missing@missing.com'
|
|
68
|
+
return {
|
|
69
|
+
role: role?.value ?? 'point_of_contact',
|
|
70
|
+
email: emailValue,
|
|
71
|
+
...(firstName && { firstName }),
|
|
72
|
+
...(lastName && { lastName }),
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function readContacts(
|
|
77
|
+
dataStore: Store,
|
|
78
|
+
recordNode: NamedNode
|
|
79
|
+
): Individual[] {
|
|
80
|
+
const statements = dataStore.statementsMatching(
|
|
81
|
+
recordNode,
|
|
82
|
+
DCAT('contactPoint'),
|
|
83
|
+
null
|
|
84
|
+
)
|
|
85
|
+
return statements.map((s) => mapContactFromStatement(dataStore, s))
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function readContactsForResource(
|
|
89
|
+
dataStore: Store,
|
|
90
|
+
recordNode: NamedNode
|
|
91
|
+
): Individual[] {
|
|
92
|
+
const dataset = getDataset(dataStore, recordNode)
|
|
93
|
+
const statements = dataStore.statementsMatching(
|
|
94
|
+
dataset,
|
|
95
|
+
DCAT('contactPoint'),
|
|
96
|
+
null
|
|
97
|
+
)
|
|
98
|
+
return statements.map((s) => mapContactFromStatement(dataStore, s))
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function readLandingPage(dataStore: Store, recordNode: NamedNode): URL {
|
|
102
|
+
const dataset = getDataset(dataStore, recordNode)
|
|
103
|
+
const landingPage = dataStore.the(dataset, DCAT('landingPage'), null)
|
|
104
|
+
return landingPage !== null ? getAsValidUrl(landingPage.value) : undefined
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function readOnlineLinkResource(
|
|
108
|
+
dataStore: Store,
|
|
109
|
+
distributionNode: NamedNode
|
|
110
|
+
): OnlineLinkResource {
|
|
111
|
+
const accessUrl = dataStore.the(distributionNode, DCAT('accessURL'), null)
|
|
112
|
+
const description = findNodeLocalized(
|
|
113
|
+
dataStore,
|
|
114
|
+
distributionNode,
|
|
115
|
+
DCTERMS('description'),
|
|
116
|
+
null,
|
|
117
|
+
'en'
|
|
118
|
+
)
|
|
119
|
+
const title = findNodeLocalized(
|
|
120
|
+
dataStore,
|
|
121
|
+
distributionNode,
|
|
122
|
+
DCTERMS('title'),
|
|
123
|
+
null,
|
|
124
|
+
'en'
|
|
125
|
+
)
|
|
126
|
+
return {
|
|
127
|
+
url: getAsValidUrl(accessUrl?.value),
|
|
128
|
+
type: 'link',
|
|
129
|
+
...(title && { name: title?.value }),
|
|
130
|
+
...(description && { description: description?.value }),
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function readDownloadDistribution(
|
|
135
|
+
dataStore: Store,
|
|
136
|
+
distributionNode: NamedNode
|
|
137
|
+
): DatasetDownloadDistribution {
|
|
138
|
+
const downloadUrl = dataStore.the(distributionNode, DCAT('downloadURL'), null)
|
|
139
|
+
const description = findNodeLocalized(
|
|
140
|
+
dataStore,
|
|
141
|
+
distributionNode,
|
|
142
|
+
DCTERMS('description'),
|
|
143
|
+
null,
|
|
144
|
+
'en'
|
|
145
|
+
)
|
|
146
|
+
const title = findNodeLocalized(
|
|
147
|
+
dataStore,
|
|
148
|
+
distributionNode,
|
|
149
|
+
DCTERMS('title'),
|
|
150
|
+
null,
|
|
151
|
+
'en'
|
|
152
|
+
)
|
|
153
|
+
// todo mime type
|
|
154
|
+
return {
|
|
155
|
+
url: getAsValidUrl(downloadUrl?.value),
|
|
156
|
+
type: 'download',
|
|
157
|
+
...(title && { name: title?.value }),
|
|
158
|
+
...(description && { description: description?.value }),
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function readServiceDistribution(
|
|
163
|
+
dataStore: Store,
|
|
164
|
+
distributionNode: NamedNode
|
|
165
|
+
): DatasetServiceDistribution {
|
|
166
|
+
const service = dataStore.the(
|
|
167
|
+
distributionNode,
|
|
168
|
+
DCAT('accessService'),
|
|
169
|
+
null
|
|
170
|
+
) as NamedNode
|
|
171
|
+
const conformsTo = dataStore.the(service, DCTERMS('conformsTo'), null)
|
|
172
|
+
const accessUrl = dataStore.the(distributionNode, DCAT('accessURL'), null)
|
|
173
|
+
const description = findNodeLocalized(
|
|
174
|
+
dataStore,
|
|
175
|
+
distributionNode,
|
|
176
|
+
DCTERMS('description'),
|
|
177
|
+
null,
|
|
178
|
+
'en'
|
|
179
|
+
)
|
|
180
|
+
const title = findNodeLocalized(
|
|
181
|
+
dataStore,
|
|
182
|
+
distributionNode,
|
|
183
|
+
DCTERMS('title'),
|
|
184
|
+
null,
|
|
185
|
+
'en'
|
|
186
|
+
)
|
|
187
|
+
return {
|
|
188
|
+
url: getAsValidUrl(accessUrl?.value),
|
|
189
|
+
type: 'service',
|
|
190
|
+
accessServiceProtocol: matchProtocol(conformsTo?.value),
|
|
191
|
+
...(title && { name: title?.value }),
|
|
192
|
+
...(description && { description: description?.value }),
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function mapOnlineResource(
|
|
197
|
+
dataStore: Store,
|
|
198
|
+
distributionNode: NamedNode
|
|
199
|
+
): OnlineResource {
|
|
200
|
+
if (dataStore.holds(distributionNode, DCAT('accessService'), null)) {
|
|
201
|
+
const service = dataStore.the(
|
|
202
|
+
distributionNode,
|
|
203
|
+
DCAT('accessService'),
|
|
204
|
+
null
|
|
205
|
+
) as NamedNode
|
|
206
|
+
const conformsTo = dataStore.the(service, DCTERMS('conformsTo'), null)
|
|
207
|
+
if (conformsTo) {
|
|
208
|
+
return readServiceDistribution(dataStore, distributionNode)
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (dataStore.holds(distributionNode, DCAT('downloadURL'), null)) {
|
|
212
|
+
return readDownloadDistribution(dataStore, distributionNode)
|
|
213
|
+
}
|
|
214
|
+
return readOnlineLinkResource(dataStore, distributionNode)
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function readOnlineResources(
|
|
218
|
+
dataStore: Store,
|
|
219
|
+
recordNode: NamedNode
|
|
220
|
+
): OnlineResource[] {
|
|
221
|
+
const dataset = getDataset(dataStore, recordNode)
|
|
222
|
+
const statements = dataStore.statementsMatching(
|
|
223
|
+
dataset,
|
|
224
|
+
DCAT('distribution'),
|
|
225
|
+
null
|
|
226
|
+
)
|
|
227
|
+
return statements.map((statement) =>
|
|
228
|
+
mapOnlineResource(dataStore, statement.object as NamedNode)
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export function readSpatialExtents(
|
|
233
|
+
dataStore: Store,
|
|
234
|
+
recordNode: NamedNode
|
|
235
|
+
): DatasetSpatialExtent[] {
|
|
236
|
+
const dataset = getDataset(dataStore, recordNode)
|
|
237
|
+
const statements = dataStore.statementsMatching(
|
|
238
|
+
dataset,
|
|
239
|
+
DCTERMS('spatial'),
|
|
240
|
+
null
|
|
241
|
+
)
|
|
242
|
+
return statements
|
|
243
|
+
.map((statement) => {
|
|
244
|
+
const geom = dataStore.the(
|
|
245
|
+
statement.object as NamedNode,
|
|
246
|
+
LOCN('geometry'),
|
|
247
|
+
null
|
|
248
|
+
)
|
|
249
|
+
if (!geom)
|
|
250
|
+
return {
|
|
251
|
+
description: statement.object.value,
|
|
252
|
+
}
|
|
253
|
+
return {
|
|
254
|
+
geometry: JSON.parse(geom.value),
|
|
255
|
+
}
|
|
256
|
+
})
|
|
257
|
+
.filter((statement) => !!statement)
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export function readKeywords(
|
|
261
|
+
dataStore: Store,
|
|
262
|
+
recordNode: NamedNode
|
|
263
|
+
): Keyword[] {
|
|
264
|
+
const dataset = getDataset(dataStore, recordNode)
|
|
265
|
+
const statements = dataStore.statementsMatching(
|
|
266
|
+
dataset,
|
|
267
|
+
DCAT('keyword'),
|
|
268
|
+
null
|
|
269
|
+
)
|
|
270
|
+
return statements.map((statement) => {
|
|
271
|
+
return {
|
|
272
|
+
label: statement.object.value,
|
|
273
|
+
type: 'theme',
|
|
274
|
+
}
|
|
275
|
+
})
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export function readTopics(dataStore: Store, recordNode: NamedNode): string[] {
|
|
279
|
+
const dataset = getDataset(dataStore, recordNode)
|
|
280
|
+
const statements = dataStore.statementsMatching(dataset, DCAT('theme'), null)
|
|
281
|
+
return statements.map((statement) => {
|
|
282
|
+
const prefLabel = dataStore.the(
|
|
283
|
+
statement.object as NamedNode,
|
|
284
|
+
SKOS('prefLabel'),
|
|
285
|
+
null
|
|
286
|
+
)
|
|
287
|
+
return prefLabel?.value ?? statement.object.value
|
|
288
|
+
})
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export function readRecordCreated(
|
|
292
|
+
dataStore: Store,
|
|
293
|
+
recordNode: NamedNode
|
|
294
|
+
): Date {
|
|
295
|
+
const dateString = dataStore.the(recordNode, DCTERMS('issued'), null)?.value
|
|
296
|
+
if (dateString) return new Date(dateString)
|
|
297
|
+
return null
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export function readRecordUpdated(
|
|
301
|
+
dataStore: Store,
|
|
302
|
+
recordNode: NamedNode
|
|
303
|
+
): Date {
|
|
304
|
+
const dateString = dataStore.the(recordNode, DCTERMS('modified'), null)?.value
|
|
305
|
+
if (dateString) return new Date(dateString)
|
|
306
|
+
return new Date() // record updated is a mandatory field
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export function readResourceCreated(
|
|
310
|
+
dataStore: Store,
|
|
311
|
+
recordNode: NamedNode
|
|
312
|
+
): Date {
|
|
313
|
+
const dataset = getDataset(dataStore, recordNode)
|
|
314
|
+
const dateString = dataStore.the(dataset, DCTERMS('issued'), null)?.value
|
|
315
|
+
if (dateString) return new Date(dateString)
|
|
316
|
+
return null
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export function readResourceUpdated(
|
|
320
|
+
dataStore: Store,
|
|
321
|
+
recordNode: NamedNode
|
|
322
|
+
): Date {
|
|
323
|
+
const dataset = getDataset(dataStore, recordNode)
|
|
324
|
+
const dateString = dataStore.the(dataset, DCTERMS('modified'), null)?.value
|
|
325
|
+
if (dateString) return new Date(dateString)
|
|
326
|
+
return null
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export function readOwnerOrganization(dataStore: Store): Organization {
|
|
330
|
+
const publisherStatements = dataStore.statementsMatching(
|
|
331
|
+
null,
|
|
332
|
+
DCTERMS('publisher'),
|
|
333
|
+
null
|
|
334
|
+
)
|
|
335
|
+
if (!publisherStatements.length) return null
|
|
336
|
+
const publisher = publisherStatements[0].object as NamedNode
|
|
337
|
+
const nameNode = dataStore.the(publisher, FOAF('name'), null)
|
|
338
|
+
const name = nameNode ? nameNode.value : publisher.value
|
|
339
|
+
return {
|
|
340
|
+
name,
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export function readLicenses(dataStore: Store, recordNode: NamedNode) {
|
|
345
|
+
const dataset = getDataset(dataStore, recordNode)
|
|
346
|
+
const distributions = dataStore.statementsMatching(
|
|
347
|
+
dataset,
|
|
348
|
+
DCAT('distribution'),
|
|
349
|
+
null
|
|
350
|
+
)
|
|
351
|
+
return distributions
|
|
352
|
+
.map(
|
|
353
|
+
(statement) =>
|
|
354
|
+
dataStore.the(
|
|
355
|
+
statement.object as NamedNode,
|
|
356
|
+
DCTERMS('license'),
|
|
357
|
+
null
|
|
358
|
+
) as NamedNode
|
|
359
|
+
)
|
|
360
|
+
.filter((license) => !!license)
|
|
361
|
+
.map((s) => readLicenseFromString(s.value))
|
|
362
|
+
.filter(
|
|
363
|
+
(license, index, array) =>
|
|
364
|
+
array.findIndex(
|
|
365
|
+
(l) =>
|
|
366
|
+
l.url?.toString() === license.url?.toString() &&
|
|
367
|
+
l.text === license.text
|
|
368
|
+
) === index
|
|
369
|
+
)
|
|
370
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { lit, Literal, Node, parse, Statement, Store } from 'rdflib'
|
|
2
|
+
import { Quad_Object, Quad_Predicate, Quad_Subject } from 'rdflib/lib/tf-types'
|
|
3
|
+
import { ContentType } from 'rdflib/lib/types'
|
|
4
|
+
import { BASE_URI } from './uri'
|
|
5
|
+
|
|
6
|
+
export function findNodeLocalized(
|
|
7
|
+
dataStore: Store,
|
|
8
|
+
subject: Quad_Subject,
|
|
9
|
+
predicate: Quad_Predicate,
|
|
10
|
+
object: Quad_Object,
|
|
11
|
+
language: string
|
|
12
|
+
): Node | null {
|
|
13
|
+
const literals = dataStore
|
|
14
|
+
.each(subject, predicate, object)
|
|
15
|
+
.filter((node): node is Literal => node instanceof Literal)
|
|
16
|
+
const matchingLang = literals.find((node) =>
|
|
17
|
+
node.language.startsWith(language)
|
|
18
|
+
)
|
|
19
|
+
const noLang = literals.find((node) => !node.language)
|
|
20
|
+
const anyLang = literals[0]
|
|
21
|
+
return matchingLang ?? noLang ?? anyLang
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function getOrAddStatement(
|
|
25
|
+
dataStore: Store,
|
|
26
|
+
subject: Quad_Subject,
|
|
27
|
+
predicate: Quad_Predicate,
|
|
28
|
+
object: Quad_Object | string
|
|
29
|
+
): Statement {
|
|
30
|
+
let statement = dataStore.statementsMatching(
|
|
31
|
+
subject,
|
|
32
|
+
predicate,
|
|
33
|
+
typeof object === 'string' ? null : object
|
|
34
|
+
)[0]
|
|
35
|
+
if (!statement) {
|
|
36
|
+
statement = dataStore.add(subject, predicate, object) as Statement
|
|
37
|
+
}
|
|
38
|
+
return statement
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function getOrAddLiteral(
|
|
42
|
+
dataStore: Store,
|
|
43
|
+
subject: Quad_Subject,
|
|
44
|
+
predicate: Quad_Predicate,
|
|
45
|
+
objectValue: string
|
|
46
|
+
) {
|
|
47
|
+
let statement = dataStore.statementsMatching(subject, predicate, null)[0]
|
|
48
|
+
if (!statement) {
|
|
49
|
+
statement = dataStore.add(subject, predicate, lit(objectValue)) as Statement
|
|
50
|
+
} else {
|
|
51
|
+
statement.object = lit(objectValue)
|
|
52
|
+
}
|
|
53
|
+
return statement
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function getOrAddLocalizedLiteral(
|
|
57
|
+
dataStore: Store,
|
|
58
|
+
subject: Quad_Subject,
|
|
59
|
+
predicate: Quad_Predicate,
|
|
60
|
+
objectValue: string,
|
|
61
|
+
language: string
|
|
62
|
+
) {
|
|
63
|
+
const statements = dataStore.statementsMatching(subject, predicate, null)
|
|
64
|
+
const withMatchingLanguage = statements.filter(
|
|
65
|
+
(statement) =>
|
|
66
|
+
statement.object instanceof Literal &&
|
|
67
|
+
statement.object.language.startsWith(language)
|
|
68
|
+
)
|
|
69
|
+
const withNoLanguage = statements.filter(
|
|
70
|
+
(statement) =>
|
|
71
|
+
statement.object instanceof Literal && !statement.object.language
|
|
72
|
+
)
|
|
73
|
+
let statement = withMatchingLanguage[0] || withNoLanguage[0]
|
|
74
|
+
if (!statement) {
|
|
75
|
+
statement = dataStore.add(
|
|
76
|
+
subject,
|
|
77
|
+
predicate,
|
|
78
|
+
lit(objectValue, language)
|
|
79
|
+
) as Statement
|
|
80
|
+
} else {
|
|
81
|
+
statement.object = lit(objectValue, language)
|
|
82
|
+
}
|
|
83
|
+
return statement
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function loadGraph(
|
|
87
|
+
dataStore: Store,
|
|
88
|
+
document: string,
|
|
89
|
+
contentType: ContentType,
|
|
90
|
+
base = BASE_URI
|
|
91
|
+
) {
|
|
92
|
+
return new Promise((resolve) =>
|
|
93
|
+
parse(document, dataStore, base, contentType, resolve)
|
|
94
|
+
)
|
|
95
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parts are [firstName, lastName]
|
|
3
|
+
* Second part will be null if no separation could be done
|
|
4
|
+
* @param fullName
|
|
5
|
+
*/
|
|
6
|
+
export function fullNameToParts(fullName: string): [string, string | null] {
|
|
7
|
+
const parts = fullName.trim().split(/\s+/)
|
|
8
|
+
const first = parts.shift()
|
|
9
|
+
return [first, parts.join(' ').trim() || null]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function namePartsToFull(
|
|
13
|
+
firstName: string | null,
|
|
14
|
+
lastName: string | null
|
|
15
|
+
): string | null {
|
|
16
|
+
const first = firstName?.trim()
|
|
17
|
+
const last = lastName?.trim()
|
|
18
|
+
if (!first && !last) return null
|
|
19
|
+
return last && first ? `${first} ${last}` : last || first
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { KeywordType } from '../../../../../../../libs/common/domain/src/lib/model/thesaurus'
|
|
2
|
+
|
|
3
|
+
export function getKeywordTypeFromKeywordTypeCode(
|
|
4
|
+
typeCode: string
|
|
5
|
+
): KeywordType {
|
|
6
|
+
if (!typeCode) return 'other'
|
|
7
|
+
switch (typeCode) {
|
|
8
|
+
case 'theme':
|
|
9
|
+
case 'place':
|
|
10
|
+
case 'temporal':
|
|
11
|
+
case 'other':
|
|
12
|
+
return typeCode
|
|
13
|
+
default:
|
|
14
|
+
return 'other'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Role } from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
2
|
+
|
|
3
|
+
export function getRoleFromRoleCode(roleCode: string): Role {
|
|
4
|
+
if (!roleCode) return 'unspecified'
|
|
5
|
+
switch (roleCode) {
|
|
6
|
+
case 'author':
|
|
7
|
+
case 'coAuthor':
|
|
8
|
+
return 'author'
|
|
9
|
+
case 'originator':
|
|
10
|
+
return 'originator'
|
|
11
|
+
case 'principalInvestigator':
|
|
12
|
+
return 'principal_investigator'
|
|
13
|
+
case 'resourceProvider':
|
|
14
|
+
return 'resource_provider'
|
|
15
|
+
case 'processor':
|
|
16
|
+
return 'processor'
|
|
17
|
+
case 'custodian':
|
|
18
|
+
return 'custodian'
|
|
19
|
+
case 'owner':
|
|
20
|
+
return 'owner'
|
|
21
|
+
case 'pointOfContact':
|
|
22
|
+
return 'point_of_contact'
|
|
23
|
+
case 'publisher':
|
|
24
|
+
return 'publisher'
|
|
25
|
+
case 'distributor':
|
|
26
|
+
return 'distributor'
|
|
27
|
+
case 'user':
|
|
28
|
+
return 'user'
|
|
29
|
+
case 'collaborator':
|
|
30
|
+
return 'collaborator'
|
|
31
|
+
case 'editor':
|
|
32
|
+
return 'editor'
|
|
33
|
+
case 'contributor':
|
|
34
|
+
return 'contributor'
|
|
35
|
+
case 'stakeholder':
|
|
36
|
+
return 'stakeholder'
|
|
37
|
+
case 'sponsor':
|
|
38
|
+
return 'sponsor'
|
|
39
|
+
case 'funder':
|
|
40
|
+
return 'funder'
|
|
41
|
+
case 'rightsHolder':
|
|
42
|
+
return 'rights_holder'
|
|
43
|
+
case 'mediator':
|
|
44
|
+
return 'mediator'
|
|
45
|
+
default:
|
|
46
|
+
return 'other'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { BlankNode, Literal, NamedNode, Statement, Store, sym } from 'rdflib'
|
|
2
|
+
import { XmlElement, XmlText } from '@rgrove/parse-xml'
|
|
3
|
+
import { DCAT, FOAF, RDF } from '../namespaces'
|
|
4
|
+
import { createDocument, NAMESPACES, xmlToString } from '../../xml-utils'
|
|
5
|
+
import { BASE_URI } from './uri'
|
|
6
|
+
|
|
7
|
+
function fullNameToXml(fullName: string): [string, string] {
|
|
8
|
+
for (const key in NAMESPACES) {
|
|
9
|
+
if (fullName.startsWith(NAMESPACES[key])) {
|
|
10
|
+
return [key, fullName.replace(NAMESPACES[key], '')]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return [null, fullName]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function createXmlElementFromNode(
|
|
17
|
+
dataStore: Store,
|
|
18
|
+
node: NamedNode | Literal
|
|
19
|
+
): XmlElement | XmlText {
|
|
20
|
+
if (node instanceof Literal) {
|
|
21
|
+
return new XmlText(node.value)
|
|
22
|
+
}
|
|
23
|
+
const type = dataStore.the(node, RDF('type')) as NamedNode
|
|
24
|
+
if (!type) return null
|
|
25
|
+
|
|
26
|
+
const statements = dataStore.statementsMatching(node, null, null)
|
|
27
|
+
const children = statements
|
|
28
|
+
// filtering out the rdf:type statements because they are already used above
|
|
29
|
+
.filter((statement) => statement.predicate.value !== RDF('type').value)
|
|
30
|
+
.map((statement) => {
|
|
31
|
+
if (statement.object.toString() === statement.subject.toString()) {
|
|
32
|
+
return null
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// special cases: foaf:primaryTopic in dcat:CatalogRecord
|
|
36
|
+
if (statement.predicate.value === FOAF('primaryTopic').value) {
|
|
37
|
+
return new XmlElement(`foaf:primaryTopic`, {
|
|
38
|
+
'rdf:resource': statement.object.value,
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const [namespace, name] = fullNameToXml(statement.predicate.value)
|
|
43
|
+
const objectNode = createXmlElementFromNode(
|
|
44
|
+
dataStore,
|
|
45
|
+
statement.object as NamedNode
|
|
46
|
+
)
|
|
47
|
+
if (!objectNode) {
|
|
48
|
+
// no object node: simply use the object value
|
|
49
|
+
return new XmlElement(
|
|
50
|
+
`${namespace}:${name}`,
|
|
51
|
+
{
|
|
52
|
+
'rdf:resource': statement.object.value,
|
|
53
|
+
},
|
|
54
|
+
[]
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
// wrap the object node in the predicate one
|
|
58
|
+
return new XmlElement(`${namespace}:${name}`, {}, [objectNode])
|
|
59
|
+
})
|
|
60
|
+
.filter((child) => !!child)
|
|
61
|
+
const [namespace, name] = fullNameToXml(type.value)
|
|
62
|
+
const attributes =
|
|
63
|
+
node instanceof BlankNode
|
|
64
|
+
? {}
|
|
65
|
+
: {
|
|
66
|
+
'rdf:about': node.value,
|
|
67
|
+
}
|
|
68
|
+
return new XmlElement(`${namespace}:${name}`, attributes, children)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* This will output an XML document serialized as string, tailored in a way that it
|
|
73
|
+
* can be understood and indexed by GN4 dcat-ap plugin
|
|
74
|
+
* @param dataStore
|
|
75
|
+
*/
|
|
76
|
+
export function exportGraphToXml(dataStore: Store): string {
|
|
77
|
+
// we start with the catalog node (which is created if missing)
|
|
78
|
+
let catalogNode = dataStore.statementsMatching(
|
|
79
|
+
null,
|
|
80
|
+
RDF('type'),
|
|
81
|
+
DCAT('Catalog')
|
|
82
|
+
)[0]?.subject as NamedNode
|
|
83
|
+
if (!catalogNode) {
|
|
84
|
+
const recordNode = dataStore.the(null, RDF('type'), DCAT('CatalogRecord'))
|
|
85
|
+
const statement = dataStore.add(
|
|
86
|
+
sym(`${BASE_URI}catalog`),
|
|
87
|
+
RDF('type'),
|
|
88
|
+
DCAT('Catalog')
|
|
89
|
+
) as Statement
|
|
90
|
+
catalogNode = statement.subject as NamedNode
|
|
91
|
+
dataStore.add(catalogNode, DCAT('record'), recordNode)
|
|
92
|
+
}
|
|
93
|
+
const rootEl = new XmlElement('rdf:RDF', {}, [
|
|
94
|
+
createXmlElementFromNode(dataStore, catalogNode),
|
|
95
|
+
])
|
|
96
|
+
return xmlToString(createDocument(rootEl))
|
|
97
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RecordStatus } from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
2
|
+
|
|
3
|
+
export function getStatusFromStatusCode(statusCode: string): RecordStatus {
|
|
4
|
+
switch (statusCode) {
|
|
5
|
+
case 'completed':
|
|
6
|
+
return 'completed'
|
|
7
|
+
case 'historicalArchive':
|
|
8
|
+
return 'removed'
|
|
9
|
+
case 'obsolete':
|
|
10
|
+
return 'deprecated'
|
|
11
|
+
case 'onGoing':
|
|
12
|
+
return 'ongoing'
|
|
13
|
+
case 'planned':
|
|
14
|
+
case 'required':
|
|
15
|
+
case 'underDevelopment':
|
|
16
|
+
default:
|
|
17
|
+
return 'under_development'
|
|
18
|
+
}
|
|
19
|
+
}
|