geonetwork-ui 2.10.0-dev.02185426a → 2.10.0-dev.08a12212e
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/fesm2022/geonetwork-ui.mjs +272 -102
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +39 -18
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.ts +11 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/eu.dcat-ap.records.ts +2 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +22 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.reuse+ongules.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.reuse+roilaye.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/georhena.records.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/metadata-for-i18n.records.ts +2 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +22 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/opendataswiss.records.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/sextant.records.ts +2 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/vlaanderen.dcat-ap.records.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/wallonie.records.reuse.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.converter.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +4 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +13 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +45 -1
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +13 -1
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +40 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +47 -1
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +7 -3
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +9 -20
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +10 -0
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +2 -1
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +6 -0
- package/src/libs/feature/editor/src/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/contact-details/contact-details-form.component.html +7 -6
- package/src/libs/feature/editor/src/lib/components/contact-details/contact-details-form.component.ts +10 -8
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +7 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +2 -0
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +1 -1
- package/src/libs/feature/editor/src/lib/fields.config.ts +44 -1
- package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +4 -0
- package/src/libs/feature/notify-reuse/src/index.ts +1 -0
- package/src/libs/feature/notify-reuse/src/lib/edit-delete-reuse-buttons/edit-delete-reuse-buttons.component.css +0 -0
- package/src/libs/feature/notify-reuse/src/lib/edit-delete-reuse-buttons/edit-delete-reuse-buttons.component.html +23 -0
- package/src/libs/feature/notify-reuse/src/lib/edit-delete-reuse-buttons/edit-delete-reuse-buttons.component.ts +114 -0
- package/src/libs/feature/notify-reuse/src/lib/notify-reuse-form/notify-reuse-form.component.html +111 -1
- package/src/libs/feature/notify-reuse/src/lib/notify-reuse-form/notify-reuse-form.component.ts +221 -8
- package/src/libs/feature/notify-reuse/src/lib/utils/url.ts +16 -0
- package/src/libs/ui/inputs/src/lib/text-input/text-input.component.css +0 -3
- package/src/libs/ui/inputs/src/lib/text-input/text-input.component.html +11 -7
- package/src/libs/ui/inputs/src/lib/text-input/text-input.component.ts +56 -30
- package/src/libs/ui/widgets/src/lib/spinning-loader/spinning-loader.component.html +1 -1
- package/tailwind.base.css +0 -2
- package/translations/de.json +31 -2
- package/translations/en.json +36 -7
- package/translations/es.json +31 -2
- package/translations/fr.json +36 -7
- package/translations/it.json +32 -3
- package/translations/nl.json +31 -2
- package/translations/pt.json +31 -2
- package/translations/sk.json +31 -2
- package/material-styles.css +0 -483
|
@@ -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
|
{
|
|
@@ -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',
|
|
@@ -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> {
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
DatasetRecord,
|
|
4
4
|
Individual,
|
|
5
5
|
LanguageCode,
|
|
6
|
+
ReuseRecord,
|
|
6
7
|
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
7
8
|
import {
|
|
8
9
|
allChildrenElement,
|
|
@@ -10,6 +11,7 @@ import {
|
|
|
10
11
|
appendChildTree,
|
|
11
12
|
createChild,
|
|
12
13
|
createElement,
|
|
14
|
+
createNestedElement,
|
|
13
15
|
findChildElement,
|
|
14
16
|
findChildOrCreate,
|
|
15
17
|
findChildrenElement,
|
|
@@ -566,9 +568,51 @@ export function writeOtherLanguages(record: DatasetRecord, rootEl: XmlElement) {
|
|
|
566
568
|
)(rootEl)
|
|
567
569
|
}
|
|
568
570
|
|
|
569
|
-
export function writeSourceRecords(
|
|
571
|
+
export function writeSourceRecords(
|
|
572
|
+
record: DatasetRecord | ReuseRecord,
|
|
573
|
+
rootEl: XmlElement
|
|
574
|
+
) {
|
|
570
575
|
pipe(
|
|
571
576
|
findNestedChildOrCreate('mdb:resourceLineage', 'mrl:LI_Lineage'),
|
|
572
577
|
appendSourceRecords(record.sourceRecords)
|
|
573
578
|
)(rootEl)
|
|
574
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') &&
|
|
@@ -421,6 +431,8 @@ export class Iso19139Converter extends BaseConverter<string> {
|
|
|
421
431
|
this.writers['lineage'](record, rootEl)
|
|
422
432
|
fieldChanged('sourceRecords') &&
|
|
423
433
|
this.writers['sourceRecords'](record, rootEl)
|
|
434
|
+
fieldChanged('associatedRecords') &&
|
|
435
|
+
this.writers['associatedRecords'](record, rootEl)
|
|
424
436
|
}
|
|
425
437
|
|
|
426
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(),
|
|
@@ -1252,7 +1252,10 @@ export function appendSourceRecords(
|
|
|
1252
1252
|
)
|
|
1253
1253
|
}
|
|
1254
1254
|
|
|
1255
|
-
export function writeSourceRecords(
|
|
1255
|
+
export function writeSourceRecords(
|
|
1256
|
+
record: DatasetRecord | ReuseRecord,
|
|
1257
|
+
rootEl: XmlElement
|
|
1258
|
+
) {
|
|
1256
1259
|
pipe(
|
|
1257
1260
|
findNestedChildOrCreate(
|
|
1258
1261
|
'gmd:dataQualityInfo',
|
|
@@ -1264,6 +1267,49 @@ export function writeSourceRecords(record: DatasetRecord, rootEl: XmlElement) {
|
|
|
1264
1267
|
)(rootEl)
|
|
1265
1268
|
}
|
|
1266
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
|
+
|
|
1267
1313
|
export function getServiceEndpointProtocol(endpoint: ServiceEndpoint): string {
|
|
1268
1314
|
switch (endpoint.accessServiceProtocol.toLowerCase()) {
|
|
1269
1315
|
case 'wfs':
|
|
@@ -327,8 +327,10 @@ export class Gn4Repository implements RecordsRepositoryInterface {
|
|
|
327
327
|
return this.settingsService.allowEditHarvested$.pipe(
|
|
328
328
|
map((allowEditHarvested) => {
|
|
329
329
|
return (
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
(this.platformService.supportsAuthentication() &&
|
|
331
|
+
record.extras?.['edit'] &&
|
|
332
|
+
(!record.extras?.['isHarvested'] || allowEditHarvested)) ??
|
|
333
|
+
false
|
|
332
334
|
)
|
|
333
335
|
})
|
|
334
336
|
)
|
|
@@ -361,8 +363,10 @@ export class Gn4Repository implements RecordsRepositoryInterface {
|
|
|
361
363
|
}
|
|
362
364
|
|
|
363
365
|
openRecordForEdition(
|
|
364
|
-
uniqueIdentifier: string
|
|
366
|
+
uniqueIdentifier: string,
|
|
367
|
+
disableDraft?: boolean
|
|
365
368
|
): Observable<[CatalogRecord, string, boolean] | null> {
|
|
369
|
+
this.disableDraft = disableDraft ?? this.disableDraft
|
|
366
370
|
const draft$ = this.disableDraft
|
|
367
371
|
? of(null)
|
|
368
372
|
: of(this.getRecordFromLocalStorage(uniqueIdentifier))
|
|
@@ -177,26 +177,15 @@ export class Gn4PlatformService implements PlatformServiceInterface {
|
|
|
177
177
|
const editorIds = meResponse.groupsWithEditor ?? []
|
|
178
178
|
const memberIds = meResponse.groupsWithRegisteredUser ?? []
|
|
179
179
|
const adminIds = meResponse.groupsWithUserAdmin ?? []
|
|
180
|
-
|
|
181
|
-
return
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
.map((id) => {
|
|
190
|
-
const group = groupsById.get(id)
|
|
191
|
-
return {
|
|
192
|
-
groupId: group.id,
|
|
193
|
-
groupName: group.name,
|
|
194
|
-
isMember: memberIds.includes(id),
|
|
195
|
-
canEdit: editorIds.includes(id),
|
|
196
|
-
canApprove: reviewerIds.includes(id),
|
|
197
|
-
canAdministrate: adminIds.includes(id),
|
|
198
|
-
}
|
|
199
|
-
})
|
|
180
|
+
|
|
181
|
+
return groups.map((group) => ({
|
|
182
|
+
groupId: group.id,
|
|
183
|
+
groupName: group.name,
|
|
184
|
+
isMember: memberIds.includes(group.id),
|
|
185
|
+
canEdit: editorIds.includes(group.id),
|
|
186
|
+
canApprove: reviewerIds.includes(group.id),
|
|
187
|
+
canAdministrate: adminIds.includes(group.id),
|
|
188
|
+
}))
|
|
200
189
|
})
|
|
201
190
|
)
|
|
202
191
|
}
|
|
@@ -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>
|
|
@@ -39,7 +39,8 @@ export abstract class RecordsRepositoryInterface {
|
|
|
39
39
|
* @returns Observable<[CatalogRecord, string, boolean] | null>
|
|
40
40
|
*/
|
|
41
41
|
abstract openRecordForEdition(
|
|
42
|
-
uniqueIdentifier: string
|
|
42
|
+
uniqueIdentifier: string,
|
|
43
|
+
disableDraft?: boolean
|
|
43
44
|
): Observable<[CatalogRecord, string, boolean] | null>
|
|
44
45
|
|
|
45
46
|
/**
|
|
@@ -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: [],
|
|
@@ -3,6 +3,7 @@ export * from './lib/+state/editor.facade'
|
|
|
3
3
|
export * from './lib/+state/editor.models'
|
|
4
4
|
export * from './lib/+state/editor.reducer'
|
|
5
5
|
export * from './lib/+state/editor.selectors'
|
|
6
|
+
export * from './lib/components/contact-details/contact-details-form.component'
|
|
6
7
|
export * from './lib/components/import-record/import-record.component'
|
|
7
8
|
export * from './lib/components/metadata-quality-panel/metadata-quality-panel.component'
|
|
8
9
|
export * from './lib/components/multilingual-panel/multilingual-panel.component'
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<gn-ui-text-input
|
|
8
8
|
class="block w-full"
|
|
9
9
|
extraClass="w-full"
|
|
10
|
-
[
|
|
11
|
-
(valueChange)="
|
|
10
|
+
[value]="contact.lastName ?? ''"
|
|
11
|
+
(valueChange)="handleChange({ lastName: $event })"
|
|
12
12
|
[placeholder]="
|
|
13
13
|
'editor.record.form.field.contactDetails.lastName.placeholder'
|
|
14
14
|
| translate
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
<gn-ui-text-input
|
|
24
24
|
class="block w-full"
|
|
25
25
|
extraClass="w-full"
|
|
26
|
-
[
|
|
27
|
-
(valueChange)="
|
|
26
|
+
[value]="contact.firstName ?? ''"
|
|
27
|
+
(valueChange)="handleChange({ firstName: $event })"
|
|
28
28
|
[placeholder]="
|
|
29
29
|
'editor.record.form.field.contactDetails.firstName.placeholder'
|
|
30
30
|
| translate
|
|
@@ -40,8 +40,9 @@
|
|
|
40
40
|
<gn-ui-text-input
|
|
41
41
|
class="block w-full"
|
|
42
42
|
extraClass="w-full"
|
|
43
|
-
[
|
|
44
|
-
|
|
43
|
+
[type]="'email'"
|
|
44
|
+
[value]="contact.email ?? ''"
|
|
45
|
+
(valueChange)="handleChange({ email: $event })"
|
|
45
46
|
[placeholder]="
|
|
46
47
|
'editor.record.form.field.contactDetails.email.placeholder' | translate
|
|
47
48
|
"
|
package/src/libs/feature/editor/src/lib/components/contact-details/contact-details-form.component.ts
CHANGED
|
@@ -24,16 +24,18 @@ export class ContactDetailsFormComponent {
|
|
|
24
24
|
@Input() contact: Individual
|
|
25
25
|
@Output() contactChange = new EventEmitter<Individual>()
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
// emit a fresh contact on each change; never mutate the @Input
|
|
28
|
+
handleChange(change: Partial<Individual>) {
|
|
29
|
+
this.contactChange.emit({ ...this.contact, ...change })
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
handleOrganizationChange(change: Partial<Organization>) {
|
|
32
|
-
this.
|
|
33
|
-
...
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
this.contactChange.emit({
|
|
34
|
+
...this.contact,
|
|
35
|
+
organization: {
|
|
36
|
+
...(this.contact.organization ?? ({} as Organization)),
|
|
37
|
+
...change,
|
|
38
|
+
} as Organization,
|
|
39
|
+
})
|
|
38
40
|
}
|
|
39
41
|
}
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html
CHANGED
|
@@ -174,6 +174,13 @@
|
|
|
174
174
|
(valueChange)="valueChange.emit($event)"
|
|
175
175
|
></gn-ui-form-field-online-link-resources>
|
|
176
176
|
</ng-container>
|
|
177
|
+
<ng-container *ngSwitchCase="'onlineResources'">
|
|
178
|
+
<gn-ui-form-field-online-single-link-resource
|
|
179
|
+
*ngIf="modelSpecifier === 'onlineResourceType:singleLink'"
|
|
180
|
+
[value]="valueAsOnlineResources"
|
|
181
|
+
(valueChange)="valueChange.emit($event)"
|
|
182
|
+
></gn-ui-form-field-online-single-link-resource>
|
|
183
|
+
</ng-container>
|
|
177
184
|
</ng-container>
|
|
178
185
|
|
|
179
186
|
<ng-container *ngIf="!model">
|