geonetwork-ui 2.10.0-dev.de2fa8e42 → 2.10.0-dev.e7b9cb6a0
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 +134 -9
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +28 -2
- 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 +9 -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 +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.reuse+ongules.ts +7 -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 +1 -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 +8 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.converter.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +7 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +8 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +8 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +11 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +33 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +33 -0
- package/src/libs/api/repository/src/lib/gn4/auth/auth.service.ts +4 -0
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +54 -32
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +46 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +11 -0
- package/src/libs/common/domain/src/lib/model/user/group.model.ts +8 -0
- package/src/libs/common/domain/src/lib/model/user/index.ts +1 -0
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +2 -0
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +5 -0
- package/src/libs/feature/editor/src/lib/services/editor.service.ts +1 -1
- package/src/libs/util/app-config/src/lib/app-config.ts +14 -1
- package/src/libs/util/app-config/src/lib/model.ts +3 -0
- package/src/libs/util/app-config/src/lib/parse-utils.ts +27 -0
- package/src/libs/util/shared/src/lib/links/link-utils.ts +1 -1
|
@@ -254,10 +254,20 @@ export interface DatasetTemporalExtent {
|
|
|
254
254
|
end?: Date
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Represents a source dataset referenced from a lineage entry.
|
|
259
|
+
*/
|
|
260
|
+
export interface SourceRecord {
|
|
261
|
+
uuid?: string
|
|
262
|
+
title?: string
|
|
263
|
+
href?: string
|
|
264
|
+
}
|
|
265
|
+
|
|
257
266
|
export interface DatasetRecord extends BaseRecord {
|
|
258
267
|
kind: 'dataset'
|
|
259
268
|
status: RecordStatus
|
|
260
269
|
lineage: string // Explanation of the origin of this record (e.g: how, why)"
|
|
270
|
+
sourceRecords: Array<SourceRecord>
|
|
261
271
|
onlineResources: Array<DatasetOnlineResource>
|
|
262
272
|
spatialExtents: Array<DatasetSpatialExtent>
|
|
263
273
|
temporalExtents: Array<DatasetTemporalExtent>
|
|
@@ -285,6 +295,7 @@ export interface ServiceRecord extends BaseRecord {
|
|
|
285
295
|
export interface ReuseRecord extends BaseRecord {
|
|
286
296
|
kind: 'reuse'
|
|
287
297
|
lineage: string // Explanation of the origin of this record (e.g: how, why)"
|
|
298
|
+
sourceRecords: Array<SourceRecord>
|
|
288
299
|
onlineResources: Array<DatasetOnlineResource>
|
|
289
300
|
reuseType: ReuseType
|
|
290
301
|
spatialExtents: Array<DatasetSpatialExtent>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Observable } from 'rxjs'
|
|
2
2
|
import type { UserModel } from './model/user/user.model'
|
|
3
|
+
import type { GroupModel } from './model/user/group.model'
|
|
3
4
|
import type { Organization } from './model/record/organization.model'
|
|
4
5
|
import { CatalogRecord, Keyword, UserFeedback } from './model/record'
|
|
5
6
|
import { KeywordType } from './model/thesaurus'
|
|
@@ -28,6 +29,7 @@ export abstract class PlatformServiceInterface {
|
|
|
28
29
|
abstract getMe(): Observable<UserModel>
|
|
29
30
|
abstract isAnonymous(): Observable<boolean>
|
|
30
31
|
abstract getUsers(): Observable<UserModel[]>
|
|
32
|
+
abstract getUserPermissionsByGroup(): Observable<GroupModel[]>
|
|
31
33
|
abstract getUsersByOrganization(
|
|
32
34
|
organisation: Organization
|
|
33
35
|
): Observable<UserModel[]>
|
|
@@ -134,6 +134,7 @@ Cette section contient des *caractères internationaux* (ainsi que des "caractè
|
|
|
134
134
|
lineage: `This record was edited manually to test the conversion processes
|
|
135
135
|
|
|
136
136
|
As such, **it is not very interesting at all.**`,
|
|
137
|
+
sourceRecords: [],
|
|
137
138
|
licenses: [
|
|
138
139
|
{
|
|
139
140
|
text: 'Licence ODbL mai 2013 (basée sur ODbL 1.0)',
|
|
@@ -310,6 +311,7 @@ Malgré l'attention portée à la création de ces données, il est rappelé que
|
|
|
310
311
|
],
|
|
311
312
|
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.
|
|
312
313
|
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.`,
|
|
314
|
+
sourceRecords: [],
|
|
313
315
|
legalConstraints: [],
|
|
314
316
|
securityConstraints: [],
|
|
315
317
|
otherConstraints: [],
|
|
@@ -361,6 +363,7 @@ export const simpleDatasetRecordFixture = (): DatasetRecord => ({
|
|
|
361
363
|
overviews: [],
|
|
362
364
|
spatialExtents: [],
|
|
363
365
|
temporalExtents: [],
|
|
366
|
+
sourceRecords: [],
|
|
364
367
|
onlineResources: [
|
|
365
368
|
{
|
|
366
369
|
type: 'download',
|
|
@@ -413,6 +416,7 @@ export const simpleDatasetRecordWithFcatsFixture = (): DatasetRecord => ({
|
|
|
413
416
|
overviews: [],
|
|
414
417
|
spatialExtents: [],
|
|
415
418
|
temporalExtents: [],
|
|
419
|
+
sourceRecords: [],
|
|
416
420
|
onlineResources: [],
|
|
417
421
|
updateFrequency: { per: 'month', updatedTimes: 3 },
|
|
418
422
|
translations: {},
|
|
@@ -978,6 +982,7 @@ export const multilingualDatasetFixture: () => DatasetRecord = () => ({
|
|
|
978
982
|
title: 'English Title',
|
|
979
983
|
abstract: 'English Abstract',
|
|
980
984
|
lineage: 'English Lineage',
|
|
985
|
+
sourceRecords: [],
|
|
981
986
|
translations: {
|
|
982
987
|
title: { fr: 'Titre Français', de: 'Titel DE' },
|
|
983
988
|
abstract: { fr: 'Résumé Français', de: 'Beschreibung DE' },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Injectable, inject } from '@angular/core'
|
|
2
|
-
import {
|
|
2
|
+
import { Observable, switchMap } from 'rxjs'
|
|
3
3
|
import { map, tap } from 'rxjs/operators'
|
|
4
4
|
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
5
5
|
import { EditorConfig } from '../models/'
|
|
@@ -2,6 +2,7 @@ import * as TOML from '@ltd/j-toml'
|
|
|
2
2
|
import {
|
|
3
3
|
checkMetadataLanguage,
|
|
4
4
|
checkNewRecordDefaultLanguage,
|
|
5
|
+
checkNewRecordStandard,
|
|
5
6
|
parseConfigSection,
|
|
6
7
|
parseMultiConfigSection,
|
|
7
8
|
parseTranslationsConfigSection,
|
|
@@ -297,7 +298,7 @@ export function loadAppConfig(configUrl = 'assets/configuration/default.toml') {
|
|
|
297
298
|
parsed,
|
|
298
299
|
'editing',
|
|
299
300
|
[],
|
|
300
|
-
['new_record_default_language'],
|
|
301
|
+
['new_record_default_language', 'new_record_standard'],
|
|
301
302
|
warnings,
|
|
302
303
|
errors
|
|
303
304
|
)
|
|
@@ -310,6 +311,15 @@ export function loadAppConfig(configUrl = 'assets/configuration/default.toml') {
|
|
|
310
311
|
warnings
|
|
311
312
|
)
|
|
312
313
|
}
|
|
314
|
+
if (
|
|
315
|
+
parsedEditingSection !== null &&
|
|
316
|
+
parsedEditingSection.new_record_standard !== undefined
|
|
317
|
+
) {
|
|
318
|
+
parsedEditingSection = checkNewRecordStandard(
|
|
319
|
+
parsedEditingSection,
|
|
320
|
+
warnings
|
|
321
|
+
)
|
|
322
|
+
}
|
|
313
323
|
editorConfig =
|
|
314
324
|
parsedEditingSection === null
|
|
315
325
|
? null
|
|
@@ -318,6 +328,9 @@ export function loadAppConfig(configUrl = 'assets/configuration/default.toml') {
|
|
|
318
328
|
parsedEditingSection.new_record_default_language as
|
|
319
329
|
| string
|
|
320
330
|
| undefined,
|
|
331
|
+
NEW_RECORD_STANDARD: parsedEditingSection.new_record_standard as
|
|
332
|
+
| EditorConfig['NEW_RECORD_STANDARD']
|
|
333
|
+
| undefined,
|
|
321
334
|
} as EditorConfig)
|
|
322
335
|
|
|
323
336
|
customTranslations = parseTranslationsConfigSection(
|
|
@@ -69,8 +69,11 @@ export interface MetadataQualityConfig {
|
|
|
69
69
|
ENABLED: boolean
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
export type NewRecordStandard = 'iso19139' | 'iso19115-3'
|
|
73
|
+
|
|
72
74
|
export interface EditorConfig {
|
|
73
75
|
NEW_RECORD_DEFAULT_LANGUAGE?: string
|
|
76
|
+
NEW_RECORD_STANDARD?: NewRecordStandard
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
export type CustomTranslations = { [translationKey: string]: string }
|
|
@@ -159,3 +159,30 @@ export function checkNewRecordDefaultLanguage(
|
|
|
159
159
|
new_record_default_language: lang2,
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
+
|
|
163
|
+
export function checkNewRecordStandard(
|
|
164
|
+
parsedConfigSection: any,
|
|
165
|
+
outWarnings: string[]
|
|
166
|
+
) {
|
|
167
|
+
const standard = parsedConfigSection.new_record_standard
|
|
168
|
+
const normalizedStandard =
|
|
169
|
+
typeof standard === 'string' ? standard.trim().toLowerCase() : null
|
|
170
|
+
|
|
171
|
+
if (
|
|
172
|
+
normalizedStandard === 'iso19139' ||
|
|
173
|
+
normalizedStandard === 'iso19115-3'
|
|
174
|
+
) {
|
|
175
|
+
return {
|
|
176
|
+
...parsedConfigSection,
|
|
177
|
+
new_record_standard: normalizedStandard,
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
outWarnings.push(
|
|
182
|
+
`In the [editing] section: new_record_standard = "${standard}" is not a supported metadata standard`
|
|
183
|
+
)
|
|
184
|
+
return {
|
|
185
|
+
...parsedConfigSection,
|
|
186
|
+
new_record_standard: undefined,
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -266,7 +266,7 @@ export function checkFileFormat(
|
|
|
266
266
|
new RegExp(`[./]${format}`, 'i').test(link.name.toLowerCase())) ||
|
|
267
267
|
('url' in link &&
|
|
268
268
|
new RegExp(`[./]${format}`, 'i').test(link.url.toString())) ||
|
|
269
|
-
('name' in link &&
|
|
269
|
+
('name' in link && new RegExp(`\\b${format}\\b`, 'i').test(link.name))
|
|
270
270
|
)
|
|
271
271
|
}
|
|
272
272
|
|