geonetwork-ui 2.2.0-dev.95b40cd8 → 2.2.0-dev.9d7dfa2e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/gn4/atomic-operations.mjs +27 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +23 -11
  3. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.mjs +4 -2
  4. package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
  5. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.mjs +14 -0
  6. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/converter.mjs +12 -9
  7. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +33 -8
  8. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +31 -14
  9. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +2 -2
  10. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  11. package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +13 -13
  12. package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +3 -3
  13. package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +3 -3
  14. package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +3 -3
  15. package/esm2022/libs/ui/elements/src/lib/max-lines/max-lines.component.mjs +5 -3
  16. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  17. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +19 -7
  18. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +2 -2
  19. package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +3 -3
  20. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +4 -4
  21. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +3 -3
  22. package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +3 -3
  23. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +3 -3
  24. package/esm2022/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.mjs +3 -3
  25. package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +3 -3
  26. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +6 -6
  27. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
  28. package/esm2022/libs/util/i18n/src/lib/i18n.constants.mjs +18 -1
  29. package/esm2022/libs/util/shared/src/lib/utils/index.mjs +2 -1
  30. package/esm2022/libs/util/shared/src/lib/utils/temporal-extent-union.mjs +32 -0
  31. package/esm2022/translations/de.json +34 -27
  32. package/esm2022/translations/en.json +26 -19
  33. package/esm2022/translations/es.json +23 -16
  34. package/esm2022/translations/fr.json +44 -37
  35. package/esm2022/translations/it.json +38 -31
  36. package/esm2022/translations/nl.json +24 -17
  37. package/esm2022/translations/pt.json +23 -16
  38. package/fesm2022/geonetwork-ui.mjs +465 -258
  39. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  40. package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts +2 -0
  41. package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts.map +1 -1
  42. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  43. package/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.d.ts.map +1 -1
  44. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +4 -5
  45. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
  46. package/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.d.ts +3 -0
  47. package/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.d.ts.map +1 -0
  48. package/libs/api/metadata-converter/src/lib/iso19139/converter.d.ts.map +1 -1
  49. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +3 -3
  50. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
  51. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +1 -1
  52. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
  53. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  54. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +16 -2
  55. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  56. package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts +1 -1
  57. package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts.map +1 -1
  58. package/libs/ui/elements/src/lib/max-lines/max-lines.component.d.ts.map +1 -1
  59. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +9 -3
  60. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
  61. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +13 -13
  62. package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
  63. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  64. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts +1 -1
  65. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
  66. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +40 -40
  67. package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts +1 -1
  68. package/libs/util/i18n/src/lib/i18n.constants.d.ts +17 -0
  69. package/libs/util/i18n/src/lib/i18n.constants.d.ts.map +1 -1
  70. package/libs/util/shared/src/lib/utils/index.d.ts +1 -0
  71. package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
  72. package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts +5 -0
  73. package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts.map +1 -0
  74. package/package.json +1 -1
  75. package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +57 -2
  76. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +52 -6
  77. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +207 -20
  78. package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +29 -0
  79. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +30 -11
  80. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.ts +3 -1
  81. package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +4 -5
  82. package/src/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.ts +16 -0
  83. package/src/libs/api/metadata-converter/src/lib/iso19139/converter.ts +11 -9
  84. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +58 -20
  85. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +86 -38
  86. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +1 -1
  87. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +20 -3
  88. package/src/libs/common/fixtures/src/lib/elasticsearch/full-response.ts +1 -1
  89. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +46 -8
  90. package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +12 -12
  91. package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +3 -4
  92. package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +1 -1
  93. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.css +5 -0
  94. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +39 -0
  95. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +58 -0
  96. package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +1 -0
  97. package/src/libs/ui/elements/src/lib/max-lines/max-lines.component.html +5 -1
  98. package/src/libs/ui/elements/src/lib/max-lines/max-lines.component.ts +1 -0
  99. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +1 -1
  100. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +113 -25
  101. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +20 -3
  102. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.ts +1 -1
  103. package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.html +2 -2
  104. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +1 -1
  105. package/src/libs/ui/inputs/src/lib/button/button.component.ts +1 -0
  106. package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
  107. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +3 -1
  108. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.css +3 -0
  109. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +1 -1
  110. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +1 -0
  111. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +2 -2
  112. package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +1 -0
  113. package/src/libs/util/i18n/src/lib/i18n.constants.ts +18 -0
  114. package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
  115. package/src/libs/util/shared/src/lib/utils/temporal-extent-union.ts +32 -0
  116. package/tailwind.base.css +2 -2
  117. package/translations/de.json +34 -27
  118. package/translations/en.json +26 -19
  119. package/translations/es.json +23 -16
  120. package/translations/fr.json +44 -37
  121. package/translations/it.json +38 -31
  122. package/translations/nl.json +24 -17
  123. package/translations/pt.json +23 -16
  124. package/translations/sk.json +24 -17
