geonetwork-ui 2.10.0-dev.4edf16e9b → 2.10.0-dev.4f8e80786

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 (29) hide show
  1. package/fesm2022/geonetwork-ui.mjs +47 -5
  2. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  3. package/index.d.ts +10 -1
  4. package/index.d.ts.map +1 -1
  5. package/package.json +1 -1
  6. package/src/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.ts +11 -0
  7. package/src/libs/api/metadata-converter/src/lib/fixtures/eu.dcat-ap.records.ts +2 -0
  8. package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +22 -0
  9. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.reuse+ongules.ts +1 -0
  10. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.reuse+roilaye.ts +1 -0
  11. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +1 -0
  12. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -0
  13. package/src/libs/api/metadata-converter/src/lib/fixtures/georhena.records.ts +1 -0
  14. package/src/libs/api/metadata-converter/src/lib/fixtures/metadata-for-i18n.records.ts +2 -0
  15. package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +22 -0
  16. package/src/libs/api/metadata-converter/src/lib/fixtures/opendataswiss.records.ts +1 -0
  17. package/src/libs/api/metadata-converter/src/lib/fixtures/sextant.records.ts +2 -0
  18. package/src/libs/api/metadata-converter/src/lib/fixtures/vlaanderen.dcat-ap.records.ts +1 -0
  19. package/src/libs/api/metadata-converter/src/lib/fixtures/wallonie.records.reuse.ts +1 -0
  20. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.converter.ts +1 -0
  21. package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +4 -0
  22. package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +13 -0
  23. package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +40 -0
  24. package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +13 -4
  25. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +40 -0
  26. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +43 -0
  27. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +10 -0
  28. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +6 -0
  29. package/src/libs/feature/notify-reuse/src/lib/notify-reuse-form/notify-reuse-form.component.ts +19 -10
@@ -244,6 +244,7 @@ export const GEO2FRANCE_REUSE_ONGULES_RECORD: ReuseRecord = {
244
244
  href: 'https://data.ofb.fr/catalogue/Donnees-geographiques-OFB/fre/csw?service=CSW&request=GetRecordById&version=2.0.2&outputSchema=http://www.isotc211.org/2005/gmd&elementSetName=full&id=67c60362-0461-4574-8975-f4e7cfa64d20',
245
245
  },
246
246
  ],