@@ -36,6 +36,7 @@ export const GENERIC_DATASET_RECORD: DatasetRecord = {
36
36
  contactsForResource: [],
37
37
  status: 'ongoing',
38
38
  recordCreated: new Date('2022-02-01T15:12:00'),
39
+ recordPublished: new Date('2022-02-01T15:12:00'),
39
40
  recordUpdated: new Date('2022-02-01T15:12:00'),
40
41
  datasetCreated: new Date('2022-09-01T14:18:19'),
41
42
  datasetUpdated: new Date('2022-12-04T15:12:00'),
@@ -57,8 +58,61 @@ Cette section contient des *caractères internationaux* (ainsi que des "caractè
57
58
  url: new URL('http://my-org.net/two.png'),
58
59
  },
59
60
  ],
60
- keywords: ['international', 'test', '_another_keyword_'],
61
- themes: ['testData', 'exampleData'],
61
+ keywords: [
62
+ {
63
+ thesaurus: {
64
+ id: 'geonetwork.thesaurus.local',
65
+ name: 'geonetwork.thesaurus.local',
66
+ },
67
+ type: 'other',
68
+ label: 'international',
69
+ },
70
+ {
71
+ thesaurus: {
72
+ id: 'geonetwork.thesaurus.local',
73
+ name: 'geonetwork.thesaurus.local',
74
+ },
75
+ type: 'other',
76
+ label: 'test',
77
+ },
78
+ {
79
+ thesaurus: {
80
+ id: 'geonetwork.thesaurus.local',
81
+ name: 'geonetwork.thesaurus.local',
82
+ },
83
+ type: 'other',
84
+ label: '_another_keyword_',
85
+ },
86
+ {
87
+ thesaurus: {
88
+ id: 'geonetwork.thesaurus.theme',
89
+ name: 'geonetwork.thesaurus.theme',
90
+ },
91
+ type: 'theme',
92
+ label: 'test theme',
93
+ },
94
+ {
95
+ thesaurus: {
96
+ id: 'geonetwork.thesaurus.place',
97
+ name: 'geonetwork.thesaurus.place',
98
+ },
99
+ type: 'place',
100
+ label: 'test place',
101
+ },
102
+ {
103
+ type: 'theme',
104
+ label: 'themeNoThesaurus',
105
+ },
106
+ {
107
+ type: 'theme',
108
+ label: 'themeNoThesaurus 2',
109
+ },
110
+ {
111
+ type: 'temporal',
112
+ label: 'temporalNoThesaurus',
113
+ },
114
+ ],
115
+ topics: ['agriculture'],
62
116
  spatialRepresentation: 'grid',
63
117
  distributions: [
64
118
  {
@@ -119,4 +173,5 @@ As such, **it is not very interesting at all.**`,
119
173
  updatedTimes: 3,
120
174
  per: 'month',
121
175
  },
176
+ languages: [],
122
177
  }
@@ -18,6 +18,7 @@ export const GEO2FRANCE_PLU_DATASET_RECORD: DatasetRecord = {
18
18
  ],
19
19
  contactsForResource: [],
20
20
  recordCreated: new Date('2022-04-15T14:18:19'),
21
+ recordPublished: new Date('2022-04-15T14:18:19'),
21
22
  recordUpdated: new Date('2022-04-15T14:18:19'),
22
23
  datasetUpdated: new Date('2022-03-29'),
23
24
  title:
@@ -38,13 +39,57 @@ Malgré l'attention portée à la création de ces données, il est rappelé que
38
39
  },
39
40
  ],
40
41
  keywords: [
41
- 'planification',
42
- 'PLU',
43
- "Plan local d'urbanisme",
44
- 'données ouvertes',
45
- 'Avrigny*60036',
42
+ {
43
+ thesaurus: {
44
+ name: 'GEMET - INSPIRE themes, version 1.0',
45
+ id: 'geonetwork.thesaurus.external.theme.inspire-theme',
46
+ url: new URL(
47
+ 'http://geo.compiegnois.fr/geonetwork/srv/eng/thesaurus.download?ref=external.theme.inspire-theme'
48
+ ),
49
+ },
50
+ type: 'theme',
51
+ label: 'Usage des sols',
52
+ },
53
+ {
54
+ thesaurus: {
55
+ name: 'GEMET - Concepts, version 2.4',
56
+ id: 'geonetwork.thesaurus.external.theme.gemet',
57
+ url: new URL(
58
+ 'http://geo.compiegnois.fr/geonetwork/srv/eng/thesaurus.download?ref=external.theme.gemet'
59
+ ),
60
+ },
61
+ type: 'theme',
62
+ label: "document d'urbanisme",
63
+ },
64
+ {
65
+ type: 'other',
66
+ label: 'planification',
67
+ },
68
+ {
69
+ type: 'other',
70
+ label: 'PLU',
71
+ },
72
+ {
73
+ type: 'other',
74
+ label: "Plan local d'urbanisme",
75
+ },
76
+ {
77
+ type: 'other',
78
+ label: 'données ouvertes',
79
+ },
80
+ {
81
+ thesaurus: {
82
+ id: 'geonetwork.thesaurus.external.place.GeoCompiegnois',
83
+ name: 'Collectivités du Pays Compiégnois',
84
+ url: new URL(
85
+ 'http://geo.compiegnois.fr/geonetwork/srv/eng/thesaurus.download?ref=external.place.GeoCompiegnois'
86
+ ),
87
+ },
88
+ type: 'place',
89
+ label: 'Avrigny*60036',
90
+ },
46
91
  ],
47
- themes: ['Usage des sols', "document d'urbanisme"],
92
+ topics: ['planningCadastre'],
48
93
  spatialRepresentation: 'vector',
49
94
  distributions: [
50
95
  {
@@ -74,4 +119,5 @@ Ce lot de données produit en 2019, a été numérisé à partir du PCI Vecteur
74
119
  temporalExtents: [],
75
120
  status: 'completed',
76
121
  updateFrequency: 'unknown',
122
+ languages: [],
77
123
  }
@@ -27,31 +27,192 @@ export const GEOCAT_CH_DATASET_RECORD: DatasetRecord = {
27
27
  ],
28
28
  contactsForResource: [],
29
29
  recordCreated: new Date('2022-02-22T19:40:06'),
30
+ recordPublished: new Date('2022-02-22T19:40:06'),
30
31
  recordUpdated: new Date('2022-02-22T19:40:06'),
31
32
  datasetCreated: new Date('1999-01-01T00:00:00'),
32
33
  datasetUpdated: new Date('2009-01-01'),
33
34
  title: 'Alpenkonvention',
34
35
  abstract: `Perimeter der Alpenkonvention in der Schweiz. Die Alpenkonvention ist ein völkerrechtlicher Vertrag zwischen den acht Alpenländern Deutschland, Frankreich, Italien, Liechtenstein, Monaco, Österreich, Schweiz, Slowenien sowie der Europäischen Union. Das Ziel des Übereinkommens ist der Schutz der Alpen durch eine sektorübergreifende, ganzheitliche und nachhaltige Politik.`,
35
36
  overviews: [],
36
- themes: [
37
- 'Aufbewahrungs- und Archivierungsplanung AAP - Bund',
38
- 'Geobasisdaten',
39
- 'e-geo.ch',
40
- 'opendata.swiss',
41
- 'Nachhaltige Entwicklung',
42
- 'Raumplanung',
43
- 'Bergschutz',
44
- 'Bodenschutz',
45
- 'Umweltpolitik',
46
- 'Umweltpolitik',
47
- 'Verkehr',
48
- 'Verkehr',
49
- 'Verkehr',
50
- 'Umweltüberwachung',
51
- 'Verwaltungseinheiten',
52
- 'BGDI Bundesgeodaten-Infrastruktur',
37
+ topics: ['planningCadastre', 'planningCadastre_Planning'],
38
+ keywords: [
39
+ {
40
+ thesaurus: {
41
+ name: 'geocat.ch',
42
+ id: 'geonetwork.thesaurus.local.theme.geocat.ch',
43
+ url: new URL(
44
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
45
+ ),
46
+ },
47
+ type: 'theme',
48
+ label: 'Aufbewahrungs- und Archivierungsplanung AAP - Bund',
49
+ },
50
+ {
51
+ thesaurus: {
52
+ name: 'geocat.ch',
53
+ id: 'geonetwork.thesaurus.local.theme.geocat.ch',
54
+ url: new URL(
55
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
56
+ ),
57
+ },
58
+ type: 'theme',
59
+ label: 'Geobasisdaten',
60
+ },
61
+ {
62
+ thesaurus: {
63
+ name: 'geocat.ch',
64
+ id: 'geonetwork.thesaurus.local.theme.geocat.ch',
65
+ url: new URL(
66
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
67
+ ),
68
+ },
69
+ type: 'theme',
70
+ label: 'e-geo.ch',
71
+ },
72
+ {
73
+ label: 'opendata.swiss',
74
+ thesaurus: {
75
+ id: 'geonetwork.thesaurus.local.theme.geocat.ch',
76
+ name: 'geocat.ch',
77
+ url: new URL(
78
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
79
+ ),
80
+ },
81
+ type: 'theme',
82
+ },
83
+ {
84
+ label: 'Nachhaltige Entwicklung',
85
+ thesaurus: {
86
+ id: 'geonetwork.thesaurus.external.theme.gemet',
87
+ name: 'GEMET',
88
+ url: new URL(
89
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
90
+ ),
91
+ },
92
+ type: 'theme',
93
+ },
94
+ {
95
+ label: 'Raumplanung',
96
+ thesaurus: {
97
+ id: 'geonetwork.thesaurus.external.theme.gemet',
98
+ name: 'GEMET',
99
+ url: new URL(
100
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
101
+ ),
102
+ },
103
+ type: 'theme',
104
+ },
105
+ {
106
+ label: 'Bergschutz',
107
+ thesaurus: {
108
+ id: 'geonetwork.thesaurus.external.theme.gemet',
109
+ name: 'GEMET',
110
+ url: new URL(
111
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
112
+ ),
113
+ },
114
+ type: 'theme',
115
+ },
116
+ {
117
+ label: 'Bodenschutz',
118
+ thesaurus: {
119
+ id: 'geonetwork.thesaurus.external.theme.gemet',
120
+ name: 'GEMET',
121
+ url: new URL(
122
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
123
+ ),
124
+ },
125
+ type: 'theme',
126
+ },
127
+ {
128
+ label: 'Umweltpolitik',
129
+ thesaurus: {
130
+ id: 'geonetwork.thesaurus.external.theme.gemet',
131
+ name: 'GEMET',
132
+ url: new URL(
133
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
134
+ ),
135
+ },
136
+ type: 'theme',
137
+ },
138
+ {
139
+ label: 'Umweltpolitik',
140
+ thesaurus: {
141
+ id: 'geonetwork.thesaurus.external.theme.gemet',
142
+ name: 'GEMET',
143
+ url: new URL(
144
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
145
+ ),
146
+ },
147
+ type: 'theme',
148
+ },
149
+ {
150
+ label: 'Verkehr',
151
+ thesaurus: {
152
+ id: 'geonetwork.thesaurus.external.theme.gemet',
153
+ name: 'GEMET',
154
+ url: new URL(
155
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
156
+ ),
157
+ },
158
+ type: 'theme',
159
+ },
160
+ {
161
+ label: 'Verkehr',
162
+ thesaurus: {
163
+ id: 'geonetwork.thesaurus.external.theme.gemet',
164
+ name: 'GEMET',
165
+ url: new URL(
166
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
167
+ ),
168
+ },
169
+ type: 'theme',
170
+ },
171
+ {
172
+ label: 'Verkehr',
173
+ thesaurus: {
174
+ id: 'geonetwork.thesaurus.external.theme.gemet',
175
+ name: 'GEMET',
176
+ url: new URL(
177
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
178
+ ),
179
+ },
180
+ type: 'theme',
181
+ },
182
+ {
183
+ label: 'Umweltüberwachung',
184
+ thesaurus: {
185
+ id: 'geonetwork.thesaurus.external.theme.inspire-theme',
186
+ name: 'GEMET - INSPIRE themes, version 1.0',
187
+ url: new URL(
188
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
189
+ ),
190
+ },
191
+ type: 'theme',
192
+ },
193
+ {
194
+ label: 'Verwaltungseinheiten',
195
+ thesaurus: {
196
+ id: 'geonetwork.thesaurus.external.theme.inspire-theme',
197
+ name: 'GEMET - INSPIRE themes, version 1.0',
198
+ url: new URL(
199
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
200
+ ),
201
+ },
202
+ type: 'theme',
203
+ },
204
+ {
205
+ label: 'BGDI Bundesgeodaten-Infrastruktur',
206
+ thesaurus: {
207
+ id: 'geonetwork.thesaurus.local.theme.geocat.ch',
208
+ name: 'geocat.ch',
209
+ url: new URL(
210
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
211
+ ),
212
+ },
213
+ type: 'theme',
214
+ },
53
215
  ],
54
- keywords: [],
55
216
  spatialRepresentation: 'vector',
56
217
  distributions: [
57
218
  {
@@ -167,6 +328,7 @@ Die Quelle ist zu bezeichnen: „Quelle: Stadt Zürich“.`,
167
328
  temporalExtents: [],
168
329
  status: 'completed',
169
330
  updateFrequency: 'asNeeded',
331
+ languages: [],
170
332
  }
171
333
 
172
334
  export const GEOCAT_CH_SERVICE_RECORD: ServiceRecord = {
@@ -199,6 +361,7 @@ export const GEOCAT_CH_SERVICE_RECORD: ServiceRecord = {
199
361
  },
200
362
  ],
201
363
  recordCreated: new Date('2022-03-07T01:15:51+01:00'),
364
+ recordPublished: new Date('2022-03-07T01:15:51+01:00'),
202
365
  recordUpdated: new Date('2022-03-07T01:15:51+01:00'),
203
366
  title: 'Verkehrsregelungsanlagen (WMS)',
204
367
  abstract: `Diese Karte beinhaltet die Verkehrsregelungsanlagen des Kantons St.Gallen.`,
@@ -210,8 +373,31 @@ export const GEOCAT_CH_SERVICE_RECORD: ServiceRecord = {
210
373
  description: 'Vorschaubild',
211
374
  },
212
375
  ],