247
+ associatedRecords: [],
247
248
  temporalExtents: [
248
249
  {
249
250
  start: null,
@@ -97,6 +97,7 @@ export const GEO2FRANCE_REUSE_ROILAYE_RECORD: ReuseRecord = {
97
97
  translations: {},
98
98
  lineage: null,
99
99
  sourceRecords: [],
100
+ associatedRecords: [],
100
101
  temporalExtents: [{ start: null, end: null }],
101
102
  reuseType: 'map',
102
103
  }
@@ -123,6 +123,7 @@ Malgré l'attention portée à la création de ces données, il est rappelé que
123
123
  lineage: `Document d’urbanisme numérisé conformément aux prescriptions nationales du CNIG par le Service d'Information Géographique de l'Agglomération de la Région de Compiègne.
124
124
  Ce lot de données produit en 2019, a été numérisé à partir du PCI Vecteur de 2019 et contrôlé par le Service d'Information Géographique de l'Agglomération de la Région de Compiègne.`,
125
125
  sourceRecords: [],
126
+ associatedRecords: [],
126
127
  licenses: [
127
128
  {
128
129
  text: "En dépit des efforts et diligences mis en œuvre pour en vérifier la fiabilité, le fournisseur n’est pas en mesure de garantir l’exactitude, la mise à jour, l’intégrité, l’exhaustivité des données et en particulier que les données sont exemptes d'erreurs, notamment de localisation, d’identification ou d’actualisation ou d’imprécisions. Les données ne sont pas fournies en vue d'une utilisation particulière et aucune garantie quant à leur aptitude à un usage particulier n'est apportée par le fournisseur. En conséquence, les utilisateurs utilisent les données sous leur responsabilité pleine et entière, à leurs risques et périls, sans recours possible contre le fournisseur dont la responsabilité ne saurait être engagée du fait d’un dommage résultant directement ou indirectement de l’utilisation de ces données. En particulier, il appartient aux utilisateurs d’apprécier, sous leur seule responsabilité : – l'opportunité d'utiliser les données ; – la compatibilité des fichiers avec leurs systèmes informatiques ; – l’adéquation des données à leurs besoins ; – qu’ils disposent de la compétence suffisante pour utiliser les données ; – l’opportunité d’utiliser la documentation ou les outils d’analyse fournis ou préconisés, en relation avec l’utilisation des données, le cas échéant. Le fournisseur n’est en aucune façon responsable des éléments extérieurs aux données et notamment des outils d’analyse, matériels, logiciels, réseaux..., utilisés pour consulter et/ou traiter les données, même s’il a préconisé ces éléments. L’utilisateur veille à vérifier que l’actualité des informations mises à disposition est compatible avec l’usage qu’il en fait.",
@@ -547,6 +547,7 @@ export const GEOCAT_CH_DATASET_RECORD: DatasetRecord = {
547
547
  lineage:
548
548
  'Digitalisiert nach den administrativen Einheiten der Schweiz, die im Anhang des Übereinkommens erscheinen.',
549
549
  sourceRecords: [],
550
+ associatedRecords: [],
550
551
  licenses: [
551
552
  {
552
553
  text: "Licence passée entre l'Office fédéral de l'environnement (OFEV), et le canton de Fribourg, représenté par la Coordination SIT (SITel)",
@@ -207,6 +207,7 @@ export const GEORHENA_REUSE_SOLAIRE_RECORD: ReuseRecord = {
207
207
  },
208
208
  lineage: null,
209
209
  sourceRecords: [],
210
+ associatedRecords: [],
210
211
  temporalExtents: [
211
212
  {
212
213
  start: new Date('2016-01-01T00:00:00.000Z'),
@@ -2171,6 +2171,7 @@ export const METADATA_FOR_I18N_DATASET_RECORD: DatasetRecord = {
2171
2171
  status: 'completed',
2172
2172
  lineage: 'This is a statement about the lineage.',
2173
2173
  sourceRecords: [],
2174
+ associatedRecords: [],
2174
2175
  spatialRepresentation: 'vector',
2175
2176
  temporalExtents: [],
2176
2177
  updateFrequency: 'continual',
@@ -4236,6 +4237,7 @@ export const METADATA_FOR_I18N_NO_OTHERLANGUAGE: DatasetRecord = {
4236
4237
  status: 'completed',
4237
4238
  lineage: 'This is a statement about the lineage.',
4238
4239
  sourceRecords: [],
4240
+ associatedRecords: [],
4239
4241
  spatialRepresentation: 'vector',
4240
4242
  temporalExtents: [],
4241
4243
  updateFrequency: 'continual',
@@ -420,6 +420,28 @@ Cette donnée a été intégrée dans la base de données routière (BDR). Les D
420
420
  Ces données, intégrées dans la Banque de Données routières (BDR), ont fait l’objet d’une mise à jour massive en 2014-2015.
421
421
  Depuis, ce sont les Districts routiers qui assurent la tenue à jour de ces informations directement dans la base de données.`,
422
422
  sourceRecords: [],
423
+ associatedRecords: [
424
+ {
425
+ uuid: 'b1882436-3016-421e-9dfd-0326cca998f2',
426
+ associationType: 'crossReference',
427
+ },
428
+ {
429
+ uuid: 'b1741571-bbda-4732-a807-cbc36b64d54f',
430
+ associationType: 'crossReference',
431
+ },
432
+ {
433
+ uuid: 'bdcb789c-4b02-4c0c-863a-98dac4ed0240',
434
+ associationType: 'crossReference',
435
+ },
436
+ {
437
+ uuid: 'c0112b86-a6e3-4df3-9da1-2927376076f4',
438
+ associationType: 'partOfSeamlessDatabase',
439
+ },
440
+ {
441
+ uuid: '7451e2bd-22e8-4a74-a999-01c58b630369',
442
+ associationType: 'largerWorkCitation',
443
+ },
444
+ ],
423
445
  otherConstraints: [],
424
446
  overviews: [
425
447
  {
@@ -371,6 +371,7 @@ export const OPENDATASWISS_DATASET_RECORD: DatasetRecord = {
371
371
  ],
372
372
  lineage: '',
373
373
  sourceRecords: [],
374
+ associatedRecords: [],
374
375
  ownerOrganization: {
375
376
  name: 'Bundesamt für Energie',
376
377
  },
@@ -83,6 +83,7 @@ export const SEXTANT_BATHYMETRY_DATASET_RECORD: DatasetRecord = {
83
83
  Produit interne Ifremer.`,
84
84
  lineage: '',
85
85
  sourceRecords: [],
86
+ associatedRecords: [],
86
87
  ownerOrganization: null,
87
88
  recordUpdated: new Date('2020-06-03T22:34:05.000Z'),
88
89
  resourceUpdated: new Date('2020-06-03T22:34:05.000Z'),
@@ -324,6 +325,7 @@ export const SEXTANT_CURRENTS_DATASET_RECORD: CatalogRecord = {
324
325
  lineage:
325
326
  'Sallée, J.B.; Speer, K and Morrow, R. Southern Ocean fronts and their variability to climate modes, Journ. of Climate, 2008, Vol. 21(12), pp. 3020-3039',
326
327
  sourceRecords: [],
328
+ associatedRecords: [],
327
329
  onlineResources: [
328
330
  {
329
331
  name: 'Digital Object Identifier (DOI)',
@@ -69,6 +69,7 @@ export const VLAANDEREN_DATASET_RECORD: DatasetRecord = {
69
69
  topics: ['biodiversity'],
70
70
  lineage: '',
71
71
  sourceRecords: [],
72
+ associatedRecords: [],
72
73
  recordUpdated: new Date('2024-09-19T01:15:09.732Z'),
73
74
  resourceUpdated: new Date('2021-04-14T11:15+02:00'),
74
75
  status: 'completed',
@@ -455,5 +455,6 @@ export const WALLONIE_REUSE_SPW_RECORD: ReuseRecord = {
455
455
  href: 'https://metawal.wallonie.be/geonetwork/srv/api/records/ee965118-2416-4d48-b07e-bbc696f002c2',
456
456
  },
457
457
  ],
458
+ associatedRecords: [],
458
459
  temporalExtents: [],
459
460
  }
@@ -25,6 +25,7 @@ export class Gn4Converter extends BaseConverter<Gn4Record> {
25
25
  status: null,
26
26
  lineage: null,
27
27
  sourceRecords: [],
28
+ associatedRecords: [],
28
29
  recordUpdated: null,
29
30
  recordPublished: null,
30
31
  ownerOrganization: null,
@@ -3,6 +3,7 @@ import { XmlElement } from '@rgrove/parse-xml'
3
3
  import { Iso19139Converter } from '../iso19139'
4
4
  import { renameElements } from '../xml-utils'
5
5
  import {
6
+ readAssociatedRecords,
6
7
  readContacts,
7
8
  readContactsForResource,
8
9
  readDefaultLanguage,
@@ -20,6 +21,7 @@ import {
20
21
  readUniqueIdentifier,
21
22
  } from './read-parts'
22
23
  import {
24
+ writeAssociatedRecords,
23
25
  writeContacts,
24
26
  writeContactsForResource,
25
27
  writeDefaultLanguage,
@@ -56,6 +58,7 @@ export class Iso191153Converter extends Iso19139Converter {
56
58
  this.readers['landingPage'] = readLandingPage
57
59
  this.readers['lineage'] = readLineage
58
60
  this.readers['sourceRecords'] = readSourceRecords
61
+ this.readers['associatedRecords'] = readAssociatedRecords
59
62
  this.readers['onlineResources'] = readOnlineResources
60
63
  this.readers['defaultLanguage'] = readDefaultLanguage
61
64
  this.readers['otherLanguages'] = readOtherLanguages
@@ -76,6 +79,7 @@ export class Iso191153Converter extends Iso19139Converter {
76
79
  this.writers['landingPage'] = writeLandingPage
77
80
  this.writers['lineage'] = writeLineage
78
81
  this.writers['sourceRecords'] = writeSourceRecords
82
+ this.writers['associatedRecords'] = writeAssociatedRecords
79
83
  this.writers['onlineResources'] = writeOnlineResources
80
84
  this.writers['status'] = writeStatus
81
85
  this.writers['spatialRepresentation'] = writeSpatialRepresentation
@@ -18,6 +18,7 @@ import {
18
18
  pipe,
19
19
  } from '../function-utils'
20
20
  import {
21
+ extractAssociatedRecords,
21
22
  extractCharacterString,
22
23
  extractDatasetOnlineResources,
23
24
  extractDateTime,
@@ -30,6 +31,7 @@ import {
30
31
  findIdentification,
31
32
  } from '../iso19139/read-parts'
32
33
  import {
34
+ AssociatedRecord,
33
35
  Individual,
34
36
  LanguageCode,
35
37
  SourceRecord,
@@ -299,6 +301,17 @@ export function readSourceRecords(rootEl: XmlElement): SourceRecord[] {
299
301
  )
300
302
  }
301
303
 
304
+ export function readAssociatedRecords(rootEl: XmlElement): AssociatedRecord[] {
305
+ return pipe(
306
+ findIdentification(),
307
+ extractAssociatedRecords(
308
+ 'mri:associatedResource',
309
+ 'mri:MD_AssociatedResource',
310
+ pipe(findNestedElement('mri:metadataReference'), readAttribute('uuidref'))
311
+ )
312
+ )(rootEl)
313
+ }
314
+
302
315
  function extractDateInfo(
303
316
  type: 'creation' | 'revision' | 'publication'
304
317
  ): ChainableFunction<XmlElement, Date> {
@@ -11,6 +11,7 @@ import {
11
11
  appendChildTree,
12
12
  createChild,
13
13
  createElement,
14
+ createNestedElement,
14
15
  findChildElement,
15
16
  findChildOrCreate,
16
17
  findChildrenElement,
@@ -576,3 +577,42 @@ export function writeSourceRecords(
576
577
  appendSourceRecords(record.sourceRecords)
577
578
  )(rootEl)
578
579
  }
580
+
581
+ export function writeAssociatedRecords(
582
+ record: DatasetRecord | ReuseRecord,
583
+ rootEl: XmlElement
584
+ ) {
585
+ pipe(
586
+ findOrCreateIdentification(),
587
+ removeChildrenByName('mri:associatedResource'),
588
+ appendChildren(
589
+ ...record.associatedRecords
590
+ .filter((assoc) => assoc.uuid && assoc.associationType)
591
+ .map((assoc) =>
592
+ pipe(
593
+ createNestedElement(
594
+ 'mri:associatedResource',
595
+ 'mri:MD_AssociatedResource'
596
+ ),
597
+ appendChildren(
598
+ pipe(
599
+ createNestedElement(
600
+ 'mri:associationType',
601
+ 'mri:DS_AssociationTypeCode'
602
+ ),
603
+ writeAttribute(
604
+ 'codeList',
605
+ 'http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#DS_AssociationTypeCode'
606
+ ),
607
+ writeAttribute('codeListValue', assoc.associationType)
608
+ ),
609
+ pipe(
610
+ createElement('mri:metadataReference'),
611
+ writeAttribute('uuidref', assoc.uuid)
612
+ )
613
+ )
614
+ )
615
+ )
616
+ )
617
+ )(rootEl)
618
+ }
@@ -21,6 +21,7 @@ import {
21
21
  } from '../xml-utils'
22
22
  import {
23
23
  readAbstract,
24
+ readAssociatedRecords,
24
25
  readContacts,
25
26
  readContactsForResource,
26
27
  readDefaultLanguage,
@@ -53,6 +54,7 @@ import {
53
54
  } from './read-parts'
54
55
  import {
55
56
  writeAbstract,
57
+ writeAssociatedRecords,
56
58
  writeContacts,
57
59
  writeContactsForResource,
58
60
  writeDefaultLanguage,
@@ -115,6 +117,7 @@ export class Iso19139Converter extends BaseConverter<string> {
115
117
  overviews: readOverviews,
116
118
  lineage: readLineage,
117
119
  sourceRecords: readSourceRecords,
120
+ associatedRecords: readAssociatedRecords,
118
121
  onlineResources: readOnlineResources,
119
122
  temporalExtents: readTemporalExtents,
120
123
  spatialExtents: readSpatialExtents,
@@ -157,6 +160,7 @@ export class Iso19139Converter extends BaseConverter<string> {
157
160
  overviews: writeGraphicOverviews,
158
161
  lineage: writeLineage,
159
162
  sourceRecords: writeSourceRecords,
163
+ associatedRecords: writeAssociatedRecords,
160
164
  onlineResources: writeOnlineResources,
161
165
  temporalExtents: writeTemporalExtents,
162
166
  spatialExtents: writeSpatialExtents,
@@ -205,7 +209,7 @@ export class Iso19139Converter extends BaseConverter<string> {
205
209
  record.contacts.map((c) => fixLanguages(c.organization))
206
210
  record.contactsForResource.map((c) => fixLanguages(c.organization))
207
211
  fixLanguages(record.ownerOrganization)
208
- if (record.kind === 'dataset') {
212
+ if (record.kind === 'dataset' || record.kind === 'reuse') {
209
213
  record.spatialExtents.map(fixLanguages)
210
214
  }
211
215
 
@@ -300,6 +304,7 @@ export class Iso19139Converter extends BaseConverter<string> {
300
304
  const temporalExtents = this.readers['temporalExtents'](rootEl, tr)
301
305
  const lineage = this.readers['lineage'](rootEl, tr)
302
306
  const sourceRecords = this.readers['sourceRecords'](rootEl, tr)
307
+ const associatedRecords = this.readers['associatedRecords'](rootEl, tr)
303
308
  const updateFrequency = this.readers['updateFrequency'](rootEl, tr)
304
309
 
305
310
  return this.afterRecordRead({
@@ -308,6 +313,7 @@ export class Iso19139Converter extends BaseConverter<string> {
308
313
  status,
309
314
  lineage,
310
315
  ...(sourceRecords && { sourceRecords }),
316
+ associatedRecords,
311
317
  ...(spatialRepresentation && { spatialRepresentation }),
312
318
  temporalExtents,
313
319
  updateFrequency,
@@ -316,6 +322,7 @@ export class Iso19139Converter extends BaseConverter<string> {
316
322
  } else if (kind === 'reuse') {
317
323
  const lineage = this.readers['lineage'](rootEl, tr)
318
324
  const sourceRecords = this.readers['sourceRecords'](rootEl, tr)
325
+ const associatedRecords = this.readers['associatedRecords'](rootEl, tr)
319
326
  const temporalExtents = this.readers['temporalExtents'](rootEl, tr)
320
327
  const reuseType = this.readers['reuseType'](rootEl, tr)
321
328
 
@@ -324,6 +331,7 @@ export class Iso19139Converter extends BaseConverter<string> {
324
331
  kind,
325
332
  lineage,
326
333
  ...(sourceRecords && { sourceRecords }),
334
+ associatedRecords,
327
335
  temporalExtents,
328
336
  reuseType,
329
337
  } as ReuseRecord)
@@ -408,6 +416,8 @@ export class Iso19139Converter extends BaseConverter<string> {
408
416
 
409
417
  if (record.kind === 'dataset') {
410
418
  fieldChanged('status') && this.writers['status'](record, rootEl)
419
+ }
420
+ if (record.kind === 'dataset' || record.kind === 'reuse') {
411
421
  fieldChanged('updateFrequency') &&
412
422
  this.writers['updateFrequency'](record, rootEl)
413
423
  fieldChanged('spatialRepresentation') &&
@@ -417,13 +427,12 @@ export class Iso19139Converter extends BaseConverter<string> {
417
427
  this.writers['temporalExtents'](record, rootEl)
418
428
  fieldChanged('spatialExtents') &&
419
429
  this.writers['spatialExtents'](record, rootEl)
420
- }
421
-
422
- if (record.kind === 'dataset' || record.kind === 'reuse') {
423
430
  ;(fieldChanged('lineage') || fieldChanged('translations')) &&
424
431
  this.writers['lineage'](record, rootEl)
425
432
  fieldChanged('sourceRecords') &&
426
433
  this.writers['sourceRecords'](record, rootEl)
434
+ fieldChanged('associatedRecords') &&
435
+ this.writers['associatedRecords'](record, rootEl)
427
436
  }
428
437
 
429
438
  fieldChanged('otherLanguages') &&
@@ -1,4 +1,5 @@
1
1
  import {
2
+ AssociatedRecord,
2
3
  Constraint,
3
4
  ConstraintTranslations,
4
5
  DatasetOnlineResource,
@@ -927,6 +928,45 @@ export function readSourceRecords(rootEl: XmlElement): SourceRecord[] {
927
928
  )
928
929
  }
929
930
 
931
+ export function extractAssociatedRecords(
932
+ containerName: string,
933
+ aggregateName: string,
934
+ readUuid: ChainableFunction<XmlElement, string>
935
+ ): ChainableFunction<XmlElement, AssociatedRecord[]> {
936
+ return pipe(
937
+ findChildrenElement(containerName, false),
938
+ mapArray((el) => {
939
+ const aggregateEl = findChildElement(aggregateName, false)(el)
940
+ const uuid = readUuid(aggregateEl)
941
+ const associationType = pipe(
942
+ findNestedElement('gmd:associationType', 'gmd:DS_AssociationTypeCode'),
943
+ readAttribute('codeListValue')
944
+ )(aggregateEl)
945
+ if (!uuid || !associationType) return null
946
+ return { uuid, associationType }
947
+ }),
948
+ filterArray((r): r is AssociatedRecord => r !== null)
949
+ )
950
+ }
951
+
952
+ export function readAssociatedRecords(rootEl: XmlElement): AssociatedRecord[] {
953
+ return pipe(
954
+ findIdentification(),
955
+ extractAssociatedRecords(
956
+ 'gmd:aggregationInfo',
957
+ 'gmd:MD_AggregateInformation',
958
+ pipe(
959
+ findNestedElement(
960
+ 'gmd:aggregateDataSetIdentifier',
961
+ 'gmd:MD_Identifier',
962
+ 'gmd:code'
963
+ ),
964
+ extractCharacterString()
965
+ )
966
+ )
967
+ )(rootEl)
968
+ }
969
+
930
970
  export function readUpdateFrequency(rootEl: XmlElement): UpdateFrequency {
931
971
  return pipe(
932
972
  findIdentification(),
@@ -1267,6 +1267,49 @@ export function writeSourceRecords(
1267
1267
  )(rootEl)
1268
1268
  }
1269
1269
 
1270
+ export function writeAssociatedRecords(
1271
+ record: DatasetRecord | ReuseRecord,
1272
+ rootEl: XmlElement
1273
+ ) {
1274
+ pipe(
1275
+ findOrCreateIdentification(),
1276
+ removeChildrenByName('gmd:aggregationInfo'),
1277
+ appendChildren(
1278
+ ...record.associatedRecords
1279
+ .filter((assoc) => assoc.uuid && assoc.associationType)
1280
+ .map((assoc) =>
1281
+ pipe(
1282
+ createNestedElement(
1283
+ 'gmd:aggregationInfo',
1284
+ 'gmd:MD_AggregateInformation'
1285
+ ),
1286
+ appendChildren(
1287
+ pipe(
1288
+ createNestedElement(
1289
+ 'gmd:aggregateDataSetIdentifier',
1290
+ 'gmd:MD_Identifier',
1291
+ 'gmd:code'
1292
+ ),
1293
+ writeCharacterString(assoc.uuid)
1294
+ ),
1295
+ pipe(
1296
+ createNestedElement(
1297
+ 'gmd:associationType',
1298
+ 'gmd:DS_AssociationTypeCode'
1299
+ ),
1300
+ writeAttribute(
1301
+ 'codeList',
1302
+ 'http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#DS_AssociationTypeCode'
1303
+ ),
1304
+ writeAttribute('codeListValue', assoc.associationType)
1305
+ )
1306
+ )
1307
+ )
1308
+ )
1309
+ )
1310
+ )(rootEl)
1311
+ }
1312
+
1270
1313
  export function getServiceEndpointProtocol(endpoint: ServiceEndpoint): string {
1271
1314
  switch (endpoint.accessServiceProtocol.toLowerCase()) {
1272
1315
  case 'wfs':
@@ -260,11 +260,20 @@ export interface SourceRecord {
260
260
  href?: string
261
261
  }
262
262
 
263
+ /**
264
+ * Represents another record associated with this one (e.g. a parent/sibling dataset).
265
+ */
266
+ export interface AssociatedRecord {
267
+ uuid: string
268
+ associationType: string
269
+ }
270
+
263
271
  export interface DatasetRecord extends BaseRecord {
264
272
  kind: 'dataset'
265
273
  status: RecordStatus
266
274
  lineage: string // Explanation of the origin of this record (e.g: how, why)"
267
275
  sourceRecords: Array<SourceRecord>
276
+ associatedRecords: Array<AssociatedRecord>
268
277
  onlineResources: Array<DatasetOnlineResource>
269
278
  spatialExtents: Array<DatasetSpatialExtent>
270
279
  temporalExtents: Array<DatasetTemporalExtent>
@@ -293,6 +302,7 @@ export interface ReuseRecord extends BaseRecord {
293
302
  kind: 'reuse'
294
303
  lineage: string // Explanation of the origin of this record (e.g: how, why)"
295
304
  sourceRecords: Array<SourceRecord>
305
+ associatedRecords: Array<AssociatedRecord>
296
306
  onlineResources: Array<DatasetOnlineResource>
297
307
  reuseType: ReuseType
298
308
  spatialExtents: Array<DatasetSpatialExtent>
@@ -136,6 +136,7 @@ Cette section contient des *caractères internationaux* (ainsi que des "caractè
136
136
 
137
137
  As such, **it is not very interesting at all.**`,
138
138
  sourceRecords: [],
139
+ associatedRecords: [],
139
140
  licenses: [
140
141
  {
141
142
  text: 'Licence ODbL mai 2013 (basée sur ODbL 1.0)',
@@ -313,6 +314,7 @@ Malgré l'attention portée à la création de ces données, il est rappelé que
313
314
  lineage: `Document d’urbanisme numérisé conformément aux prescriptions nationales du CNIG par le Service d'Information Géographique de l'Agglomération de la Région de Compiègne.
314
315
  Ce lot de données produit en 2019, a été numérisé à partir du PCI Vecteur de 2019 et contrôlé par le Service d'Information Géographique de l'Agglomération de la Région de Compiègne.`,
315
316
  sourceRecords: [],
317
+ associatedRecords: [],
316
318
  legalConstraints: [],
317
319
  securityConstraints: [],
318
320
  otherConstraints: [],
@@ -365,6 +367,7 @@ export const simpleDatasetRecordFixture = (): DatasetRecord => ({
365
367
  spatialExtents: [],
366
368
  temporalExtents: [],
367
369
  sourceRecords: [],
370
+ associatedRecords: [],
368
371
  onlineResources: [
369
372
  {
370
373
  type: 'download',
@@ -418,6 +421,7 @@ export const simpleDatasetRecordWithFcatsFixture = (): DatasetRecord => ({
418
421
  spatialExtents: [],
419
422
  temporalExtents: [],
420
423
  sourceRecords: [],
424
+ associatedRecords: [],
421
425
  onlineResources: [],
422
426
  updateFrequency: { per: 'month', updatedTimes: 3 },
423
427
  translations: {},
@@ -984,6 +988,7 @@ export const multilingualDatasetFixture: () => DatasetRecord = () => ({
984
988
  abstract: 'English Abstract',
985
989
  lineage: 'English Lineage',
986
990
  sourceRecords: [],
991
+ associatedRecords: [],
987
992
  translations: {
988
993
  title: { fr: 'Titre Français', de: 'Titel DE' },
989
994
  abstract: { fr: 'Résumé Français', de: 'Beschreibung DE' },
@@ -1048,6 +1053,7 @@ export const simpleReuseRecordFixture = (): ReuseRecord => ({
1048
1053
  temporalExtents: [],
1049
1054
  lineage: 'bla',
1050
1055
  sourceRecords: [],
1056
+ associatedRecords: [],
1051
1057
  overviews: [],
1052
1058
  defaultLanguage: null,
1053
1059
  otherLanguages: [],
@@ -30,8 +30,10 @@ import {
30
30
  } from '../../../../../../libs/common/domain/src/lib/model/record'
31
31
  import { PlatformServiceInterface } from '../../../../../../libs/common/domain/src/lib/platform.service.interface'
32
32
  import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
33
+ import { NOT_KNOWN_CONSTRAINT } from '../../../../../../libs/feature/editor/src'
33
34
  import { NotificationsService } from '../../../../../../libs/feature/notifications/src'
34
35
  import { ButtonComponent, TextInputComponent } from '../../../../../../libs/ui/inputs/src'
36
+ import { getOptionalEditorConfig } from '../../../../../../libs/util/app-config/src'
35
37
  import { NgIcon, provideIcons, provideNgIconsConfig } from '@ng-icons/core'
36
38
  import { iconoirAppWindow, iconoirPlusCircle } from '@ng-icons/iconoir'
37
39
  import { matCloseOutline } from '@ng-icons/material-icons/outline'
@@ -155,42 +157,49 @@ export class NotifyReuseFormComponent implements OnDestroy {
155
157
 
156
158
  submit() {
157
159
  if (!this.isFormValid()) return
160
+ const defaultLang =
161
+ getOptionalEditorConfig()?.NEW_RECORD_DEFAULT_LANGUAGE ??
162
+ this.translate.currentLang
158
163
  const onlineResource: OnlineLinkResource = {
159
164
  type: 'link',
160
165
  url: new URL(this.url()),
161
- name: this.url(),
162
166
  description: this.translate.instant('notify.reuse.link.description'),
163
167
  }
164
168
  const contact: Individual = {
165
169
  email: this.email(),
166
170
  role: 'point_of_contact',
171
+ organization: { name: this.me()?.organisation },
167
172
  }
168
173
  const reuseRecord: ReuseRecord = {
169
- uniqueIdentifier: '',
170
174
  kind: 'reuse',
175
+ reuseType: 'application',
176
+ uniqueIdentifier: null,
171
177
  title: this.title(),
172
178
  abstract: '',
173
- ownerOrganization: { name: '' },
174
- contacts: [contact],
175
- contactsForResource: [],
179
+ overviews: [],
180
+ ownerOrganization: {
181
+ name: 'Owner organization',
182
+ },
176
183
  recordUpdated: new Date(),
184
+ updateFrequency: 'unknown',
185
+ otherLanguages: [],
186
+ defaultLanguage: defaultLang,
177
187
  topics: [],
178
188
  keywords: [],
179
189
  licenses: [],
180
- legalConstraints: [],
190
+ legalConstraints: [NOT_KNOWN_CONSTRAINT],
181
191
  securityConstraints: [],
182
192
  otherConstraints: [],
183
- overviews: [],
184
- defaultLanguage: 'en',
185
- otherLanguages: [],
193
+ contacts: [],
194
+ contactsForResource: [contact],
186
195
  lineage: '',
187
- reuseType: 'application',
188
196
  sourceRecords: [
189
197
  {
190
198
  uuid: this.record()?.uniqueIdentifier ?? '',
191
199
  title: this.record()?.title ?? '',
192
200
  },
193
201
  ],
202
+ associatedRecords: [],
194
203
  onlineResources: [onlineResource],
195
204
  spatialExtents: [],
196
205
  temporalExtents: [],