213
- themes: [],
214
- keywords: ['Verkehr', 'opendata.swiss'],
376
+ topics: [],
377
+ keywords: [
378
+ {
379
+ label: 'Verkehr',
380
+ thesaurus: {
381
+ id: 'geonetwork.thesaurus.external.theme.gemet',
382
+ name: 'GEMET',
383
+ url: new URL(
384
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
385
+ ),
386
+ },
387
+ type: 'other',
388
+ },
389
+ {
390
+ label: 'opendata.swiss',
391
+ thesaurus: {
392
+ id: 'geonetwork.thesaurus.local.theme.geocat.ch',
393
+ name: 'geocat.ch',
394
+ url: new URL(
395
+ 'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/registries/vocabularies/local.theme.geocat.ch'
396
+ ),
397
+ },
398
+ type: 'other',
399
+ },
400
+ ],
215
401
  onlineResources: [
216
402
  {
217
403
  type: 'link',
@@ -237,4 +423,5 @@ export const GEOCAT_CH_SERVICE_RECORD: ServiceRecord = {
237
423
  legalConstraints: [],
238
424
  securityConstraints: [],
239
425
  otherConstraints: [],
426
+ languages: [],
240
427
  }
@@ -3,6 +3,8 @@ import {
3
3
  Organization,
4
4
  } from '../../../../../../libs/common/domain/src/lib/model/record'
5
5
  import { getRoleFromRoleCode } from '../iso19139/codelists/role.mapper'
6
+ import { Thesaurus } from './types'
7
+ import { getKeywordTypeFromKeywordTypeCode } from '../iso19139/codelists/keyword.mapper'
6
8
 
7
9
  export type SourceWithUnknownProps = { [key: string]: unknown }
8
10
 
@@ -98,3 +100,30 @@ export const mapContact = (
98
100
  ...(phone && { phone }),
99
101
  }
100
102
  }
103
+
104
+ export const mapKeywords = (thesauri: Thesaurus[], language: string) => {
105
+ const keywords = []
106
+ for (const thesaurusId in thesauri) {
107
+ const rawThesaurus = thesauri[thesaurusId]
108
+ let thesaurus = null
109
+ if (rawThesaurus.id) {
110
+ const thesaurusSource: SourceWithUnknownProps = { ...rawThesaurus }
111
+ const url = getAsUrl(selectField(thesaurusSource, 'link'))
112
+ const name = selectField(thesaurusSource, 'title')
113
+ thesaurus = {
114
+ id: rawThesaurus.id,
115
+ ...(name && { name }),
116
+ ...(url && { url }),
117
+ }
118
+ }
119
+ for (const keyword of rawThesaurus.keywords) {
120
+ keywords.push({
121
+ label: selectTranslatedValue<string>(keyword, language),
122
+ type: getKeywordTypeFromKeywordTypeCode(rawThesaurus.theme),
123
+ ...(thesaurus && { thesaurus }),
124
+ })
125
+ }
126
+ }
127
+
128
+ return keywords
129
+ }
@@ -4,6 +4,7 @@ import {
4
4
  getAsUrl,
5
5
  getFirstValue,
6
6
  mapContact,
7
+ mapKeywords,
7
8
  selectFallback,
8
9
  selectFallbackFields,
9
10
  selectField,
@@ -27,7 +28,8 @@ import {
27
28
  OnlineLinkResource,
28
29
  } from '../../../../../../libs/common/domain/src/lib/model/record'
29
30
  import { matchProtocol } from '../common/distribution.mapper'
30
- import { LangService } from '../../../../../../libs/util/i18n/src'
31
+ import { Thesaurus } from './types'
32
+ import { LANG_3_TO_2_MAPPER, LangService } from '../../../../../../libs/util/i18n/src'
31
33
 
32
34
  type ESResponseSource = SourceWithUnknownProps
33
35
 
@@ -92,8 +94,8 @@ export class Gn4FieldMapper {
92
94
  },
93
95
  cl_topic: (output, source) => ({
94
96
  ...output,
95
- themes: [
96
- ...(output.themes || []),
97
+ topics: [
98
+ ...(output.topics || []),
97
99
  ...getAsArray(
98
100
  selectField<SourceWithUnknownProps[]>(source, 'cl_topic')
99
101
  ).map((topic) => selectTranslatedValue<string>(topic, this.lang3)),
@@ -130,6 +132,22 @@ export class Gn4FieldMapper {
130
132
  ...output,
131
133
  recordUpdated: toDate(selectField<string>(source, 'changeDate')),
132
134
  }),
135
+ publicationDateForResource: (output, source) => ({
136
+ ...output,
137
+ recordPublished: toDate(
138
+ selectField<string>(source, 'publicationDateForResource')
139
+ ),
140
+ }),
141
+ resourceLanguage: (output, source) => {
142
+ const langList = getAsArray(
143
+ selectField<string>(source, 'resourceLanguage')
144
+ )
145
+ const languages = langList.map((lang) => LANG_3_TO_2_MAPPER[lang])
146
+ return {
147
+ ...output,
148
+ languages,
149
+ }
150
+ },
133
151
  link: (output, source) => {
134
152
  const rawLinks = getAsArray(
135
153
  selectField<SourceWithUnknownProps[]>(source, 'link')
@@ -171,16 +189,17 @@ export class Gn4FieldMapper {
171
189
  output
172
190
  )
173
191
  },
174
- tag: (output, source) => ({
192
+ allKeywords: (output, source) => ({
175
193
  ...output,
176
- keywords: getAsArray(
177
- selectField<SourceWithUnknownProps[]>(source, 'tag')
178
- ).map((tag) => selectTranslatedValue<string>(tag, this.lang3)),
194
+ keywords: mapKeywords(
195
+ selectField<Thesaurus[]>(source, 'allKeywords'),
196
+ this.lang3
197
+ ),
179
198
  }),
180
199
  inspireTheme: (output, source) => ({
181
200
  ...output,
182
- themes: [
183
- ...(output.themes || []),
201
+ topics: [
202
+ ...(output.topics || []),
184
203
  ...getAsArray(selectField(source, 'inspireTheme_syn')),
185
204
  ],
186
205
  }),
@@ -289,9 +308,9 @@ export class Gn4FieldMapper {
289
308
  ],
290
309
  }
291
310
  },
292
- resourceTemporalDateRange: (output, source) => {
311
+ resourceTemporalExtentDateRange: (output, source) => {
293
312
  const ranges = getAsArray(
294
- selectField(source, 'resourceTemporalDateRange')
313
+ selectField(source, 'resourceTemporalExtentDateRange')
295
314
  )
296
315
  return {
297
316
  ...output,
@@ -24,6 +24,7 @@ export class Gn4MetadataMapper extends MetadataBaseMapper<Gn4Record> {
24
24
  status: null,
25
25
  lineage: null,
26
26
  recordUpdated: null,
27
+ recordPublished: null,
27
28
  ownerOrganization: null,
28
29
  licenses: [],
29
30
  legalConstraints: [],
@@ -32,10 +33,11 @@ export class Gn4MetadataMapper extends MetadataBaseMapper<Gn4Record> {
32
33
  contacts: [],
33
34
  contactsForResource: [],
34
35
  keywords: [],
35
- themes: [],
36
+ topics: [],
36
37
  spatialExtents: [],
37
38
  temporalExtents: [],
38
39
  overviews: [],
40
+ languages: [],
39
41
  }
40
42
  const record: CatalogRecord = Object.keys(_source).reduce(
41
43
  (prev, fieldName) =>
@@ -56,15 +56,13 @@ interface SpecificationConformance {
56
56
  pass: BooleanString
57
57
  }
58
58
 
59
- type Keyword = MultilingualField
60
- type Keywords = Keyword[]
61
59
  type ThesaurusName = string
62
- interface Thesaurus {
60
+ export interface Thesaurus {
63
61
  id?: string
64
62
  title?: string
65
63
  theme?: string
66
64
  link?: string
67
- keywords: Keywords
65
+ keywords: MultilingualField[]
68
66
  }
69
67
 
70
68
  export interface Link {
@@ -152,6 +150,7 @@ export type MetadataObject = Partial<{
152
150
  pointOfContactOrg: string
153
151
  pointOfContactOrgForResource: string
154
152
  popularity: number
153
+ publicationDateForResource: string
155
154
  rating: string
156
155
  record: string
157
156
  recordGroup: string
@@ -175,7 +174,7 @@ export type MetadataObject = Partial<{
175
174
  specificationConformance: MaybeArray<SpecificationConformance>
176
175
  standardNameObject: MultilingualField
177
176
  standardVersionObject: MultilingualField
178
- tag: Keywords
177
+ tag: MultilingualField[]
179
178
  tagNumber: string
180
179
  userSavedCount: string
181
180
  userinfo: string
@@ -0,0 +1,16 @@
1
+ import { KeywordType } from '../../../../../../../libs/common/domain/src/lib/model/record'
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
+ }