From 327ed8f802c1c97f2709ee3d4895897f6d26757e Mon Sep 17 00:00:00 2001 From: Daniel Radeau Date: Thu, 8 Feb 2024 17:19:15 +0100 Subject: [PATCH] story #12069 feat(archive-search): add archive unit edit mode --- .../src/main/resources/application-dev.yml | 6 +- .../referential/common/model/Cardinality.java | 8 +- .../templates/api-gateway/application.yml.j2 | 6 +- .../archive/archive-unit-api.service.ts | 80 + .../modules/archive/archive-unit-template.ts | 428 ++++ .../modules/archive/archive-unit.service.ts | 76 + .../src/app/modules/archive/archive.module.ts | 35 +- .../archive-unit-editor.component.ts | 55 + .../archive-unit-editor.service.ts | 334 +++ .../editor-banner.component.html | 4 + .../editor-banner.component.scss | 24 + .../editor-banner/editor-banner.component.ts | 10 + .../archive-unit-viewer.component.ts | 428 +--- .../src/app/modules/archive/index.ts | 36 + .../modules/archive/models/archive-unit.ts | 43 + .../app/modules/archive/models/json-patch.ts | 43 + .../datepicker/datepicker.component.scss | 20 + .../datepicker/datepicker.component.ts | 54 + .../datepicker/datepicker.module.ts | 12 + .../src/app/modules/index.ts | 16 +- .../group-editor/group-editor.component.html | 22 + .../group-editor/group-editor.component.scss | 19 + .../group-editor.component.spec.ts | 27 + .../group-editor/group-editor.component.ts | 40 + .../list-editor/list-editor.component.html | 50 + .../list-editor/list-editor.component.scss | 6 + .../list-editor/list-editor.component.spec.ts | 26 + .../list-editor/list-editor.component.ts | 39 + .../primitive-editor.component.html | 32 + .../primitive-editor.component.scss | 3 + .../primitive-editor.component.spec.ts | 26 + .../primitive-editor.component.ts | 30 + .../object-editor/models/edit-object.model.ts | 13 + .../object-editor.component.html | 8 + .../object-editor.component.spec.ts | 27 + .../object-editor/object-editor.component.ts | 14 + .../object-editor/object-editor.module.ts | 43 + .../services/edit-object.service.spec.ts | 671 ++++++ .../services/edit-object.service.ts | 184 ++ .../services/path.service.spec.ts | 243 ++ .../object-editor/services/path.service.ts | 56 + .../services/schema.service.spec.ts | 234 ++ .../object-editor/services/schema.service.ts | 128 ++ .../services/template.service.spec.ts | 205 ++ .../services/template.service.ts | 41 + .../models/schema-element.model.ts | 3 +- .../object-viewer/object-viewer.module.ts | 10 - .../services/data-structure.service.ts | 8 +- .../services/date-display.service.ts | 4 +- .../services/display-object-helper.service.ts | 2 - .../services/favorite-entry.service.ts | 4 + .../object-viewer/services/layout.service.ts | 4 +- .../services/mock-schema.service.ts | 2037 +++++++++++------ .../schema-strategy-display-object.service.ts | 32 +- .../object-viewer/services/type.service.ts | 4 +- .../src/app/modules/vitamui-common.module.ts | 3 + .../src/assets/shared-i18n/en.json | 40 +- .../src/assets/shared-i18n/fr.json | 40 +- ui/ui-frontend/package-lock.json | 4 +- .../archive-preview.component.html | 2 +- ...rchive-unit-description-tab.component.html | 51 + ...rchive-unit-description-tab.component.scss | 25 + .../archive-unit-description-tab.component.ts | 123 + .../src/app/archive/archive.module.ts | 2 + .../src/app/archive/archive.service.ts | 4 +- .../src/app/core/api/archive-api.service.ts | 4 +- ui/ui-frontend/proxy-gateway.conf.js | 41 +- 67 files changed, 5135 insertions(+), 1217 deletions(-) create mode 100644 ui/ui-frontend-common/src/app/modules/archive/archive-unit-api.service.ts create mode 100644 ui/ui-frontend-common/src/app/modules/archive/archive-unit-template.ts create mode 100644 ui/ui-frontend-common/src/app/modules/archive/archive-unit.service.ts create mode 100644 ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/archive-unit-editor.component.ts create mode 100644 ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/archive-unit-editor.service.ts create mode 100644 ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/components/editor-banner/editor-banner.component.html create mode 100644 ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/components/editor-banner/editor-banner.component.scss create mode 100644 ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/components/editor-banner/editor-banner.component.ts create mode 100644 ui/ui-frontend-common/src/app/modules/archive/index.ts create mode 100644 ui/ui-frontend-common/src/app/modules/archive/models/archive-unit.ts create mode 100644 ui/ui-frontend-common/src/app/modules/archive/models/json-patch.ts create mode 100644 ui/ui-frontend-common/src/app/modules/components/datepicker/datepicker.component.scss create mode 100644 ui/ui-frontend-common/src/app/modules/components/datepicker/datepicker.component.ts create mode 100644 ui/ui-frontend-common/src/app/modules/components/datepicker/datepicker.module.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.html create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.scss create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.spec.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.html create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.scss create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.spec.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.html create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.scss create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.spec.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/models/edit-object.model.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/object-editor.component.html create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/object-editor.component.spec.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/object-editor.component.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/object-editor.module.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/services/edit-object.service.spec.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/services/edit-object.service.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/services/path.service.spec.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/services/path.service.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/services/schema.service.spec.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/services/schema.service.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/services/template.service.spec.ts create mode 100644 ui/ui-frontend-common/src/app/modules/object-editor/services/template.service.ts create mode 100644 ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-unit-description-tab/archive-unit-description-tab.component.html create mode 100644 ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-unit-description-tab/archive-unit-description-tab.component.scss create mode 100644 ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-unit-description-tab/archive-unit-description-tab.component.ts diff --git a/api/api-gateway/src/main/resources/application-dev.yml b/api/api-gateway/src/main/resources/application-dev.yml index a8d7f93a8a1..e4646476870 100644 --- a/api/api-gateway/src/main/resources/application-dev.yml +++ b/api/api-gateway/src/main/resources/application-dev.yml @@ -210,13 +210,15 @@ spring: predicates: - > Path= - /archive-search-api/archive-search/** + /archive-search-api/archive-search/**, + /archive-search-api/archive-units/** filters: # Archive search API - RewritePath=/archive-search-api/archive-search/searchcriteriahistory,/searchcriteriahistory, - RewritePath=/archive-search-api/archive-search/filingholdingscheme,/archives-search/filling-holding-schema, - - RewritePath=/archive-search-api/archive-search/(?.*),/archives-search/$\{segment} + - RewritePath=/archive-search-api/archive-search/(?.*),/archives-search/$\{segment}, + - RewritePath=/archive-search-api/archive-units/(?.*),/archives-units/$\{segment} - id: pastis-external-service uri: https://localhost:8015 # URL PASTIS EXTERNAL diff --git a/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/model/Cardinality.java b/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/model/Cardinality.java index 000a4da9285..d32c651f6f6 100644 --- a/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/model/Cardinality.java +++ b/api/api-referential/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/model/Cardinality.java @@ -31,10 +31,10 @@ import java.util.Objects; public enum Cardinality { - ZERO_OR_ONE("0-1"), - ZERO_OR_MORE("0-N"), - ONE_OR_ONE("1-1"), - ONE_OR_MORE("1-N"); + ONE("0-1"), + MANY("0-N"), + ONE_REQUIRED("1-1"), + MANY_REQUIRED("1-N"); private final String cardinality; diff --git a/deployment/roles/vitamui/templates/api-gateway/application.yml.j2 b/deployment/roles/vitamui/templates/api-gateway/application.yml.j2 index ec1d3ed627a..faa951644c4 100644 --- a/deployment/roles/vitamui/templates/api-gateway/application.yml.j2 +++ b/deployment/roles/vitamui/templates/api-gateway/application.yml.j2 @@ -246,13 +246,15 @@ spring: predicates: - > Path= - /archive-search-api/archive-search/** + /archive-search-api/archive-search/**, + /archive-search-api/archive-units/** filters: # Archive search API - RewritePath=/archive-search-api/archive-search/searchcriteriahistory,/searchcriteriahistory, - RewritePath=/archive-search-api/archive-search/filingholdingscheme,/archives-search/filling-holding-schema, - - RewritePath=/archive-search-api/archive-search/(?.*),/archives-search/$\{segment} + - RewritePath=/archive-search-api/archive-search/(?.*),/archives-search/$\{segment}, + - RewritePath=/archive-search-api/archive-units/(?.*),/archives-units/$\{segment} - id: pastis-external-service uri: {{ 'https' if vitamui.pastis_external.secure | default(secure) | bool else 'http' }}://{{ vitamui.pastis_external.host }}:{{ vitamui.pastis_external.port_service }} diff --git a/ui/ui-frontend-common/src/app/modules/archive/archive-unit-api.service.ts b/ui/ui-frontend-common/src/app/modules/archive/archive-unit-api.service.ts new file mode 100644 index 00000000000..7a179674b01 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/archive/archive-unit-api.service.ts @@ -0,0 +1,80 @@ +/* + * Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2015-2022) + * + * contact.vitam@culture.gouv.fr + * + * This software is a computer program whose purpose is to implement a digital archiving back-office system managing + * high volumetry securely and efficiently. + * + * This software is governed by the CeCILL 2.1 license under French law and abiding by the rules of distribution of free + * software. You can use, modify and/ or redistribute the software under the terms of the CeCILL 2.1 license as + * circulated by CEA, CNRS and INRIA at the following URL "https://cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, + * users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the + * successive licensors have only limited liability. + * + * In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or + * developing or reproducing the software by the user in light of its specific status of free software, that may mean + * that it is complicated to manipulate, and that also therefore means that it is reserved for developers and + * experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the + * software's suitability as regards their requirements in conditions enabling the security of their systems and/or data + * to be ensured and, more generally, to use and operate it in the same conditions as regards security. + * + * The fact that you are presently reading this means that you have had knowledge of the CeCILL 2.1 license and that you + * accept its terms. + * + * + */ + +import { HttpClient, HttpHeaders } from '@angular/common/http'; +import { Inject, Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { BaseHttpClient } from '../base-http-client'; +import { BASE_URL } from '../injection-tokens'; +import { Ontology } from '../models'; +import { ArchiveUnit } from './models/archive-unit'; +import { JsonPatchDto, MultiJsonPatchDto } from './models/json-patch'; + +@Injectable({ + providedIn: 'root', +}) +export class ArchiveUnitApiService extends BaseHttpClient { + constructor(http: HttpClient, @Inject(BASE_URL) baseUrl: string) { + super(http, baseUrl); + } + + /** + * Updates many archive units asynchronously in one Vitam operation. + * Can perform only add or replace operations on current archive units. + * + * @param archiveUnits archive units to update. + * @param headers optionnal headers. + * @returns a wrapped operation id. + */ + asyncPartialUpdateArchiveUnits(archiveUnits: ArchiveUnit[], headers?: HttpHeaders): Observable<{ operationId: String }> { + return this.http.patch<{ operationId: String }>(`${this.apiUrl}/archive-units`, archiveUnits, { headers }); + } + + /** + * Updates one archive unit asynchronously by using a jsonPatch in one Vitam operation. + * + * @param jsonPatchDto a jsonPatchDto. + * @param headers optionnal headers. + * @returns a wrapped operation id. + */ + asyncPartialUpdateArchiveUnitByCommands(jsonPatchDto: JsonPatchDto, headers?: HttpHeaders): Observable<{ operationId: String }> { + return this.http.patch<{ operationId: String }>(`${this.apiUrl}/archive-units/update/single`, jsonPatchDto, { headers }); + } + + /** + * Updates many archive unit asynchronously by using jsonPatches in one Vitam operation. + * + * @param multiJsonPatchDto a list of jsonPatchDto. + * @param headers optionnal headers. + * @returns a wrapped operation id. + */ + asyncPartialUpdateArchiveUnitsByCommands(multiJsonPatchDto: MultiJsonPatchDto, headers?: HttpHeaders) { + return this.http.patch<{ operationId: String }>(`${this.apiUrl}/archive-units/update/multiple`, multiJsonPatchDto, { headers }); + } +} diff --git a/ui/ui-frontend-common/src/app/modules/archive/archive-unit-template.ts b/ui/ui-frontend-common/src/app/modules/archive/archive-unit-template.ts new file mode 100644 index 00000000000..8b1955aa7b8 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/archive/archive-unit-template.ts @@ -0,0 +1,428 @@ +import { DisplayRule } from '../object-viewer/models'; + +export const customTemplate: DisplayRule[] = [ + { + Path: '', + ui: { + Path: '', + component: 'group', + open: true, + display: true, + layout: { + columns: 2, + size: 'medium', + }, + label: '', + }, + }, + { + Path: '#originating_agency', + ui: { + Path: '#originating_agency', + component: 'textfield', + open: true, + display: true, + layout: { + columns: 2, + size: 'small', + }, + label: 'Service producteur', + }, + }, + { + Path: '#originating_agencies', + ui: { + Path: '#originating_agencies', + component: 'group', + open: true, + display: true, + layout: { + columns: 2, + size: 'small', + }, + label: 'Services producteurs liés à l’unité archivistique', + }, + }, + { + Path: null, + ui: { + Path: 'Generalities', + component: 'group', + open: true, + layout: { + columns: 2, + size: 'medium', + }, + label: 'Généralités', + }, + }, + { + Path: 'DescriptionLevel', + ui: { + Path: 'Generalities.DescriptionLevel', + component: 'select', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'Title', + ui: { + Path: 'Generalities.Title', + component: 'textfield', + layout: { + columns: 2, + size: 'medium', + }, + }, + }, + { + Path: 'Title_', + ui: { + Path: 'Generalities.Title_', + component: 'select+textfield', + layout: { + columns: 2, + size: 'medium', + }, + }, + }, + { + Path: 'Description', + ui: { + Path: 'Generalities.Description', + component: 'textarea', + layout: { + columns: 2, + size: 'large', + }, + }, + }, + { + Path: 'Description_.*', + ui: { + Path: 'Generalities.Description_.*', + component: 'select+textarea', + layout: { + columns: 2, + size: 'large', + }, + }, + }, + { + Path: 'Tag', + ui: { + Path: 'Generalities.Tag', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: null, + ui: { + Path: 'Generalities.Dates', + component: 'group', + open: false, + layout: { + columns: 2, + size: 'medium', + }, + label: 'Date(s)', + }, + }, + { + Path: 'StartDate', + ui: { + Path: 'Generalities.Dates.StartDate', + component: 'datepicker', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'EndDate', + ui: { + Path: 'Generalities.Dates.EndDate', + component: 'datepicker', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'CreatedDate', + ui: { + Path: 'Generalities.Dates.CreatedDate', + component: 'datepicker', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'TransactedDate', + ui: { + Path: 'Generalities.Dates.TransactedDate', + component: 'datepicker', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'SentDate', + ui: { + Path: 'Generalities.Dates.SentDate', + component: 'datepicker', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'ReceivedDate', + ui: { + Path: 'Generalities.Dates.ReceivedDate', + component: 'datepicker', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'RegisteredDate', + ui: { + Path: 'Generalities.Dates.RegisteredDate', + component: 'datepicker', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'AcquiredDate', + ui: { + Path: 'Generalities.Dates.AcquiredDate', + component: 'datepicker', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'DateLitteral', + ui: { + Path: 'Generalities.Dates.DateLitteral', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: null, + ui: { + Path: 'Generalities.Identifiers', + component: 'group', + open: false, + layout: { + columns: 2, + size: 'medium', + }, + label: 'Identifiant(s)', + }, + }, + { + Path: 'SystemId', + ui: { + Path: 'Generalities.Identifiers.SystemId', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'OriginatingSystemId', + ui: { + Path: 'Generalities.Identifiers.OriginatingSystemId', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'OriginatingAgencyArchiveUnitIdentifier', + ui: { + Path: 'Generalities.Identifiers.OriginatingAgencyArchiveUnitIdentifier', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'TransferringAgencyArchiveUnitIdentifier', + ui: { + Path: 'Generalities.Identifiers.TransferringAgencyArchiveUnitIdentifier', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'ArchivalAgencyArchiveUnitIdentifier', + ui: { + Path: 'Generalities.Identifiers.ArchivalAgencyArchiveUnitIdentifier', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'FilePlanPosition', + ui: { + Path: 'Generalities.Identifiers.FilePlanPosition', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: null, + ui: { + Path: 'Generalities.Characteristics', + component: 'group', + open: false, + layout: { + columns: 2, + size: 'medium', + }, + label: 'Caractéristique(s)', + }, + }, + { + Path: 'Type', + ui: { + Path: 'Generalities.Characteristics.Type', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'DocumentType', + ui: { + Path: 'Generalities.Characteristics.DocumentType', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'Language', + ui: { + Path: 'Generalities.Characteristics.Language', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'DescriptionLanguage', + ui: { + Path: 'Generalities.Characteristics.DescriptionLanguage', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'Status', + ui: { + Path: 'Generalities.Characteristics.Status', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'Source', + ui: { + Path: 'Generalities.Characteristics.Source', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'Version', + ui: { + Path: 'Generalities.Characteristics.Version', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'OriginatingSystemIdReplyTo', + ui: { + Path: 'Generalities.Characteristics.OriginatingSystemIdReplyTo', + component: 'textfield', + layout: { + columns: 1, + size: 'small', + }, + }, + }, + { + Path: 'TextContent', + ui: { + Path: 'Generalities.Characteristics.TextContent', + component: 'textfield', + layout: { + columns: 2, + size: 'medium', + }, + }, + }, +]; diff --git a/ui/ui-frontend-common/src/app/modules/archive/archive-unit.service.ts b/ui/ui-frontend-common/src/app/modules/archive/archive-unit.service.ts new file mode 100644 index 00000000000..c69b18ef57e --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/archive/archive-unit.service.ts @@ -0,0 +1,76 @@ +/* + * Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2015-2022) + * + * contact.vitam@culture.gouv.fr + * + * This software is a computer program whose purpose is to implement a digital archiving back-office system managing + * high volumetry securely and efficiently. + * + * This software is governed by the CeCILL 2.1 license under French law and abiding by the rules of distribution of free + * software. You can use, modify and/ or redistribute the software under the terms of the CeCILL 2.1 license as + * circulated by CEA, CNRS and INRIA at the following URL "https://cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, + * users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the + * successive licensors have only limited liability. + * + * In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or + * developing or reproducing the software by the user in light of its specific status of free software, that may mean + * that it is complicated to manipulate, and that also therefore means that it is reserved for developers and + * experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the + * software's suitability as regards their requirements in conditions enabling the security of their systems and/or data + * to be ensured and, more generally, to use and operate it in the same conditions as regards security. + * + * The fact that you are presently reading this means that you have had knowledge of the CeCILL 2.1 license and that you + * accept its terms. + * + * + */ + +import { HttpHeaders } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { ArchiveUnitApiService } from './archive-unit-api.service'; +import { ArchiveUnit } from './models/archive-unit'; +import { JsonPatchDto, MultiJsonPatchDto } from './models/json-patch'; + +@Injectable({ + providedIn: 'root', +}) +export class ArchiveUnitService { + constructor(private archiveUnitApiService: ArchiveUnitApiService) {} + + /** + * Updates many archive units asynchronously in one Vitam operation. + * Can perform only add or replace operations on current archive units. + * + * @param archiveUnits archive units to update. + * @param headers optionnal headers. + * @returns a wrapped operation id. + */ + asyncPartialUpdateArchiveUnits(archiveUnits: ArchiveUnit[], headers?: HttpHeaders): Observable<{ operationId: String }> { + return this.archiveUnitApiService.asyncPartialUpdateArchiveUnits(archiveUnits, headers); + } + + /** + * Updates one archive unit asynchronously by using a jsonPatch in one Vitam operation. + * + * @param jsonPatchDto a jsonPatchDto. + * @param headers optionnal headers. + * @returns a wrapped operation id. + */ + asyncPartialUpdateArchiveUnitByCommands(jsonPatchDto: JsonPatchDto, headers?: HttpHeaders): Observable<{ operationId: String }> { + return this.archiveUnitApiService.asyncPartialUpdateArchiveUnitByCommands(jsonPatchDto, headers); + } + + /** + * Updates many archive unit asynchronously by using jsonPatches in one Vitam operation. + * + * @param multiJsonPatchDto a list of jsonPatchDto. + * @param headers optionnal headers. + * @returns a wrapped operation id. + */ + asyncPartialUpdateArchiveUnitsByCommands(multiJsonPatchDto: MultiJsonPatchDto, headers?: HttpHeaders) { + return this.archiveUnitApiService.asyncPartialUpdateArchiveUnitsByCommands(multiJsonPatchDto, headers); + } +} diff --git a/ui/ui-frontend-common/src/app/modules/archive/archive.module.ts b/ui/ui-frontend-common/src/app/modules/archive/archive.module.ts index 3ca4c4455c0..358d2dafe0f 100644 --- a/ui/ui-frontend-common/src/app/modules/archive/archive.module.ts +++ b/ui/ui-frontend-common/src/app/modules/archive/archive.module.ts @@ -36,18 +36,47 @@ */ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; +import { ReactiveFormsModule } from '@angular/forms'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatSelectModule } from '@angular/material/select'; import { MatTooltipModule } from '@angular/material/tooltip'; import { TranslateModule } from '@ngx-translate/core'; +import { ObjectEditorModule } from '../object-editor/object-editor.module'; import { ObjectViewerModule } from '../object-viewer/object-viewer.module'; import { PipesModule } from '../pipes/pipes.module'; import { ArchiveUnitCountComponent } from './components/archive-unit-count/archive-unit-count.component'; +import { ArchiveUnitEditorComponent } from './components/archive-unit-editor/archive-unit-editor.component'; +import { ArchiveUnitEditorService } from './components/archive-unit-editor/archive-unit-editor.service'; +import { EditorBannerComponent } from './components/archive-unit-editor/components/editor-banner/editor-banner.component'; import { ArchiveUnitViewerComponent } from './components/archive-unit-viewer/archive-unit-viewer.component'; import { PhysicalArchiveViewerComponent } from './components/physical-archive-viewer/physical-archive-viewer.component'; @NgModule({ - imports: [CommonModule, ObjectViewerModule, TranslateModule, PipesModule, MatTooltipModule, MatProgressSpinnerModule], - declarations: [PhysicalArchiveViewerComponent, ArchiveUnitCountComponent, ArchiveUnitViewerComponent], - exports: [PhysicalArchiveViewerComponent, ArchiveUnitCountComponent, ArchiveUnitViewerComponent], + imports: [ + CommonModule, + TranslateModule, + PipesModule, + ReactiveFormsModule, + MatSelectModule, + MatTooltipModule, + MatProgressSpinnerModule, + ObjectViewerModule, + ObjectEditorModule, + ], + providers: [ArchiveUnitEditorService], + declarations: [ + PhysicalArchiveViewerComponent, + ArchiveUnitCountComponent, + ArchiveUnitViewerComponent, + ArchiveUnitEditorComponent, + EditorBannerComponent, + ], + exports: [ + PhysicalArchiveViewerComponent, + ArchiveUnitCountComponent, + ArchiveUnitViewerComponent, + ArchiveUnitEditorComponent, + EditorBannerComponent, + ], }) export class ArchiveModule {} diff --git a/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/archive-unit-editor.component.ts b/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/archive-unit-editor.component.ts new file mode 100644 index 00000000000..d4f61f3dc0d --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/archive-unit-editor.component.ts @@ -0,0 +1,55 @@ +import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'; +import { BehaviorSubject, Observable, Subscription, throwError } from 'rxjs'; + +import { EditObject } from '../../../object-editor/models/edit-object.model'; +import { DisplayRule } from '../../../object-viewer/models'; +import { customTemplate } from '../../archive-unit-template'; +import { ArchiveUnitService } from '../../archive-unit.service'; +import { ArchiveUnit } from '../../models/archive-unit'; +import { ArchiveUnitEditorService } from './archive-unit-editor.service'; + +@Component({ + selector: 'vitamui-common-archive-unit-editor', + template: ``, + styles: [], + providers: [ArchiveUnitEditorService], +}) +export class ArchiveUnitEditorComponent implements OnInit, OnChanges, OnDestroy { + @Input() data!: ArchiveUnit; + @Input() template: DisplayRule[] = customTemplate; + + editObject$ = new BehaviorSubject(null); + + private subscriptions = new Subscription(); + + constructor( + private archiveUnitEditorService: ArchiveUnitEditorService, + private archiveUnitService: ArchiveUnitService, + ) {} + + ngOnInit(): void { + this.archiveUnitEditorService.setTemplate(this.template); + this.archiveUnitEditorService.setData(this.data); + + this.archiveUnitEditorService.editObject$.subscribe(this.editObject$); + } + + ngOnChanges(changes: SimpleChanges): void { + const { data, template } = changes; + + if (data) this.archiveUnitEditorService.setData(data.currentValue); + if (template) this.archiveUnitEditorService.setTemplate(template.currentValue); + } + + ngOnDestroy(): void { + this.subscriptions.unsubscribe(); + } + + update(): Observable<{ operationId: String }> { + const jsonPatchDto = this.archiveUnitEditorService.toJsonPatchDto(); + + if (jsonPatchDto.jsonPatch.length === 0) return throwError(new Error('No change to submit')); + + return this.archiveUnitService.asyncPartialUpdateArchiveUnitByCommands(jsonPatchDto); + } +} diff --git a/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/archive-unit-editor.service.ts b/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/archive-unit-editor.service.ts new file mode 100644 index 00000000000..45a348a2e17 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/archive-unit-editor.service.ts @@ -0,0 +1,334 @@ +import { Injectable } from '@angular/core'; +import { BehaviorSubject, combineLatest } from 'rxjs'; +import { Logger } from '../../../logger/logger'; +import { Collection, Schema } from '../../../models'; +import { EditObject } from '../../../object-editor/models/edit-object.model'; +import { EditObjectService } from '../../../object-editor/services/edit-object.service'; +import { SchemaService as SchemaUtils } from '../../../object-editor/services/schema.service'; +import { TemplateService } from '../../../object-editor/services/template.service'; +import { DisplayRule, SchemaElement } from '../../../object-viewer/models'; +import { DisplayObjectHelperService } from '../../../object-viewer/services/display-object-helper.service'; +import { DisplayRuleHelperService } from '../../../object-viewer/services/display-rule-helper.service'; +import { SchemaElementToDisplayRuleService } from '../../../object-viewer/services/schema-element-to-display-rule.service'; +import { DisplayObjectType, SedaVersion } from '../../../object-viewer/types'; +import { SchemaService } from '../../../schema'; +import { diff } from '../../../utils'; +import { ArchiveUnit } from '../../models/archive-unit'; +import { JsonPatch, JsonPatchDto } from '../../models/json-patch'; + +@Injectable() +export class ArchiveUnitEditorService { + private collection = new BehaviorSubject(Collection.ARCHIVE_UNIT); + private sedaVersion = new BehaviorSubject('2.1'); + private category = new BehaviorSubject('DESCRIPTION'); + private data = new BehaviorSubject(null); + private editObject = new BehaviorSubject(null); + private customTemplate = new BehaviorSubject([]); + private template = new BehaviorSubject([]); + private schema = new BehaviorSubject([]); + + editObject$ = this.editObject.asObservable(); + + private readonly OriginInternal = 'internal'; + private readonly OriginExternal = 'external'; + private readonly PathOtherMetadata = 'OtherMetadata'; + + constructor( + private logger: Logger, + private schemaService: SchemaService, + private displayObjectHelper: DisplayObjectHelperService, + private displayRuleHelper: DisplayRuleHelperService, + private componentMapperService: SchemaElementToDisplayRuleService, + private templateService: TemplateService, + private editObjectService: EditObjectService, + private schemaUtils: SchemaUtils, + ) { + combineLatest([this.data, this.customTemplate, this.schemaService.getSchema(this.collection.value)]).subscribe( + ([data, customTemplate, schema]) => { + if (data === null) { + this.editObject.next(null); + + return; + } + + const subschema: Schema = schema + .filter((element) => element.Category === this.category.value) + .filter((element) => element.SedaVersions.includes(this.sedaVersion.value)) + .filter((element) => { + const toRemove = [ + 'Title.keyword', // FIXME: Remove from database or handle it properly + 'Signature.Masterdata', // FIXME: What should we do with free extension points + 'SigningInformation.Extended', // FIXME: What should we do with free extension points + 'OriginatingAgency.OrganizationDescriptiveMetadata', // FIXME: What should we do with free extension points + 'SubmissionAgency.OrganizationDescriptiveMetadata', // FIXME: What should we do with free extension points + ]; + + return !toRemove.includes(element.Path); + }); + + // To check consistency of subschema + this.schemaUtils.validate(subschema); + + const editObject: EditObject = this.computeEditObject(data, customTemplate, subschema); + + this.editObject.next(editObject); + }, + (error) => { + this.logger.error(this, 'Error in observable', error); + }, + ); + } + + public setData(data: any): void { + this.data.next(data); + } + + public setTemplate(template: DisplayRule[]): void { + if (template) this.customTemplate.next(template); + } + + private groupSchemaByOrigin(schema: SchemaElement[]): Record { + const groupedByOrigin: Record = {}; + + schema + .filter((schemaElement) => { + if (!schemaElement.Origin) { + this.logger.warn(this, `Path ${schemaElement.Path} have not origin, it will be skipped...`, { schemaElement }); + } + + return schemaElement.Origin; + }) + .forEach((schemaElement) => { + const originToLocaleLowerCase = schemaElement.Origin.toLocaleLowerCase(); + + if (!groupedByOrigin[originToLocaleLowerCase]) { + groupedByOrigin[originToLocaleLowerCase] = []; + } + + groupedByOrigin[originToLocaleLowerCase].push(schemaElement); + }); + + return groupedByOrigin; + } + + private computeEditObject(originalData: any, customTemplate: DisplayRule[], originalSchema: Schema): EditObject { + const fullTemplate = this.computeTemplate(originalData, customTemplate, originalSchema); + this.template.next(fullTemplate); + + const projectedData = this.templateService.toProjected(originalData, fullTemplate); + const subschema = originalSchema.filter((element) => element.Category === 'DESCRIPTION'); + + const templatedSchema = this.editObjectService.createaTemplateSchema(fullTemplate, subschema); + this.schema.next(templatedSchema); + + const editObject: EditObject = this.editObjectService.editObject('', projectedData, fullTemplate, templatedSchema); + + this.setMissingTypes(editObject); // TODO: Idealement utiliser soit type ou kind pour les ngIf des composants + this.setMissingDisplayRules(editObject); + this.setLabels(editObject, templatedSchema); + this.displayAll(editObject); + this.collapseAll(editObject); + this.expand('', editObject); + this.expand('Generalities', editObject); + + return editObject; + } + + computeTemplate(data: any, customTemplate: DisplayRule[], schema: Schema): DisplayRule[] { + const schemaByOrigin = this.groupSchemaByOrigin(schema); + const internalSchema = schemaByOrigin[this.OriginInternal] || []; + const externalSchema = schemaByOrigin[this.OriginExternal] || []; + const defaultTemplate = this.getDefaultTemplate(data); + const internalSchemaTemplate = this.componentMapperService.mapSchemaToDisplayRules(internalSchema); + const externalSchemaTemplate = this.componentMapperService.mapSchemaToDisplayRules(externalSchema); + const otherMetadataTemplate = this.getOtherMetadataTemplate(externalSchema); + const schemaTemplate = internalSchemaTemplate.concat(externalSchemaTemplate); + const finalSchemaTemplate = this.displayRuleHelper.mergeDisplayRulesByPath(defaultTemplate, schemaTemplate); + const finalCustomTemplate = this.displayRuleHelper.prioritizeAndMergeDisplayRules(finalSchemaTemplate, customTemplate); + const finalOtherMetadataTemplate = this.displayRuleHelper.prioritizeAndMergeDisplayRules(finalSchemaTemplate, otherMetadataTemplate); + const finalNotConsumedRulesByCustomTemplate = this.displayRuleHelper.getUniqueDisplayRules(finalSchemaTemplate, finalCustomTemplate); + const finalNotConsumedRulesByOtherMetadataTemplate = this.displayRuleHelper.getUniqueDisplayRules( + finalSchemaTemplate, + finalOtherMetadataTemplate, + ); + const finalNotConsumedTemplate = this.displayRuleHelper.getCommonDisplayRules( + finalNotConsumedRulesByCustomTemplate, + finalNotConsumedRulesByOtherMetadataTemplate, + ); + + return finalCustomTemplate.concat(finalNotConsumedTemplate).concat(finalOtherMetadataTemplate); + } + + private setLabels(editObject: EditObject, schema: Schema): void { + const { displayRule } = editObject; + const path = displayRule?.ui?.Path; + + if (displayRule?.ui?.Path) { + const element = schema.find((e) => e.ApiPath === path); + + if (element) editObject.displayRule.ui.label = element.ShortName; + } + + editObject.children.forEach((c) => this.setLabels(c, schema)); + } + + private setMissingTypes(editObject: EditObject): void { + const { kind } = editObject; + + switch (kind) { + case 'object': + editObject.type = DisplayObjectType.GROUP; + break; + case 'object-array': + case 'primitive-array': + editObject.type = DisplayObjectType.LIST; + break; + case 'primitive': + default: + editObject.type = DisplayObjectType.PRIMITIVE; + } + + editObject.children.forEach((child) => this.setMissingTypes(child as EditObject)); + } + + private setMissingDisplayRules(editObject: EditObject): void { + const { displayRule } = editObject; + + if (!displayRule) { + this.logger.info(this, `EditObject with path '${editObject.path}' have no DisplayRule`); + editObject.displayRule = this.displayRuleHelper.toDisplayRule(editObject.value); + } + + editObject.children.forEach((child) => this.setMissingDisplayRules(child as EditObject)); + } + + private displayAll(node: EditObject) { + if (!node) { + this.logger.log(this, 'Node is null'); + + return; + } + + if (!node.displayRule) { + this.logger.log(this, `Node ${JSON.stringify({ ...node, control: null, children: null })} less displayRule`); + + return; + } + + node.visible = true; + node.displayRule = { ...node.displayRule, ui: { ...node.displayRule.ui, display: true } }; + node.children.forEach((child) => this.displayAll(child as EditObject)); + } + + private collapseAll(editObject: EditObject): void { + editObject?.children?.forEach((child) => this.collapseAll(child)); + + editObject.open = false; + } + + private expand(path: string, editObject: EditObject): void { + editObject?.children?.forEach((child) => this.expand(path, child)); + + if (editObject.path === path) editObject.open = true; + } + + private getDefaultTemplate(data: any): DisplayRule[] { + return this.displayObjectHelper.extractDisplayRules(this.displayObjectHelper.dataDrivenDisplayObject(data)); + } + + private getOtherMetadataTemplate(schema: SchemaElement[]): DisplayRule[] { + const otherMetadataDisplayRule: DisplayRule = { + Path: null, + ui: { + Path: this.PathOtherMetadata, + component: 'group', + label: 'DISPLAY_RULE.OTHER_METADATA.LABEL', + open: false, + display: true, + layout: { + columns: 2, + size: 'medium', + }, + }, + }; + const externalSchemaMovedInOtherMetadataTemplate = this.componentMapperService.mapSchemaToDisplayRules(schema).map( + (displayRule): DisplayRule => ({ + ...displayRule, + ui: { + ...displayRule.ui, + Path: `${this.PathOtherMetadata}.${displayRule.ui.Path}`, + }, + }), + ); + + return [otherMetadataDisplayRule].concat(externalSchemaMovedInOtherMetadataTemplate); + } + + public getValue(): ArchiveUnit { + const projectedValue = this.editObject.value.control.value; + const updatedValue = this.templateService.toOriginal(projectedValue, this.template.value); + + return updatedValue; + } + + public getOriginalValue(): ArchiveUnit { + const projectedValue = this.templateService.toProjected(this.data.value, this.template.value); + const originalValue = this.templateService.toOriginal(projectedValue, this.template.value); + + return originalValue; + } + + public toJsonPatch(): JsonPatch { + const originalValue = this.getOriginalValue(); + const updatedValue = this.getValue(); + const criterias = [undefined, null, [], {}, '']; + const consistentOriginalValue = this.filterByCriteria(originalValue, criterias); + const consistentUpdatedValue = this.filterByCriteria(updatedValue, criterias); + + const changes = diff(consistentUpdatedValue, consistentOriginalValue); + const replaceEntries = Object.entries(changes); + const addEntries = Object.entries(consistentUpdatedValue).filter(([key]) => !Object.keys(consistentOriginalValue).includes(key)); + const removeEntries = Object.entries(consistentOriginalValue).filter(([key]) => !Object.keys(consistentUpdatedValue).includes(key)); + const jsonPatch: JsonPatch = []; + + removeEntries.forEach(([key, value]) => { + jsonPatch.push({ op: 'remove', path: key, value }); + }); + addEntries.forEach(([key, value]) => { + jsonPatch.push({ op: 'add', path: key, value }); + }); + replaceEntries.forEach(([key, value]) => { + jsonPatch.push({ op: 'replace', path: key, value }); + }); + + return jsonPatch; + } + + public toJsonPatchDto(): JsonPatchDto { + return { + id: this.data.value['#id'], + jsonPatch: this.toJsonPatch(), + }; + } + + private filterByCriteria(input: any, criterias: any[]): any { + if (Array.isArray(input)) { + // Si c'est un tableau + return input + .map((item) => this.filterByCriteria(item, criterias)) // Appel récursif pour chaque élément + .filter((item) => !criterias.some((criteria) => JSON.stringify(criteria) === JSON.stringify(item))); // Filtrer les éléments selon les critères fournis + } else if (typeof input === 'object' && input !== null) { + // Si c'est un objet + const filteredObj = {}; + Object.entries(input).forEach(([key, value]) => { + const filteredValue = this.filterByCriteria(value, criterias); + if (!criterias.some((criteria) => JSON.stringify(criteria) === JSON.stringify(filteredValue))) { + filteredObj[key] = filteredValue; + } + }); + return filteredObj; + } + // Pour tout autre type de valeur, renvoyer directement la valeur + return input; + } +} diff --git a/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/components/editor-banner/editor-banner.component.html b/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/components/editor-banner/editor-banner.component.html new file mode 100644 index 00000000000..1d19eaeacf6 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/components/editor-banner/editor-banner.component.html @@ -0,0 +1,4 @@ +
{{ title | translate }}
+
+ +
diff --git a/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/components/editor-banner/editor-banner.component.scss b/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/components/editor-banner/editor-banner.component.scss new file mode 100644 index 00000000000..6e9acf23339 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/components/editor-banner/editor-banner.component.scss @@ -0,0 +1,24 @@ +:host { + display: flex; + background-color: var(--vitamui-primary); + height: 72px; + color: white; + font-weight: 700; + justify-content: space-between; +} + +.title { + display: flex; + align-items: center; + font-size: 12px; + line-height: 16px; + letter-spacing: -0.2px; + position: relative; + left: 40px; +} + +.actions { + display: flex; + align-items: center; + justify-content: end; +} diff --git a/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/components/editor-banner/editor-banner.component.ts b/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/components/editor-banner/editor-banner.component.ts new file mode 100644 index 00000000000..818a2cae3ed --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-editor/components/editor-banner/editor-banner.component.ts @@ -0,0 +1,10 @@ +import { Component, Input } from '@angular/core'; + +@Component({ + selector: 'vitamui-common-editor-banner', + templateUrl: './editor-banner.component.html', + styleUrls: ['./editor-banner.component.scss'], +}) +export class EditorBannerComponent { + @Input() title!: string; +} diff --git a/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-viewer/archive-unit-viewer.component.ts b/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-viewer/archive-unit-viewer.component.ts index 6313beac53a..f7a2999569e 100644 --- a/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-viewer/archive-unit-viewer.component.ts +++ b/ui/ui-frontend-common/src/app/modules/archive/components/archive-unit-viewer/archive-unit-viewer.component.ts @@ -1,6 +1,7 @@ import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; import { DisplayObjectService, DisplayRule } from '../../../object-viewer/models'; import { SchemaStrategyDisplayObjectService } from '../../../object-viewer/services/schema-strategy-display-object.service'; +import { customTemplate } from '../../archive-unit-template'; @Component({ selector: 'vitamui-common-archive-unit-viewer', @@ -10,432 +11,7 @@ import { SchemaStrategyDisplayObjectService } from '../../../object-viewer/servi }) export class ArchiveUnitViewerComponent implements OnInit, OnChanges { @Input() data!: any; - @Input() template: DisplayRule[] = [ - { - Path: '', - ui: { - Path: '', - component: 'group', - open: true, - display: true, - layout: { - columns: 2, - size: 'medium', - }, - label: '', - }, - }, - { - Path: '#originating_agency', - ui: { - Path: '#originating_agency', - component: 'textfield', - open: true, - display: true, - layout: { - columns: 2, - size: 'small', - }, - label: 'Service producteur', - }, - }, - { - Path: '#originating_agencies', - ui: { - Path: '#originating_agencies', - component: 'group', - open: true, - display: true, - layout: { - columns: 2, - size: 'small', - }, - label: 'Services producteurs liés à l’unité archivistique', - }, - }, - { - Path: null, - ui: { - Path: 'Generalities', - component: 'group', - open: true, - layout: { - columns: 2, - size: 'medium', - }, - label: 'Généralités', - }, - }, - { - Path: 'DescriptionLevel', - ui: { - Path: 'Generalities.DescriptionLevel', - component: 'select', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'Title', - ui: { - Path: 'Generalities.Title', - component: 'textfield', - layout: { - columns: 2, - size: 'medium', - }, - }, - }, - { - Path: 'Title_', - ui: { - Path: 'Generalities.Title_', - component: 'select+textfield', - layout: { - columns: 2, - size: 'medium', - }, - }, - }, - { - Path: 'Description', - ui: { - Path: 'Generalities.Description', - component: 'textarea', - layout: { - columns: 2, - size: 'large', - }, - }, - }, - { - Path: 'Description_.*', - ui: { - Path: 'Generalities.Description_.*', - component: 'select+textarea', - layout: { - columns: 2, - size: 'large', - }, - }, - }, - { - Path: 'Tag', - ui: { - Path: 'Generalities.Tag', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: null, - ui: { - Path: 'Generalities.Dates', - component: 'group', - open: false, - layout: { - columns: 2, - size: 'medium', - }, - label: 'Date(s)', - }, - }, - { - Path: 'StartDate', - ui: { - Path: 'Generalities.Dates.StartDate', - component: 'datepicker', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'EndDate', - ui: { - Path: 'Generalities.Dates.EndDate', - component: 'datepicker', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'CreatedDate', - ui: { - Path: 'Generalities.Dates.CreatedDate', - component: 'datepicker', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'TransactedDate', - ui: { - Path: 'Generalities.Dates.TransactedDate', - component: 'datepicker', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'SentDate', - ui: { - Path: 'Generalities.Dates.SentDate', - component: 'datepicker', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'ReceivedDate', - ui: { - Path: 'Generalities.Dates.ReceivedDate', - component: 'datepicker', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'RegisteredDate', - ui: { - Path: 'Generalities.Dates.RegisteredDate', - component: 'datepicker', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'AcquiredDate', - ui: { - Path: 'Generalities.Dates.AcquiredDate', - component: 'datepicker', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'DateLitteral', - ui: { - Path: 'Generalities.Dates.DateLitteral', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: null, - ui: { - Path: 'Generalities.Identifiers', - component: 'group', - open: false, - layout: { - columns: 2, - size: 'medium', - }, - label: 'Identifiant(s)', - }, - }, - { - Path: 'SystemId', - ui: { - Path: 'Generalities.Identifiers.SystemId', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'OriginatingSystemId', - ui: { - Path: 'Generalities.Identifiers.OriginatingSystemId', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'OriginatingAgencyArchiveUnitIdentifier', - ui: { - Path: 'Generalities.Identifiers.OriginatingAgencyArchiveUnitIdentifier', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'TransferringAgencyArchiveUnitIdentifier', - ui: { - Path: 'Generalities.Identifiers.TransferringAgencyArchiveUnitIdentifier', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'ArchivalAgencyArchiveUnitIdentifier', - ui: { - Path: 'Generalities.Identifiers.ArchivalAgencyArchiveUnitIdentifier', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'FilePlanPosition', - ui: { - Path: 'Generalities.Identifiers.FilePlanPosition', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: null, - ui: { - Path: 'Generalities.Characteristics', - component: 'group', - open: false, - layout: { - columns: 2, - size: 'medium', - }, - label: 'Caractéristique(s)', - }, - }, - { - Path: 'Type', - ui: { - Path: 'Generalities.Characteristics.Type', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'DocumentType', - ui: { - Path: 'Generalities.Characteristics.DocumentType', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'Language', - ui: { - Path: 'Generalities.Characteristics.Language', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'DescriptionLanguage', - ui: { - Path: 'Generalities.Characteristics.DescriptionLanguage', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'Status', - ui: { - Path: 'Generalities.Characteristics.Status', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'Source', - ui: { - Path: 'Generalities.Characteristics.Source', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'Version', - ui: { - Path: 'Generalities.Characteristics.Version', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'OriginatingSystemIdReplyTo', - ui: { - Path: 'Generalities.Characteristics.OriginatingSystemIdReplyTo', - component: 'textfield', - layout: { - columns: 1, - size: 'small', - }, - }, - }, - { - Path: 'TextContent', - ui: { - Path: 'Generalities.Characteristics.TextContent', - component: 'textfield', - layout: { - columns: 2, - size: 'medium', - }, - }, - }, - ]; + @Input() template: DisplayRule[] = customTemplate; mode = 'default'; constructor(private displayObjectService: DisplayObjectService) {} diff --git a/ui/ui-frontend-common/src/app/modules/archive/index.ts b/ui/ui-frontend-common/src/app/modules/archive/index.ts new file mode 100644 index 00000000000..c2b8f88f7b1 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/archive/index.ts @@ -0,0 +1,36 @@ +/* + * Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2015-2022) + * + * contact.vitam@culture.gouv.fr + * + * This software is a computer program whose purpose is to implement a digital archiving back-office system managing + * high volumetry securely and efficiently. + * + * This software is governed by the CeCILL 2.1 license under French law and abiding by the rules of distribution of free + * software. You can use, modify and/ or redistribute the software under the terms of the CeCILL 2.1 license as + * circulated by CEA, CNRS and INRIA at the following URL "https://cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, + * users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the + * successive licensors have only limited liability. + * + * In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or + * developing or reproducing the software by the user in light of its specific status of free software, that may mean + * that it is complicated to manipulate, and that also therefore means that it is reserved for developers and + * experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the + * software's suitability as regards their requirements in conditions enabling the security of their systems and/or data + * to be ensured and, more generally, to use and operate it in the same conditions as regards security. + * + * The fact that you are presently reading this means that you have had knowledge of the CeCILL 2.1 license and that you + * accept its terms. + * + * + */ + +export * from './archive-unit-api.service'; +export * from './archive-unit.service'; +export * from './archive.module'; +export * from './components/archive-unit-editor/archive-unit-editor.component'; +export * from './components/archive-unit-editor/components/editor-banner/editor-banner.component'; +export * from './models/archive-unit'; +export * from './models/json-patch'; diff --git a/ui/ui-frontend-common/src/app/modules/archive/models/archive-unit.ts b/ui/ui-frontend-common/src/app/modules/archive/models/archive-unit.ts new file mode 100644 index 00000000000..224da5ea956 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/archive/models/archive-unit.ts @@ -0,0 +1,43 @@ +/* + * Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2015-2022) + * + * contact.vitam@culture.gouv.fr + * + * This software is a computer program whose purpose is to implement a digital archiving back-office system managing + * high volumetry securely and efficiently. + * + * This software is governed by the CeCILL 2.1 license under French law and abiding by the rules of distribution of free + * software. You can use, modify and/ or redistribute the software under the terms of the CeCILL 2.1 license as + * circulated by CEA, CNRS and INRIA at the following URL "https://cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, + * users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the + * successive licensors have only limited liability. + * + * In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or + * developing or reproducing the software by the user in light of its specific status of free software, that may mean + * that it is complicated to manipulate, and that also therefore means that it is reserved for developers and + * experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the + * software's suitability as regards their requirements in conditions enabling the security of their systems and/or data + * to be ensured and, more generally, to use and operate it in the same conditions as regards security. + * + * The fact that you are presently reading this means that you have had knowledge of the CeCILL 2.1 license and that you + * accept its terms. + */ + +export interface ArchiveUnit extends ManagementMetadata, SystemMetadata, DescriptiveMetadata { + [key: string]: any; +} + +export interface ManagementMetadata { + '#management'?: any; +} + +export interface SystemMetadata { + '#id': String; +} + +export interface DescriptiveMetadata { + Title?: string; + Description?: string; +} diff --git a/ui/ui-frontend-common/src/app/modules/archive/models/json-patch.ts b/ui/ui-frontend-common/src/app/modules/archive/models/json-patch.ts new file mode 100644 index 00000000000..ec43e9149b0 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/archive/models/json-patch.ts @@ -0,0 +1,43 @@ +/* + * Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2015-2022) + * + * contact.vitam@culture.gouv.fr + * + * This software is a computer program whose purpose is to implement a digital archiving back-office system managing + * high volumetry securely and efficiently. + * + * This software is governed by the CeCILL 2.1 license under French law and abiding by the rules of distribution of free + * software. You can use, modify and/ or redistribute the software under the terms of the CeCILL 2.1 license as + * circulated by CEA, CNRS and INRIA at the following URL "https://cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, + * users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the + * successive licensors have only limited liability. + * + * In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or + * developing or reproducing the software by the user in light of its specific status of free software, that may mean + * that it is complicated to manipulate, and that also therefore means that it is reserved for developers and + * experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the + * software's suitability as regards their requirements in conditions enabling the security of their systems and/or data + * to be ensured and, more generally, to use and operate it in the same conditions as regards security. + * + * The fact that you are presently reading this means that you have had knowledge of the CeCILL 2.1 license and that you + * accept its terms. + */ + +export type PatchOperation = 'add' | 'replace' | 'remove'; + +export interface PatchCommand { + op: PatchOperation; + path: string; + value: any; +} + +export interface JsonPatch extends Array {} + +export interface JsonPatchDto { + id: String; + jsonPatch: JsonPatch; +} + +export interface MultiJsonPatchDto extends Array {} diff --git a/ui/ui-frontend-common/src/app/modules/components/datepicker/datepicker.component.scss b/ui/ui-frontend-common/src/app/modules/components/datepicker/datepicker.component.scss new file mode 100644 index 00000000000..e1bfc4caaf9 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/components/datepicker/datepicker.component.scss @@ -0,0 +1,20 @@ +i { + transform: scale(1.5); +} + +.filled { + .search-date-label { + top: 13px; + + transition: top 150ms ease-out; + } + + input { + position: relative; + top: 8px; + left: -2px; + + transition: top left 150ms ease-out; + transition: left 150ms ease-out; + } +} diff --git a/ui/ui-frontend-common/src/app/modules/components/datepicker/datepicker.component.ts b/ui/ui-frontend-common/src/app/modules/components/datepicker/datepicker.component.ts new file mode 100644 index 00000000000..8d548579f8f --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/components/datepicker/datepicker.component.ts @@ -0,0 +1,54 @@ +import { Component, Input, forwardRef } from '@angular/core'; +import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; + +@Component({ + selector: 'vitamui-common-datepicker', + template: ` +
+ {{ label }} + + + +
+ `, + styleUrls: ['./datepicker.component.scss'], + providers: [ + { + provide: NG_VALUE_ACCESSOR, + useExisting: forwardRef(() => DatepickerComponent), + multi: true, + }, + ], +}) +export class DatepickerComponent implements ControlValueAccessor { + @Input() label!: string; + @Input() value!: string; + + propagateChange = (_: any) => {}; + propagateTouched = (_: any) => {}; + + disabled = false; + + writeValue(value: any): void { + if (value instanceof Date) this.value = value.toISOString(); + else this.value = value; + } + + registerOnChange(fn: any): void { + this.propagateChange = fn; + } + + registerOnTouched(fn: any): void { + this.propagateTouched = fn; + } + + setDisabledState?(isDisabled: boolean): void { + this.disabled = isDisabled; + } + + onChange(value: Date): void { + this.value = value.toISOString(); + this.propagateChange(this.value); + console.log({ value: this.value }); + } +} diff --git a/ui/ui-frontend-common/src/app/modules/components/datepicker/datepicker.module.ts b/ui/ui-frontend-common/src/app/modules/components/datepicker/datepicker.module.ts new file mode 100644 index 00000000000..d29199dc377 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/components/datepicker/datepicker.module.ts @@ -0,0 +1,12 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { MatDatepickerModule } from '@angular/material/datepicker'; +import { DatepickerComponent } from './datepicker.component'; + +@NgModule({ + imports: [CommonModule, FormsModule, MatDatepickerModule], + declarations: [DatepickerComponent], + exports: [DatepickerComponent], +}) +export class DatepickerModule {} diff --git a/ui/ui-frontend-common/src/app/modules/index.ts b/ui/ui-frontend-common/src/app/modules/index.ts index b8387acd1cc..d70eb3a4ec3 100644 --- a/ui/ui-frontend-common/src/app/modules/index.ts +++ b/ui/ui-frontend-common/src/app/modules/index.ts @@ -48,15 +48,13 @@ export * from './api/profile-api.service'; export * from './api/rule-api.service'; export * from './api/subrogation-api.service'; export * from './api/user-api.service'; -export * from './tenant-selection.service'; -export * from './customer-selection.service'; export * from './app-root-component.class'; export * from './app.guard'; export * from './application-id.enum'; export * from './application.service'; +export * from './archive/index'; export * from './auth.guard'; export * from './auth.service'; -export * from './base-http-client'; export { AuthenticationModule } from './authentication/authentication.module'; export * from './vitamui-global-error-handler'; export * from './vitamui-table/index'; @@ -81,7 +79,9 @@ export * from './utils/index'; export * from './components/accordion/accordion.component'; export * from './components/data/data.component'; export * from './components/application/index'; +export * from './base-http-client'; export * from './components/application-select-content/index'; +export * from './components/application/index'; export * from './components/blank/blank.component'; export * from './components/cancelled-snack-bar/index'; export * from './components/collapse/collapse.module'; @@ -95,6 +95,7 @@ export * from './components/role-toggle/index'; export * from './components/search-bar/index'; export * from './components/stepper/index'; export * from './components/table-filter/index'; +export * from './components/user-alerts/index'; export * from './components/vitamui-autocomplete/index'; export * from './components/vitamui-customer-select/index'; export * from './components/vitamui-display-node/index'; @@ -104,15 +105,6 @@ export * from './components/vitamui-menu-tile/index'; export * from './components/vitamui-multi-inputs/index'; export * from './components/vitamui-snack-bar/index'; export * from './components/vitamui-tenant-select/index'; -export * from './components/editable-field/index'; -export * from './components/navbar/index'; -export * from './components/role-toggle/index'; -export * from './components/search-bar/index'; -export * from './components/stepper/index'; -export * from './components/table-filter/index'; -export * from './components/header/select-tenant-dialog/index'; -export * from './components/user-alerts/index'; -export * from './components/order-by-button/index'; export * from './components/vitamui-tree-node/index'; export * from './country.service'; export * from './customer-selection.service'; diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.html b/ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.html new file mode 100644 index 00000000000..29606dd0386 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.html @@ -0,0 +1,22 @@ + + {{ editObject.displayRule.ui.label | translate | empty }} +
+ {{ favoritePath | translate }}: {{ favoriteEntry[1] | empty }} +
+
+
+
+
+ + +
+
+ + + + + +
+
+
{{ editObject.value | empty }}
+
diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.scss b/ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.scss new file mode 100644 index 00000000000..11a17d4a6a5 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.scss @@ -0,0 +1,19 @@ +:host { + width: 100%; + display: flex; + gap: 10px; + flex-direction: column; +} + +.v-col { + display: flex; + flex: 1; +} + +.v-row { + display: flex; + flex-direction: row; + flex-wrap: wrap; + width: 100%; + gap: 10px; +} diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.spec.ts b/ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.spec.ts new file mode 100644 index 00000000000..6eca8b1b049 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.spec.ts @@ -0,0 +1,27 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LoggerModule } from '../../../logger'; +import { PipesModule } from '../../../pipes/pipes.module'; +import { GroupEditorComponent } from './group-editor.component'; + +describe('GroupEditorComponent', () => { + let component: GroupEditorComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [GroupEditorComponent], + imports: [LoggerModule.forRoot(), PipesModule], + }).compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(GroupEditorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.ts b/ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.ts new file mode 100644 index 00000000000..37611d16b38 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/components/group-editor/group-editor.component.ts @@ -0,0 +1,40 @@ +import { Component, Input, OnChanges, SimpleChanges } from '@angular/core'; +import { FavoriteEntryService } from '../../../object-viewer/services/favorite-entry.service'; +import { LayoutService } from '../../../object-viewer/services/layout.service'; +import { DisplayObjectType } from '../../../object-viewer/types'; +import { EditObject } from '../../models/edit-object.model'; + +@Component({ + selector: 'vitamui-common-group-editor', + templateUrl: './group-editor.component.html', + styleUrls: ['./group-editor.component.scss'], +}) +export class GroupEditorComponent implements OnChanges { + @Input() editObject: EditObject; + + entries: [key: string, value: any][] = []; + favoriteEntry: [key: string, value: any]; + favoritePath: string; + rows: EditObject[][] = [[]]; + + readonly DisplayObjectType = DisplayObjectType; + + constructor( + private layoutService: LayoutService, + private favoriteEntryService: FavoriteEntryService, + ) {} + + ngOnChanges(changes: SimpleChanges): void { + const { editObject } = changes; + + if (editObject) { + this.favoriteEntry = this.favoriteEntryService.favoriteEntry(this.editObject); + this.favoritePath = this.favoriteEntryService.favoritePath(this.editObject); + this.rows = this.layoutService.compute(this.editObject) as EditObject[][]; + } + } + + toggle(): void { + this.editObject.open = !this.editObject.open; + } +} diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.html b/ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.html new file mode 100644 index 00000000000..e5096b2351b --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.html @@ -0,0 +1,50 @@ + + {{ editObject.displayRule.ui.label | translate | empty }} +
+ {{ favoritePath | translate }}: {{ favoriteEntry[1] | empty }} +
+
+ +
+
+
+
+
+ + + +
+
+ + + +
+
+ +
+
+
+ +
diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.scss b/ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.scss new file mode 100644 index 00000000000..b29ab17b4a5 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.scss @@ -0,0 +1,6 @@ +:host { + width: 100%; + display: flex; + flex-direction: column; + gap: 10px; +} diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.spec.ts b/ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.spec.ts new file mode 100644 index 00000000000..63cce39ff0b --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.spec.ts @@ -0,0 +1,26 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LoggerModule } from '../../../logger'; +import { ListEditorComponent } from './list-editor.component'; + +describe('ListEditorComponent', () => { + let component: ListEditorComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ListEditorComponent], + imports: [LoggerModule.forRoot()], + }).compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ListEditorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.ts b/ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.ts new file mode 100644 index 00000000000..edc7ed566ee --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/components/list-editor/list-editor.component.ts @@ -0,0 +1,39 @@ +import { Component, Input, OnChanges, SimpleChanges } from '@angular/core'; +import { FavoriteEntryService } from '../../../object-viewer/services/favorite-entry.service'; +import { DisplayObjectType } from '../../../object-viewer/types'; +import { EditObject } from '../../models/edit-object.model'; + +@Component({ + selector: 'vitamui-common-list-editor', + templateUrl: './list-editor.component.html', + styleUrls: ['./list-editor.component.scss'], +}) +export class ListEditorComponent implements OnChanges { + @Input() editObject: EditObject; + + favoriteEntry: [key: string, value: any]; + favoritePath: string; + + readonly DisplayObjectType = DisplayObjectType; + + constructor(private favoriteEntryService: FavoriteEntryService) {} + + ngOnChanges(changes: SimpleChanges): void { + const { editObject } = changes; + + if (editObject) this.favoriteEntryService.favoriteEntry(this.editObject); + } + + toggle(): void { + this.editObject.open = !this.editObject.open; + } + + add(event: Event): void { + this.editObject.actions.add(); + event.stopPropagation(); + } + + removeAt(event: Event, i: number): void { + this.editObject.actions.removeAt(i); + } +} diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.html b/ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.html new file mode 100644 index 00000000000..b2a681f0478 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.html @@ -0,0 +1,32 @@ + + + + + + + + + diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.scss b/ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.scss new file mode 100644 index 00000000000..b9bc65ea450 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.scss @@ -0,0 +1,3 @@ +:host { + width: 100%; +} diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.spec.ts b/ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.spec.ts new file mode 100644 index 00000000000..80262545718 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.spec.ts @@ -0,0 +1,26 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PrimitiveEditorComponent } from './primitive-editor.component'; +import { LoggerModule } from '../../../logger'; + +describe('PrimitiveEditorComponent', () => { + let component: PrimitiveEditorComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [PrimitiveEditorComponent], + imports: [LoggerModule.forRoot()], + }).compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(PrimitiveEditorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.ts b/ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.ts new file mode 100644 index 00000000000..df70fe83823 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/components/primitive-editor/primitive-editor.component.ts @@ -0,0 +1,30 @@ +import { Component, Input, OnInit } from '@angular/core'; +import { Logger } from '../../../logger/logger'; +import { DateDisplayService } from '../../../object-viewer/services/date-display.service'; +import { ComponentType } from '../../../object-viewer/types'; +import { EditObject } from '../../models/edit-object.model'; + +@Component({ + selector: 'vitamui-common-primitive-editor', + templateUrl: './primitive-editor.component.html', + styleUrls: ['./primitive-editor.component.scss'], +}) +export class PrimitiveEditorComponent implements OnInit { + @Input() editObject: EditObject; + + uiComponent: ComponentType; + dateFormat: string; + + constructor( + private logger: Logger, + private dateDisplayService: DateDisplayService, + ) {} + + ngOnInit(): void { + if (!this.editObject) return; + if (!this.editObject.control) this.logger.warn(this, this.editObject.path, 'No control assigned !'); + + this.uiComponent = this.editObject.displayRule?.ui?.component; + this.dateFormat = this.dateDisplayService.getFormat(this.uiComponent); + } +} diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/models/edit-object.model.ts b/ui/ui-frontend-common/src/app/modules/object-editor/models/edit-object.model.ts new file mode 100644 index 00000000000..e871ba11e23 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/models/edit-object.model.ts @@ -0,0 +1,13 @@ +import { AbstractControl } from '@angular/forms'; +import { DisplayObject } from '../../object-viewer/models'; +import { DisplayObjectType } from '../../object-viewer/types'; + +export interface EditObject extends DisplayObject { + control: AbstractControl; + kind?: 'object' | 'object-array' | 'primitive-array' | 'primitive' | 'unknown'; + default?: any; + actions?: any; + children?: EditObject[]; + type?: DisplayObjectType; + favoriteKeys?: string[]; +} diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/object-editor.component.html b/ui/ui-frontend-common/src/app/modules/object-editor/object-editor.component.html new file mode 100644 index 00000000000..06259eb5c00 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/object-editor.component.html @@ -0,0 +1,8 @@ +
+ + + +
diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/object-editor.component.spec.ts b/ui/ui-frontend-common/src/app/modules/object-editor/object-editor.component.spec.ts new file mode 100644 index 00000000000..e7d4b9ce2a7 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/object-editor.component.spec.ts @@ -0,0 +1,27 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LoggerModule } from '../logger'; +import { ObjectViewerModule } from '../object-viewer/object-viewer.module'; +import { ObjectEditorComponent } from './object-editor.component'; + +describe('ObjectEditorComponent', () => { + let component: ObjectEditorComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ObjectEditorComponent], + imports: [LoggerModule.forRoot(), ObjectViewerModule], + }).compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ObjectEditorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/object-editor.component.ts b/ui/ui-frontend-common/src/app/modules/object-editor/object-editor.component.ts new file mode 100644 index 00000000000..a69e2d38db0 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/object-editor.component.ts @@ -0,0 +1,14 @@ +import { Component, Input } from '@angular/core'; +import { DisplayObjectType } from '../object-viewer/types'; +import { EditObject } from './models/edit-object.model'; + +@Component({ + selector: 'vitamui-common-object-editor', + templateUrl: './object-editor.component.html', + styles: [], +}) +export class ObjectEditorComponent { + @Input() editObject!: EditObject; + + readonly DisplayObjectType = DisplayObjectType; +} diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/object-editor.module.ts b/ui/ui-frontend-common/src/app/modules/object-editor/object-editor.module.ts new file mode 100644 index 00000000000..a792189c2de --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/object-editor.module.ts @@ -0,0 +1,43 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatDatepickerModule } from '@angular/material/datepicker'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { TranslateModule } from '@ngx-translate/core'; +import { AccordionModule } from '../components/accordion/accordion.module'; +import { DatepickerModule } from '../components/datepicker/datepicker.module'; +import { VitamUIInputModule } from '../components/vitamui-input/vitamui-input.module'; +import { VitamUIListInputModule } from '../components/vitamui-list-input'; +import { DisplayObjectService } from '../object-viewer/models'; +import { PathStrategyDisplayObjectService } from '../object-viewer/services/path-strategy-display-object.service'; +import { PipesModule } from '../pipes/pipes.module'; +import { GroupEditorComponent } from './components/group-editor/group-editor.component'; +import { ListEditorComponent } from './components/list-editor/list-editor.component'; +import { PrimitiveEditorComponent } from './components/primitive-editor/primitive-editor.component'; +import { ObjectEditorComponent } from './object-editor.component'; + +@NgModule({ + declarations: [ObjectEditorComponent, GroupEditorComponent, ListEditorComponent, PrimitiveEditorComponent], + providers: [{ provide: DisplayObjectService, useClass: PathStrategyDisplayObjectService }], + imports: [ + CommonModule, + TranslateModule, + PipesModule, + FormsModule, + ReactiveFormsModule, + VitamUIInputModule, + VitamUIListInputModule, + AccordionModule, + DatepickerModule, + MatDatepickerModule, + MatFormFieldModule, + MatInputModule, + MatTooltipModule, + MatProgressSpinnerModule, + ], + exports: [ObjectEditorComponent, GroupEditorComponent, ListEditorComponent, PrimitiveEditorComponent], +}) +export class ObjectEditorModule {} diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/services/edit-object.service.spec.ts b/ui/ui-frontend-common/src/app/modules/object-editor/services/edit-object.service.spec.ts new file mode 100644 index 00000000000..b12ccb3b868 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/services/edit-object.service.spec.ts @@ -0,0 +1,671 @@ +import { TestBed, inject, waitForAsync } from '@angular/core/testing'; +import { ReactiveFormsModule } from '@angular/forms'; +import { Collection, Schema } from '../../models'; +import { DisplayRule } from '../../object-viewer/models'; +import { DisplayRuleHelperService } from '../../object-viewer/services/display-rule-helper.service'; +import { MockSchemaService } from '../../object-viewer/services/mock-schema.service'; +import { SchemaElementToDisplayRuleService } from '../../object-viewer/services/schema-element-to-display-rule.service'; +import { TypeService } from '../../object-viewer/services/type.service'; +import { EditObject } from '../models/edit-object.model'; +import { EditObjectService } from './edit-object.service'; +import { SchemaService } from './schema.service'; +import { TemplateService } from './template.service'; + +describe('EditObjectService', () => { + let service: EditObjectService; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ReactiveFormsModule], + providers: [TypeService, MockSchemaService, SchemaElementToDisplayRuleService, DisplayRuleHelperService], + }); + service = TestBed.inject(EditObjectService); + }); + + it('should create', () => { + expect(service).toBeTruthy(); + }); + + describe('EditObject', () => { + it('should create simple editObject', waitForAsync( + inject([MockSchemaService], (schemaService: MockSchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = ''; + const data = { Title: 'Hello' }; + const template: DisplayRule[] = [{ Path: 'Title', ui: { Path: 'Title', component: 'textfield' } }]; + const subschema = schema.filter((element) => element.Category === 'DESCRIPTION'); + const editObject = service.editObject(path, data, template, subschema); + + expect(editObject).toBeTruthy(); + expect(editObject.children.length).toEqual(16); + expect(editObject.children).toEqual( + jasmine.arrayContaining( + [ + 'Addressee', + 'Agent', + 'AuthorizedAgent', + 'Coverage', + 'DescriptionLevel', + 'Event', + 'Gps', + 'Recipient', + 'Sender', + 'Signature', + 'SigningInformation', + 'Title', + 'Transmitter', + 'Writer', + '#originating_agency', + '#originating_agencies', + ].map((path) => jasmine.objectContaining({ path })), + ), + ); + expect(editObject.children).toEqual( + jasmine.arrayContaining([ + jasmine.objectContaining({ + displayRule: jasmine.objectContaining({ + Path: 'Title', + }), + }), + ]), + ); + }); + }), + )); + + it('should create nested editObject', waitForAsync( + inject([MockSchemaService], (schemaService: MockSchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = ''; + const data = { + Title: 'Hello', + Addressee: [ + { + BirthDate: '01/01/2000', + }, + ], + }; + const template: DisplayRule[] = [ + { Path: 'Title', ui: { Path: 'Title', component: 'textfield' } }, + { Path: 'Addressee', ui: { Path: 'Addressee', component: 'group' } }, + ]; + const subschema = schema.filter((element) => element.Category === 'DESCRIPTION'); + const editObject = service.editObject(path, data, template, subschema); + + expect(editObject).toBeTruthy(); + expect(editObject.children.length).toEqual(16); + expect(editObject.children).toEqual( + jasmine.arrayContaining( + [ + 'Addressee', + 'Agent', + 'AuthorizedAgent', + 'Coverage', + 'DescriptionLevel', + 'Event', + 'Gps', + 'Recipient', + 'Sender', + 'Signature', + 'SigningInformation', + 'Title', + 'Transmitter', + 'Writer', + '#originating_agency', + '#originating_agencies', + ].map((path) => jasmine.objectContaining({ path })), + ), + ); + expect(editObject.children).toEqual( + jasmine.arrayContaining([ + jasmine.objectContaining({ + path: 'Addressee', + displayRule: jasmine.objectContaining({ + Path: 'Addressee', + ui: jasmine.objectContaining({ + component: 'group', + }), + }), + }), + ]), + ); + + expect(editObject.children.find((node) => node.path === 'Addressee').children.length).toBeGreaterThan(0); + }); + }), + )); + + it('should create projected nested object', waitForAsync( + inject( + [MockSchemaService, TemplateService, SchemaService], + (schemaService: MockSchemaService, templetaService: TemplateService, ss: SchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = ''; + const originalData = { + Title: 'Hello', + Addressee: [{ BirthDate: '01/01/2000' }], + }; + const template: DisplayRule[] = [ + { Path: 'Title', ui: { Path: 'Title', component: 'textfield' } }, + { Path: null, ui: { Path: 'Actors', component: 'group' } }, + { Path: 'Addressee', ui: { Path: 'Actors.Addressee', component: 'group' } }, + { Path: 'Agent', ui: { Path: 'Actors.Agent', component: 'group' } }, + { Path: 'Transmitter', ui: { Path: 'Actors.Transmitter', component: 'group' } }, + { Path: 'Writer', ui: { Path: 'Actors.Writer', component: 'group' } }, + ]; + const projectedData = templetaService.toProjected(originalData, template); + const subschema = schema.filter((element) => element.Category === 'DESCRIPTION'); + const templatedSchema = service.createaTemplateSchema(template, subschema); + const editObject = service.editObject(path, projectedData, template, templatedSchema); + + expect(editObject).toBeTruthy(); + expect(editObject.children.length).toEqual(13); + expect(editObject.children).toEqual( + jasmine.arrayContaining( + [ + 'AuthorizedAgent', + 'Coverage', + 'DescriptionLevel', + 'Event', + 'Gps', + 'Recipient', + 'Sender', + 'Signature', + 'SigningInformation', + 'Title', + '#originating_agency', + '#originating_agencies', + ].map((path) => jasmine.objectContaining({ path })), + ), + ); + expect(editObject.children).toEqual( + jasmine.arrayContaining([ + jasmine.objectContaining({ + path: 'Actors', + default: { + Addressee: [{ BirthDate: '01/01/2000' }], + Agent: [], + Transmitter: [], + Writer: [], + }, + children: jasmine.arrayContaining([ + jasmine.objectContaining({ path: 'Actors.Addressee' }), + jasmine.objectContaining({ path: 'Actors.Agent' }), + jasmine.objectContaining({ path: 'Actors.Transmitter' }), + jasmine.objectContaining({ path: 'Actors.Writer' }), + ]), + }), + ]), + ); + }); + }, + ), + )); + + it('should create projected nested object and add new items', waitForAsync( + inject( + [MockSchemaService, TemplateService, SchemaService], + (schemaService: MockSchemaService, templetaService: TemplateService, ss: SchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = ''; + const originalData = { + Title: 'Hello', + Addressee: [{ BirthDate: '01/01/2000' }], + }; + const template: DisplayRule[] = [ + { Path: 'Title', ui: { Path: 'Title', component: 'textfield' } }, + { Path: null, ui: { Path: 'Actors', component: 'group' } }, + { Path: 'Addressee', ui: { Path: 'Actors.Addressee', component: 'group' } }, + { Path: 'Agent', ui: { Path: 'Actors.Agent', component: 'group' } }, + { Path: 'Transmitter', ui: { Path: 'Actors.Transmitter', component: 'group' } }, + { Path: 'Writer', ui: { Path: 'Actors.Writer', component: 'group' } }, + ]; + const projectedData = templetaService.toProjected(originalData, template); + const subschema = schema.filter((element) => element.Category === 'DESCRIPTION'); + const templatedSchema = service.createaTemplateSchema(template, subschema); + const editObject: EditObject = service.editObject(path, projectedData, template, templatedSchema); + + expect(editObject).toBeTruthy(); + expect(editObject.children.length).toEqual(13); + expect(editObject.children).toEqual( + jasmine.arrayContaining( + [ + 'AuthorizedAgent', + 'Coverage', + 'DescriptionLevel', + 'Event', + 'Gps', + 'Recipient', + 'Sender', + 'Signature', + 'SigningInformation', + 'Title', + '#originating_agency', + '#originating_agencies', + ].map((path) => jasmine.objectContaining({ path })), + ), + ); + expect(editObject.children).toEqual( + jasmine.arrayContaining([ + jasmine.objectContaining({ + path: 'Actors', + default: { + Addressee: [{ BirthDate: '01/01/2000' }], + Agent: [], + Transmitter: [], + Writer: [], + }, + children: jasmine.arrayContaining([ + jasmine.objectContaining({ path: 'Actors.Addressee' }), + jasmine.objectContaining({ path: 'Actors.Agent' }), + jasmine.objectContaining({ path: 'Actors.Transmitter' }), + jasmine.objectContaining({ path: 'Actors.Writer' }), + ]), + }), + ]), + ); + + const addresseesEditObject = editObject.children + .find((eo) => eo.key === 'Actors') + .children.find((eo) => eo.key === 'Addressee'); + + expect(addresseesEditObject).toBeTruthy(); + + addresseesEditObject.actions.add(); + + expect(addresseesEditObject.children.length).toEqual(2); + }); + }, + ), + )); + + it('should create projected nested object and remove an item', waitForAsync( + inject( + [MockSchemaService, TemplateService, SchemaService], + (schemaService: MockSchemaService, templetaService: TemplateService, ss: SchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = ''; + const originalData = { + Title: 'Hello', + Addressee: [{ BirthDate: '01/01/2000' }], + }; + const template: DisplayRule[] = [ + { Path: 'Title', ui: { Path: 'Title', component: 'textfield' } }, + { Path: null, ui: { Path: 'Actors', component: 'group' } }, + { Path: 'Addressee', ui: { Path: 'Actors.Addressee', component: 'group' } }, + { Path: 'Agent', ui: { Path: 'Actors.Agent', component: 'group' } }, + { Path: 'Transmitter', ui: { Path: 'Actors.Transmitter', component: 'group' } }, + { Path: 'Writer', ui: { Path: 'Actors.Writer', component: 'group' } }, + ]; + const projectedData = templetaService.toProjected(originalData, template); + const subschema = schema.filter((element) => element.Category === 'DESCRIPTION'); + const templatedSchema = service.createaTemplateSchema(template, subschema); + const editObject: EditObject = service.editObject(path, projectedData, template, templatedSchema); + + expect(editObject).toBeTruthy(); + expect(editObject.children.length).toEqual(13); + expect(editObject.children).toEqual( + jasmine.arrayContaining( + [ + 'AuthorizedAgent', + 'Coverage', + 'DescriptionLevel', + 'Event', + 'Gps', + 'Recipient', + 'Sender', + 'Signature', + 'SigningInformation', + 'Title', + '#originating_agency', + '#originating_agencies', + ].map((path) => jasmine.objectContaining({ path })), + ), + ); + expect(editObject.children).toEqual( + jasmine.arrayContaining([ + jasmine.objectContaining({ + path: 'Actors', + default: { + Addressee: [{ BirthDate: '01/01/2000' }], + Agent: [], + Transmitter: [], + Writer: [], + }, + children: jasmine.arrayContaining([ + jasmine.objectContaining({ path: 'Actors.Addressee' }), + jasmine.objectContaining({ path: 'Actors.Agent' }), + jasmine.objectContaining({ path: 'Actors.Transmitter' }), + jasmine.objectContaining({ path: 'Actors.Writer' }), + ]), + }), + ]), + ); + + const addresseesEditObject = editObject.children + .find((eo) => eo.key === 'Actors') + .children.find((eo) => eo.key === 'Addressee'); + + expect(addresseesEditObject).toBeTruthy(); + + addresseesEditObject.actions.removeAt(0); + + expect(addresseesEditObject.children.length).toEqual(0); + }); + }, + ), + )); + + it('should create projected nested object and do complexe operations on arrays', waitForAsync( + inject( + [MockSchemaService, TemplateService, SchemaService], + (schemaService: MockSchemaService, templetaService: TemplateService, ss: SchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = ''; + const originalData = { + Title: 'Hello', + Addressee: [{ BirthDate: '01/01/2000' }], + }; + const template: DisplayRule[] = [ + { Path: 'Title', ui: { Path: 'Title', component: 'textfield' } }, + { Path: null, ui: { Path: 'Actors', component: 'group' } }, + { Path: 'Addressee', ui: { Path: 'Actors.Addressee', component: 'group' } }, + { Path: 'Agent', ui: { Path: 'Actors.Agent', component: 'group' } }, + { Path: 'Transmitter', ui: { Path: 'Actors.Transmitter', component: 'group' } }, + { Path: 'Writer', ui: { Path: 'Actors.Writer', component: 'group' } }, + ]; + const projectedData = templetaService.toProjected(originalData, template); + const subschema = schema.filter((element) => element.Category === 'DESCRIPTION'); + const templatedSchema = service.createaTemplateSchema(template, subschema); + const editObject: EditObject = service.editObject(path, projectedData, template, templatedSchema); + + expect(editObject).toBeTruthy(); + expect(editObject.children.length).toEqual(13); + expect(editObject.children).toEqual( + jasmine.arrayContaining( + [ + 'AuthorizedAgent', + 'Coverage', + 'DescriptionLevel', + 'Event', + 'Gps', + 'Recipient', + 'Sender', + 'Signature', + 'SigningInformation', + 'Title', + '#originating_agency', + '#originating_agencies', + ].map((path) => jasmine.objectContaining({ path })), + ), + ); + expect(editObject.children).toEqual( + jasmine.arrayContaining([ + jasmine.objectContaining({ + path: 'Actors', + default: { + Addressee: [{ BirthDate: '01/01/2000' }], + Agent: [], + Transmitter: [], + Writer: [], + }, + children: jasmine.arrayContaining([ + jasmine.objectContaining({ path: 'Actors.Addressee' }), + jasmine.objectContaining({ path: 'Actors.Agent' }), + jasmine.objectContaining({ path: 'Actors.Transmitter' }), + jasmine.objectContaining({ path: 'Actors.Writer' }), + ]), + }), + ]), + ); + + const addresseesEditObject = editObject.children + .find((eo) => eo.key === 'Actors') + .children.find((eo) => eo.key === 'Addressee'); + + expect(addresseesEditObject).toBeTruthy(); + + addresseesEditObject.actions.add({ FirstName: 'John' }); + addresseesEditObject.actions.add({ FirstName: 'Daniel' }); + addresseesEditObject.actions.add({ FirstName: 'Alexandre' }); + + expect(addresseesEditObject.children.length).toEqual(4); + + addresseesEditObject.actions.removeAt(2); + + expect(addresseesEditObject.children.length).toEqual(3); + expect(addresseesEditObject.control.value).not.toEqual( + jasmine.arrayContaining([ + jasmine.objectContaining({ + FirstName: 'Daniel', + }), + ]), + ); + }); + }, + ), + )); + + it('should create with empty data', waitForAsync( + inject( + [MockSchemaService, TemplateService, SchemaService], + (schemaService: MockSchemaService, templetaService: TemplateService, ss: SchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = ''; + const originalData = {}; + const template: DisplayRule[] = []; + const projectedData = templetaService.toProjected(originalData, template); + const subschema = schema.filter((element) => element.Category === 'DESCRIPTION'); + const templatedSchema = service.createaTemplateSchema(template, subschema); + const editObject: EditObject = service.editObject(path, projectedData, template, templatedSchema); + + expect(editObject).toBeTruthy(); + expect(editObject.children.length).toEqual(16); + expect(editObject.children).toEqual( + jasmine.arrayContaining( + [ + 'Addressee', + 'Agent', + 'AuthorizedAgent', + 'Coverage', + 'DescriptionLevel', + 'Event', + 'Gps', + 'Recipient', + 'Sender', + 'Signature', + 'SigningInformation', + 'Title', + 'Transmitter', + 'Writer', + '#originating_agency', + '#originating_agencies', + ].map((path) => jasmine.objectContaining({ path })), + ), + ); + expect(editObject.children).toEqual( + jasmine.arrayContaining([ + jasmine.objectContaining({ + path: 'Addressee', + kind: 'object-array', + children: [], + }), + ]), + ); + }); + }, + ), + )); + }); + + describe('Kind', () => { + it('should object be object kind', () => { + expect(service.kind({})).toEqual('object'); + }); + + // TODO: Determine which kind is empty array + xit('should empty array be object-array kind', () => { + expect(service.kind([])).toEqual('object-array'); + }); + + it('should string array be primitive-array kind', () => { + expect(service.kind(['a', 'b', 'c'])).toEqual('primitive-array'); + }); + + it('should object array be object-array kind', () => { + expect(service.kind([{}, {}, {}])).toEqual('object-array'); + }); + + it('should null be object kind', () => { + expect(service.kind(null)).toEqual('object'); + }); + }); + + describe('TemplateSchema', () => { + it('should create template schema without template and schema', () => { + const template = []; + const schema = []; + const output = service.createaTemplateSchema(template, schema); + const expected = []; + + expect(output).toEqual(expected); + }); + + it('should create template schema without template and with schema', () => { + const template = []; + const schema: Schema = [ + { + Path: '', + FieldName: '', + ApiField: '', + Type: 'OBJECT', + DataType: 'OBJECT', + Origin: 'VIRTUAL', + Indexed: false, + StringSize: 'MEDIUM', + Cardinality: 'ONE', + SedaVersions: [], + Collection: Collection.ARCHIVE_UNIT, + ApiPath: '', + Category: 'DESCRIPTION', + }, + ]; + const ouput = service.createaTemplateSchema(template, schema); + const expected: Schema = [ + { + Path: '', + FieldName: '', + ApiField: '', + Type: 'OBJECT', + DataType: 'OBJECT', + Origin: 'VIRTUAL', + Indexed: false, + StringSize: 'MEDIUM', + Cardinality: 'ONE', + SedaVersions: [], + Collection: Collection.ARCHIVE_UNIT, + ApiPath: '', + Category: 'DESCRIPTION', + }, + ]; + + expect(ouput.length).toEqual(1); + expect(ouput).toEqual(expected); + }); + + it('should create template schema with template and without schema', () => { + const template: DisplayRule[] = [ + { + Path: '', + ui: { + Path: '', + component: 'group', + }, + }, + ]; + const schema: Schema = []; + const ouput = service.createaTemplateSchema(template, schema); + const expected: Schema = []; + + expect(ouput).toEqual(expected); + }); + }); + + it('should template schema be same as schema when template does not move data', waitForAsync( + inject([MockSchemaService], (schemaService: MockSchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const template: DisplayRule[] = [{ Path: 'Title', ui: { Path: 'Title', component: 'textfield' } }]; + const subschema = schema + .filter((element) => element.Category === 'DESCRIPTION') + .sort((a, b) => { + if (a.ApiPath < b.ApiPath) return -1; + if (a.ApiPath > b.ApiPath) return 1; + + return 0; + }); + const templatedSchema = service.createaTemplateSchema(template, subschema).sort((a, b) => { + if (a.ApiPath < b.ApiPath) return -1; + if (a.ApiPath > b.ApiPath) return 1; + + return 0; + }); + + expect(templatedSchema).toBeTruthy(); + expect(templatedSchema.length).toEqual(subschema.length); + expect(templatedSchema).toEqual(subschema); + }); + }), + )); + + it('should template schema add only one node when moves a primitive from schema into a group a root level', waitForAsync( + inject([MockSchemaService], (schemaService: MockSchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const template: DisplayRule[] = [ + { Path: null, ui: { Path: 'Generalities', component: 'group' } }, + { Path: 'Title', ui: { Path: 'Generalities.Title', component: 'textfield' } }, + ]; + const subschema = schema.filter((element) => element.Category === 'DESCRIPTION'); + const templatedSchema = service.createaTemplateSchema(template, subschema); + + expect(templatedSchema).toBeTruthy(); + expect(templatedSchema.length).toEqual(subschema.length + 1); + expect(templatedSchema).toEqual( + jasmine.arrayContaining([ + jasmine.objectContaining({ Path: 'Generalities', ApiPath: 'Generalities' }), + jasmine.objectContaining({ Path: 'Title', ApiPath: 'Generalities.Title' }), + ]), + ); + }); + }), + )); + + it('should template schema add only concerned nodes when moves an object array from schema into a group a root level', waitForAsync( + inject([MockSchemaService], (schemaService: MockSchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const template: DisplayRule[] = [ + { Path: null, ui: { Path: 'Generalities', component: 'group' } }, + { Path: 'Addressee', ui: { Path: 'Generalities.Addressee', component: 'group' } }, + ]; + const subschema = schema.filter((element) => element.Category === 'DESCRIPTION'); + const templatedSchema = service.createaTemplateSchema(template, subschema); + const nodeCount = subschema.reduce((acc, cur) => (cur.ApiPath.startsWith('Addressee') ? acc + 1 : acc), 0); + + expect(nodeCount).toEqual(30); + expect(templatedSchema).toBeTruthy(); + expect(templatedSchema.length).toEqual(subschema.length + 1); + + const allPaths = templatedSchema.map((se) => se.Path); + const uniquePaths = Array.from(new Set(allPaths)); + expect(templatedSchema.length).toEqual(uniquePaths.length); + + expect(templatedSchema).toEqual( + jasmine.arrayContaining([ + jasmine.objectContaining({ Path: 'Generalities', ApiPath: 'Generalities' }), + jasmine.objectContaining({ Path: 'Addressee', ApiPath: 'Generalities.Addressee' }), + jasmine.objectContaining({ Path: 'Addressee.Activity', ApiPath: 'Generalities.Addressee.Activity' }), + ]), + ); + }); + }), + )); +}); diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/services/edit-object.service.ts b/ui/ui-frontend-common/src/app/modules/object-editor/services/edit-object.service.ts new file mode 100644 index 00000000000..1b6badd075f --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/services/edit-object.service.ts @@ -0,0 +1,184 @@ +import { Injectable } from '@angular/core'; + +import { AbstractControl, FormArray, FormBuilder } from '@angular/forms'; +import { DisplayRule } from '../../object-viewer/models'; +import { DataStructureService } from '../../object-viewer/services/data-structure.service'; +import { TypeService } from '../../object-viewer/services/type.service'; +import { ComponentType, DisplayObjectType } from '../../object-viewer/types'; +import { EditObject } from '../models/edit-object.model'; +import { SchemaOptions, SchemaService } from './schema.service'; +import { Schema } from '../../models'; + +@Injectable({ + providedIn: 'root', +}) +export class EditObjectService { + constructor( + private schemaService: SchemaService, + private typeService: TypeService, + private dataService: DataStructureService, + private formBuilder: FormBuilder, + ) {} + + public editObject(path: string, data: any, template: DisplayRule[], schema: Schema): EditObject { + const schemaPath = this.schemaService.normalize(path); + const defaultValue = this.schemaService.data(schemaPath, schema); + const baseEditObject = this.baseEditObject(path, schemaPath, data, defaultValue, template, schema); + let children = []; + let control: AbstractControl = this.formBuilder.control(data); + let actions: any = {}; + + if (data === null) return { ...baseEditObject, control, children } as EditObject; + + if (this.typeService.isList(data)) { + if (baseEditObject.kind === 'object-array') { + children = data.map((value: any, index: number) => this.editObject(`${path}[${index}]`, value, template, schema)); + control = this.formBuilder.array(children.map((child) => child.control)); + actions.add = (data = null) => { + const fullData = defaultValue ? this.dataService.deepMerge(defaultValue, data) : data; + const editObject = this.editObject(`${path}[${children.length}]`, fullData, template, schema); + + (control as FormArray).push(editObject.control); + children.push(editObject); + control.markAsDirty(); + }; + actions.removeAt = (i: number) => { + (control as FormArray).removeAt(i); + children.splice(i, 1); + control.markAsDirty(); + }; + } + } + + if (this.typeService.isGroup(data)) { + const fullData = defaultValue ? this.dataService.deepMerge(defaultValue, data) : data; + + if (fullData) { + children = Object.entries(fullData).map(([key, value]) => + this.editObject(`${path ? path + '.' + key : key}`, value, template, schema), + ); + control = this.formBuilder.group(children.reduce((acc, child) => ({ ...acc, [child.key]: child.control }), {})); + } + } + + children.sort((eo1: EditObject, eo2: EditObject) => { + // TODO: Check why some EditObject have not DisplayRule defined + if (!eo1.displayRule && !eo2.displayRule) return 0; + if (!eo1.displayRule) return -1; + if (!eo2.displayRule) return 1; + + const index1 = template.findIndex((rule: DisplayRule) => rule.ui.Path === eo1.displayRule.ui.Path); + const index2 = template.findIndex((rule: DisplayRule) => rule.ui.Path === eo2.displayRule.ui.Path); + + if (index1 < index2) return -1; + if (index1 > index2) return 1; + + return 0; + }); + + return { ...baseEditObject, control, children, actions } as EditObject; + } + + public kind(data: any): 'object' | 'object-array' | 'primitive-array' | 'primitive' | 'unknown' { + if (this.typeService.isPrimitive(data)) return 'primitive'; + if (this.typeService.isPrimitiveList(data)) return 'primitive-array'; + if (this.typeService.isList(data)) return 'object-array'; + if (this.typeService.isGroup(data)) return 'object'; + + return 'unknown'; + } + + public createaTemplateSchema(template: DisplayRule[], schema: Schema, options: SchemaOptions = { pathKey: 'ApiPath' }): Schema { + const next: Schema = JSON.parse(JSON.stringify(schema)); + + template.forEach((rule) => { + if (rule.Path === null) { + const field = rule.ui.Path.split('.').pop(); + + next.push({ + Path: rule.ui.Path, + FieldName: field, + ApiField: field, + Type: 'OBJECT', + DataType: 'OBJECT', + Origin: 'VIRTUAL', + Indexed: false, + StringSize: 'MEDIUM', + Cardinality: 'ONE', + SedaVersions: options.versions || [], + Collection: options.collection, + ApiPath: rule.ui.Path, + Category: 'DESCRIPTION', + ShortName: rule.ui.label, + }); + + return; + } + + next + .filter((element) => (element[options.pathKey] as string).startsWith(rule.Path)) + .forEach((element) => { + element[options.pathKey] = element[options.pathKey].replace(rule.Path, rule.ui.Path); + }); + }); + + return next; + } + + public valueToType(data: any): DisplayObjectType { + switch (this.kind(data)) { + case 'object': + return DisplayObjectType.GROUP; + case 'object-array': + case 'primitive-array': + return DisplayObjectType.LIST; + case 'primitive': + default: + return DisplayObjectType.PRIMITIVE; + } + } + + public kindToType(kind: EditObject['kind']): DisplayObjectType { + switch (kind) { + case 'object': + return DisplayObjectType.GROUP; + case 'object-array': + case 'primitive-array': + return DisplayObjectType.LIST; + case 'primitive': + default: + return DisplayObjectType.PRIMITIVE; + } + } + + private baseEditObject( + path: string, + schemaPath: string, + value: any, + defaultValue: any, + template: DisplayRule[], + schema: Schema, + ): Partial { + const key = path.split('.').pop(); + const isRootPath = !Boolean(path); + const isArrayElement = /\[\d+\]/gm.test(key); + const kind = isRootPath || isArrayElement ? this.kind(value) : this.schemaService.kind(schemaPath, schema); + const type = this.kindToType(kind); + const displayRule = template.find((rule) => rule.ui.Path === schemaPath); + const component: ComponentType = + displayRule?.ui?.component || (['object', 'object-array', 'primitive-array'].includes(kind) ? 'group' : 'textfield'); + + return { + key, + path, + kind, + type, + component, + value, + default: defaultValue, + displayRule, + open: true, + favoriteKeys: [], + }; + } +} diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/services/path.service.spec.ts b/ui/ui-frontend-common/src/app/modules/object-editor/services/path.service.spec.ts new file mode 100644 index 00000000000..5114880bb05 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/services/path.service.spec.ts @@ -0,0 +1,243 @@ +import { TestBed } from '@angular/core/testing'; +import { PathService } from './path.service'; + +describe('PathService', () => { + let service: PathService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(PathService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); + + it('should convert to dot notation a path', () => { + expect(service.dot('a[0]')).toEqual('a.0'); + expect(service.dot('a.b.c[0]')).toEqual('a.b.c.0'); + expect(service.dot('a[0].b[1].c[2]')).toEqual('a.0.b.1.c.2'); + }); + + describe('Children', () => { + it('should find path children', () => { + const paths = ['A', 'B', 'B.B', 'C', 'A.A', 'A.A.A', 'A.A.B', 'A.A.C']; + + expect(service.children('A.A', paths)).toEqual(['A.A.A', 'A.A.B', 'A.A.C']); + expect(service.children('', paths)).toContain('A'); + expect(service.children('', paths)).toContain('B'); + expect(service.children('', paths)).toContain('C'); + }); + + it('should find path children from an object', () => { + const data = { + A: { + B: { + C: {}, + }, + }, + D: { + E: {}, + F: {}, + }, + }; + const paths = service.paths(data); + + expect(service.children('', paths)).toEqual(['A', 'D']); + expect(service.children('A', paths)).toEqual(['A.B']); + expect(service.children('A.B', paths)).toEqual(['A.B.C']); + expect(service.children('D', paths)).toEqual(['D.E', 'D.F']); + expect(service.children('D.E', paths)).toEqual([]); + expect(service.children('Z', paths)).toEqual([]); + }); + + it('should find path children from an object with arrays', () => { + const data = { + A: { + B: { + C: {}, + }, + }, + D: [{ E: {} }, { F: {} }], + }; + const paths = service.paths(data); + + expect(service.children('', paths)).toEqual(['A', 'D[0]', 'D[1]']); + expect(service.children('A', paths)).toEqual(['A.B']); + expect(service.children('A.B', paths)).toEqual(['A.B.C']); + expect(service.children('D', paths)).toEqual(['D[0]', 'D[1]']); + expect(service.children('D[0]', paths)).toEqual(['D[0].E']); + expect(service.children('Z', paths)).toEqual([]); + }); + + it('should find path children from an object with arrays less array notation', () => { + const data = { + A: { + B: { + C: {}, + }, + }, + D: [{ E: {} }, { F: {} }], + }; + const paths = service.paths(data, { arrayNotation: false }); + + expect(service.children('', paths)).toEqual(['A', 'D']); + expect(service.children('A', paths)).toEqual(['A.B']); + expect(service.children('A.B', paths)).toEqual(['A.B.C']); + expect(service.children('D', paths)).toEqual(['D.0', 'D.1']); + expect(service.children('D.0', paths)).toEqual(['D.0.E']); + expect(service.children('Z', paths)).toEqual([]); + }); + }); + + describe('Paths', () => { + it('should give simple object paths', () => { + const data = { title: 'hello' }; + const paths = service.paths(data); + const expected = ['title']; + + expect(paths).toEqual(expected); + }); + + it('should give nested object paths', () => { + const data = { + A: { + B: { + C: {}, + }, + }, + D: { + E: {}, + F: {}, + }, + }; + const paths = service.paths(data); + const expected = ['A', 'A.B', 'A.B.C', 'D', 'D.E', 'D.F']; + + expect(paths).toEqual(expected); + }); + }); + + describe('Entries', () => { + it('should give nested object paths', () => { + const data = { + A: { + B: { + C: {}, + }, + }, + D: [{ E: {} }, { F: {} }], + }; + const entries = service.entries(data); + + expect(entries).toContain({ + key: 'A', + value: { + B: { + C: {}, + }, + }, + }); + expect(entries).toContain({ + key: 'A.B', + value: { + C: {}, + }, + }); + expect(entries).toContain({ + key: 'A.B.C', + value: {}, + }); + expect(entries).toContain({ + key: 'D[0]', + value: { E: {} }, + }); + expect(entries).toContain({ + key: 'D[1]', + value: { F: {} }, + }); + expect(entries).toContain({ + key: 'D[0].E', + value: {}, + }); + expect(entries).toContain({ + key: 'D[1].F', + value: {}, + }); + }); + }); + + describe('Value', () => { + it('should retrieve simple value', () => { + expect(service.value({ name: 'john' }, 'name')).toEqual('john'); + }); + + it('should retrieve nested value', () => { + expect(service.value({ user: { name: 'john' } }, 'user.name')).toEqual('john'); + }); + + it('should retrieve array value', () => { + expect(service.value(['apple', 'cherry', 'strawberry'], '[1]')).toEqual('cherry'); + }); + + it('should retrieve nested array value', () => { + expect(service.value([[[0], [1], [2]]], '[0][1][0]')).toEqual(1); + }); + + it('should retrieve complex value', () => { + const clouds = [ + { + name: 'cloud', + devices: [ + { + type: 'computer', + cpu: { + name: 'intel xeon', + cores: 12, + }, + }, + { + type: 'computer', + cpu: { + name: 'intel itanium', + cores: 8, + }, + }, + { + type: 'computer', + cpu: { + name: 'intel 2 quad', + cores: 4, + }, + }, + ], + }, + ]; + + expect(service.value(clouds, '[0].devices[1].cpu.cores')).toEqual(8); + expect(service.value(clouds, '[0].devices')).toEqual([ + { + type: 'computer', + cpu: { + name: 'intel xeon', + cores: 12, + }, + }, + { + type: 'computer', + cpu: { + name: 'intel itanium', + cores: 8, + }, + }, + { + type: 'computer', + cpu: { + name: 'intel 2 quad', + cores: 4, + }, + }, + ]); + }); + }); +}); diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/services/path.service.ts b/ui/ui-frontend-common/src/app/modules/object-editor/services/path.service.ts new file mode 100644 index 00000000000..1601289a5f9 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/services/path.service.ts @@ -0,0 +1,56 @@ +import { Injectable } from '@angular/core'; +import { DataStructureService } from '../../object-viewer/services/data-structure.service'; + +@Injectable({ providedIn: 'root' }) +export class PathService { + constructor(private dataStructureService: DataStructureService) {} + + public dot(path: string): string { + return path.replace(/\[/g, '.').replace(/\]/g, ''); + } + + public children(path: string, paths: string[], separator = '.'): string[] { + if (path === null || path === undefined) return []; + if (path === '') return paths.filter((item) => item.split(separator).length === 1); + + return paths + .filter((item) => item.startsWith(path + separator) || item.startsWith(path + '[')) + .filter((item) => this.dot(item).split(separator).length === this.dot(path).split(separator).length + 1); + } + + public paths(data: any, options = { arrayNotation: true }): string[] { + return Array.from( + Object.keys(this.dataStructureService.flatten(data, options.arrayNotation)).reduce((acc, cur) => { + const fragments = cur.split('.'); + + while (fragments.length) { + acc.add(fragments.join('.')); + fragments.pop(); + } + + return acc; + }, new Set()), + ).sort(); + } + + public entries(data: any, options = { arrayNotation: true }): { key: string; value: any }[] { + return Array.from( + Object.entries(this.dataStructureService.flatten(data, options.arrayNotation)).reduce((acc, cur) => { + const fragments = cur[0].split('.'); + + while (fragments.length) { + const path = fragments.join('.'); + const value = this.dataStructureService.deepValue(data, path); + acc.add({ key: path, value }); + fragments.pop(); + } + + return acc; + }, new Set<{ key: string; value: any }>()), + ).sort(); + } + + public value(data: any, path: string): any { + return this.dataStructureService.deepValue(data, path); + } +} diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/services/schema.service.spec.ts b/ui/ui-frontend-common/src/app/modules/object-editor/services/schema.service.spec.ts new file mode 100644 index 00000000000..1415af37a82 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/services/schema.service.spec.ts @@ -0,0 +1,234 @@ +import { TestBed, inject, waitForAsync } from '@angular/core/testing'; +import { Collection, Schema } from '../../models'; +import { MockSchemaService } from '../../object-viewer/services/mock-schema.service'; +import { PathService } from './path.service'; +import { SchemaOptions, SchemaService } from './schema.service'; + +describe('SchemaService', () => { + let service: SchemaService; + + beforeEach(() => { + TestBed.configureTestingModule({ providers: [MockSchemaService] }); + service = TestBed.inject(SchemaService); + }); + + it('should create', () => { + expect(service).toBeTruthy(); + }); + + describe('Subschema', () => { + it('should get archive unit schema subschema', waitForAsync( + inject([MockSchemaService], (schemaService: MockSchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const subschema = service.subschema(schema, { collection: Collection.ARCHIVE_UNIT, versions: ['2.1'], pathKey: 'ApiPath' }); + + expect(subschema.every((element) => element.SedaVersions.includes('2.1'))).toBeTruthy(); + expect(subschema.every((element) => element.Collection === Collection.ARCHIVE_UNIT)).toBeTruthy(); + }); + }), + )); + }); + + describe('Data', () => { + it('should create simple data according schema', waitForAsync( + inject([MockSchemaService], (schemaService: MockSchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = ''; + const data = service.data(path, schema, { collection: Collection.ARCHIVE_UNIT, versions: ['2.1'], pathKey: 'ApiPath' }); + + expect(data).toEqual( + jasmine.objectContaining({ + Title: null, + }), + ); + }); + }), + )); + + it('should create data with all root level keys according schema', waitForAsync( + inject([MockSchemaService, PathService], (schemaService: MockSchemaService, pathService: PathService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = ''; + const options: SchemaOptions = { collection: Collection.ARCHIVE_UNIT, versions: ['2.1'], pathKey: 'ApiPath' }; + const subschema = service.subschema(schema, options); + const data = service.data(path, subschema, options); + const keys = Object.keys(data); + const children = pathService.children( + path, + subschema.map((element) => element[options.pathKey]), + ); + + expect(children.length).toEqual(keys.length); + expect(children).toEqual(keys); + }); + }), + )); + + it('should create archive unit addressee block according schema', waitForAsync( + inject([MockSchemaService, PathService], (schemaService: MockSchemaService, pathService: PathService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = 'Addressee'; + const options: SchemaOptions = { collection: Collection.ARCHIVE_UNIT, versions: ['2.1'], pathKey: 'ApiPath' }; + const subschema = service.subschema(schema, options); + const data = service.data(path, subschema, options); + const keys = Object.keys(data); + const children = pathService.children( + path, + subschema.map((element) => element[options.pathKey]), + ); + + expect(children.length).toEqual(keys.length); + expect(children.map((child) => child.split('.').pop())).toEqual(pathService.paths(data)); + expect(data).toEqual( + jasmine.objectContaining({ + BirthDate: null, + }), + ); + }); + }), + )); + + it('should create archive unit addressee birth place block according schema', waitForAsync( + inject([MockSchemaService, PathService], (schemaService: MockSchemaService, pathService: PathService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = 'Addressee.BirthPlace'; + const options: SchemaOptions = { collection: Collection.ARCHIVE_UNIT, versions: ['2.1'], pathKey: 'ApiPath' }; + const subschema = service.subschema(schema, options); + const data = service.data(path, subschema, options); + const keys = Object.keys(data); + const children = pathService.children( + path, + subschema.map((element) => element[options.pathKey]), + ); + + expect(children.length).toEqual(keys.length); + expect(children.map((child) => child.split('.').pop())).toEqual(pathService.paths(data)); + expect(data).toEqual( + jasmine.objectContaining({ + Address: null, + City: null, + Country: null, + Geogname: null, + }), + ); + }); + }), + )); + + it('should work when a primitive node is provided', waitForAsync( + inject([MockSchemaService, PathService], (schemaService: MockSchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = 'AcquiredDate'; + const options: SchemaOptions = { collection: Collection.ARCHIVE_UNIT, versions: ['2.1'], pathKey: 'ApiPath' }; + const subschema = service.subschema(schema, options); + const data = service.data(path, subschema, options); + + expect(data).toBeFalsy(); + expect(data).toBeNull(); + }); + }), + )); + + it('should work when a primitive array node is provided', waitForAsync( + inject([MockSchemaService], (schemaService: MockSchemaService) => { + schemaService.getSchema(Collection.ARCHIVE_UNIT).subscribe((schema) => { + const path = 'Tag'; + const options: SchemaOptions = { collection: Collection.ARCHIVE_UNIT, versions: ['2.1'], pathKey: 'ApiPath' }; + const subschema = service.subschema(schema, options); + const data = service.data(path, subschema, options); + + expect(data).toBeTruthy(); + expect(data).toEqual([]); + }); + }), + )); + }); + + describe('Validate', () => { + it('should detect duplicates in schema', () => { + const schema: Schema = [ + { + Path: 'Title', + FieldName: 'Title', + ApiField: 'Title', + Type: 'TEXT', + Origin: 'INTERNAL', + Indexed: true, + Cardinality: 'ONE', + SedaVersions: ['2.1'], + Collection: Collection.ARCHIVE_UNIT, + ApiPath: 'Title', + Category: 'DESCRIPTION', + }, + { + Path: 'Title', + FieldName: 'Title', + ApiField: 'Title', + Type: 'TEXT', + Origin: 'INTERNAL', + Indexed: true, + Cardinality: 'ONE', + SedaVersions: ['2.1'], + Collection: Collection.ARCHIVE_UNIT, + ApiPath: 'Title', + Category: 'DESCRIPTION', + }, + ]; + + expect(() => service.validate(schema)).toThrowError(/seems have duplicates elements/gm); + }); + + it('should detect leaf with children in schema', () => { + const schema: Schema = [ + { + Path: 'Title', + FieldName: 'Title', + ApiField: 'Title', + Type: 'TEXT', + Origin: 'INTERNAL', + Indexed: true, + Cardinality: 'ONE', + SedaVersions: ['2.1'], + Collection: Collection.ARCHIVE_UNIT, + ApiPath: 'Title', + Category: 'DESCRIPTION', + }, + { + Path: 'Title.keyword', + FieldName: 'Title.keyword', + ApiField: 'Title.keyword', + Type: 'TEXT', + Origin: 'INTERNAL', + Indexed: true, + Cardinality: 'ONE', + SedaVersions: ['2.1'], + Collection: Collection.ARCHIVE_UNIT, + ApiPath: 'Title', + Category: 'DESCRIPTION', + }, + ]; + + expect(() => service.validate(schema)).toThrowError(/a leaf and seems have children/gm); + }); + + it('should detect groups without children in schema', () => { + const schema: Schema = [ + { + Path: 'Signature.Masterdata', + FieldName: 'Masterdata', + ApiField: 'Masterdata', + Type: 'OBJECT', + Origin: 'INTERNAL', + Indexed: true, + Cardinality: 'ONE', + SedaVersions: ['2.1'], + Collection: Collection.ARCHIVE_UNIT, + ApiPath: 'Signature.Masterdata', + Category: 'DESCRIPTION', + }, + ]; + + expect(() => service.validate(schema)).toThrowError(/a group and seems not have children/gm); + }); + }); +}); diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/services/schema.service.ts b/ui/ui-frontend-common/src/app/modules/object-editor/services/schema.service.ts new file mode 100644 index 00000000000..9fb40b36024 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/services/schema.service.ts @@ -0,0 +1,128 @@ +import { Injectable } from '@angular/core'; +import { Collection, Schema } from '../../models'; +import { SchemaElement } from '../../object-viewer/models'; +import { SedaVersion } from '../../object-viewer/types'; +import { PathService } from './path.service'; + +export interface SchemaOptions { + collection?: Collection; + versions?: SedaVersion[]; + pathKey: string; +} + +@Injectable({ providedIn: 'root' }) +export class SchemaService { + constructor(private pathService: PathService) {} + + public subschema(schema: Schema, options: SchemaOptions = { collection: null, versions: null, pathKey: 'ApiPath' }): Schema { + let subschema = schema.slice(); + + if (options.collection) subschema = subschema.filter((schemaElement) => schemaElement.Collection === options.collection); + if (options.versions) + subschema = subschema.filter((schemaElement) => schemaElement.SedaVersions.some((version) => options.versions.includes(version))); + + return subschema; + } + + public data(path: string, schema: Schema, options: SchemaOptions = { collection: null, versions: null, pathKey: 'ApiPath' }): any { + const subschema = this.subschema(schema, options); + const paths = subschema.map((element) => element[options.pathKey]); + const children = this.pathService.children(path, paths); + + if (children.length) { + const entries = children.map((child) => { + const element = subschema.find((element) => element[options.pathKey] === child); + const key = child.split('.').pop(); + + if (this.isArray(element)) return { key, value: [] }; + if (this.isObject(element)) return { key, value: {} }; + + return { key, value: null }; + }); + + return entries.reduce((acc, cur) => ({ ...acc, [cur.key]: cur.value }), {}); + } + + const element = subschema.find((element) => element[options.pathKey] === this.normalize(path)); + + if (element) { + const isPrimitiveArray = !this.isObject(element) && this.isArray(element); + + if (isPrimitiveArray) return []; + } + + return null; + } + + /** + * Removes array indexes from path to match schema formalism. + * + * @param path a path. + * @returns a without array indexes. + */ + public normalize(path: string): string { + return path ? path.replace(/\[\d+\]/g, '') : path; + } + + public kind( + path: string, + schema: Schema, + options: SchemaOptions = { pathKey: 'ApiPath' }, + ): 'object' | 'object-array' | 'primitive-array' | 'primitive' | 'unknown' { + const element = schema.find((element) => element[options.pathKey] === path); + + if (element) { + const isArray = this.isArray(element); + const isObject = this.isObject(element); + + if (isArray && isObject) return 'object-array'; + if (isArray) return 'primitive-array'; + if (isObject) return 'object'; + return 'primitive'; + } + + return 'unknown'; + } + + public validate(schema: Schema, messages = []) { + const paths = schema.map((element) => element.Path); + + if (paths.length > new Set(paths).size) { + messages.push(`Schema seems have duplicates elements`); + } + + schema.forEach((element) => this.collectErrors(element, schema, paths, messages)); + + if (messages.length) { + throw new Error(JSON.stringify(messages, null, 2)); + } + } + + private collectErrors(element: SchemaElement, schema: Schema, paths: string[], messages: string[]): void { + const childrenPaths = this.pathService.children(element.Path, paths); + + if (childrenPaths.length > new Set(childrenPaths).size) { + messages.push(`Element '${element.Path}' seems have duplicates elements in its children '${childrenPaths}'`); + } + + const children = schema.filter((e) => childrenPaths.includes(e.Path)); + + if (element.Type !== 'OBJECT' && children.length) { + messages.push(`Element '${element.Path}' is a leaf and seems have children '${childrenPaths}'`); + } + + if (element.Type === 'OBJECT' && children.length === 0) { + messages.push(`Element '${element.Path}' is a group and seems not have children`); + } + + children.forEach((child) => this.collectErrors(child, schema, paths, messages)); + } + + private isArray(element: SchemaElement): boolean { + return element.Cardinality.includes('MANY'); + } + + private isObject(element: SchemaElement): boolean { + return element.DataType === 'OBJECT'; + } +} diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/services/template.service.spec.ts b/ui/ui-frontend-common/src/app/modules/object-editor/services/template.service.spec.ts new file mode 100644 index 00000000000..b75e212aef2 --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/services/template.service.spec.ts @@ -0,0 +1,205 @@ +import { TestBed } from '@angular/core/testing'; +import { DisplayRule } from '../../object-viewer/models'; +import { SchemaElementToDisplayRuleService } from '../../object-viewer/services/schema-element-to-display-rule.service'; +import { TemplateService } from './template.service'; + +describe('TemplateService', () => { + let service: TemplateService; + + beforeEach(() => { + TestBed.configureTestingModule({ providers: [SchemaElementToDisplayRuleService] }); + service = TestBed.inject(TemplateService); + }); + + it('should create', () => { + expect(service).toBeTruthy(); + }); + + describe('ToUi', () => { + it('should get back the data when null template', () => { + const input = { name: 'john' }; + const output = service.toProjected(input, null); + const expected = { name: 'john' }; + + expect(output).toBeTruthy(); + expect(output).toEqual(expected); + }); + + it('should get empty data when empty template', () => { + const input = { name: 'john' }; + const output = service.toProjected(input, []); + const expected = {}; + + expect(output).toBeTruthy(); + expect(output).toEqual(expected); + }); + + it('should convert to ui data with simple projection', () => { + const input = { username: 'azerty1234' }; + const template: DisplayRule[] = [{ Path: 'username', ui: { Path: 'password', component: 'textfield' } }]; + const output = service.toProjected(input, template); + const expected = { password: 'azerty1234' }; + + expect(output).toBeTruthy(); + expect(output).toEqual(expected); + }); + + it('should projection ignore template less fields', () => { + const input = { username: 'azerty1234', templateLessField: 'templateLess' }; + const template: DisplayRule[] = [{ Path: 'username', ui: { Path: 'password', component: 'textfield' } }]; + const output = service.toProjected(input, template); + const expected = { password: 'azerty1234' }; + + expect(output).toBeTruthy(); + expect(output).toEqual(expected); + }); + + it('should convert to ui data with virtual projection', () => { + const input = { username: 'azerty1234', password: 'john' }; + const template: DisplayRule[] = [ + { Path: null, ui: { Path: 'credentials', component: 'group' } }, + { Path: 'username', ui: { Path: 'credentials.password', component: 'textfield' } }, + { Path: 'password', ui: { Path: 'credentials.login', component: 'textfield' } }, + ]; + const output = service.toProjected(input, template); + const expected = { + credentials: { + login: 'john', + password: 'azerty1234', + }, + }; + + expect(output).toBeTruthy(); + expect(output).toEqual(expected); + }); + + it('should convert a nested node to ui data with virtual projection', () => { + const input = { + fruits: [ + { origin: 'france', name: 'abricot' }, + { origin: 'angleterre', name: 'noisette' }, + { origin: 'maroc', name: 'melon' }, + { origin: 'espagne', name: 'tomate' }, + ], + societe: 'lidl', + }; + const template: DisplayRule[] = [ + { Path: 'fruits', ui: { Path: 'panier', component: 'group' } }, + { Path: 'societe', ui: { Path: 'societe', component: 'group' } }, + ]; + const output = service.toProjected(input, template); + const expected = { + panier: [ + { origin: 'france', name: 'abricot' }, + { origin: 'angleterre', name: 'noisette' }, + { origin: 'maroc', name: 'melon' }, + { origin: 'espagne', name: 'tomate' }, + ], + societe: 'lidl', + }; + + expect(output).toBeTruthy(); + expect(output).toEqual(expected); + }); + }); + + describe('ToOriginal', () => { + it('should get back the data when null template', () => { + const output = service.toOriginal({ name: 'john' }, null); + + expect(output).toBeTruthy(); + expect(output).toEqual({ name: 'john' }); + }); + + it('should get empty data when empty template', () => { + const output = service.toOriginal({ name: 'john' }, []); + + expect(output).toBeTruthy(); + expect(output).toEqual({}); + }); + + it('should convert to original data with simple projection', () => { + const input = { password: 'azerty1234' }; + const template: DisplayRule[] = [{ Path: 'username', ui: { Path: 'password', component: 'textfield' } }]; + const output = service.toOriginal(input, template); + + expect(output).toBeTruthy(); + expect(output).toEqual({ username: 'azerty1234' }); + }); + + it('should projection ignore template less fields', () => { + const input = { password: 'azerty1234', templateLessField: 'templateLess' }; + const template: DisplayRule[] = [{ Path: 'username', ui: { Path: 'password', component: 'textfield' } }]; + const output = service.toOriginal(input, template); + + expect(output).toBeTruthy(); + expect(output).toEqual({ username: 'azerty1234' }); + }); + + it('should convert to original data with virtual projection', () => { + const input = { + credentials: { + login: 'john', + password: 'azerty1234', + }, + }; + const template: DisplayRule[] = [ + { Path: null, ui: { Path: 'credentials', component: 'group' } }, + { Path: 'username', ui: { Path: 'credentials.password', component: 'textfield' } }, + { Path: 'password', ui: { Path: 'credentials.login', component: 'textfield' } }, + ]; + const expected = { username: 'azerty1234', password: 'john' }; + const output = service.toOriginal(input, template); + + expect(output).toBeTruthy(); + expect(output).toEqual(expected); + }); + + it('should convert a nested node to ui data with virtual projection', () => { + const input = { + panier: [ + { origin: 'france', name: 'abricot' }, + { origin: 'angleterre', name: 'noisette' }, + { origin: 'maroc', name: 'melon' }, + { origin: 'espagne', name: 'tomate' }, + ], + societe: 'lidl', + }; + const template: DisplayRule[] = [ + { Path: 'fruits', ui: { Path: 'panier', component: 'group' } }, + { Path: 'societe', ui: { Path: 'societe', component: 'group' } }, + ]; + const output = service.toOriginal(input, template); + const expected = { + fruits: [ + { origin: 'france', name: 'abricot' }, + { origin: 'angleterre', name: 'noisette' }, + { origin: 'maroc', name: 'melon' }, + { origin: 'espagne', name: 'tomate' }, + ], + societe: 'lidl', + }; + + expect(output).toBeTruthy(); + expect(output).toEqual(expected); + }); + + it('should convert to undefined fields present in template but not in data', () => { + const input = { + Generalities: { + Title: 'some title', + }, + }; + const template: DisplayRule[] = [ + { Path: null, ui: { Path: 'Generalities', component: 'group' } }, + { Path: 'Title', ui: { Path: 'Generalities.Title', component: 'textfield' } }, + { Path: 'Title_', ui: { Path: 'Generalities.Title_', component: 'group' } }, + ]; + const output = service.toOriginal(input, template); + const expected = { Title: 'some title', Title_: undefined }; + + expect(output).toBeTruthy(); + expect(output).toEqual(expected); + }); + }); +}); diff --git a/ui/ui-frontend-common/src/app/modules/object-editor/services/template.service.ts b/ui/ui-frontend-common/src/app/modules/object-editor/services/template.service.ts new file mode 100644 index 00000000000..4bd5140514e --- /dev/null +++ b/ui/ui-frontend-common/src/app/modules/object-editor/services/template.service.ts @@ -0,0 +1,41 @@ +import { Injectable } from '@angular/core'; +import { DisplayRule } from '../../object-viewer/models'; +import { DataStructureService } from '../../object-viewer/services/data-structure.service'; +import { SchemaElementToDisplayRuleService } from '../../object-viewer/services/schema-element-to-display-rule.service'; +import { Schema } from '../../models'; + +@Injectable({ providedIn: 'root' }) +export class TemplateService { + constructor( + private dataStructureService: DataStructureService, + private schemaElementToDisplayRuleService: SchemaElementToDisplayRuleService, + ) {} + + public toProjected(originalData: any, template: DisplayRule[]): any { + if (!template) return originalData; + + return this.dataStructureService.unflatten( + template + .map((displayRule) => ({ + [displayRule.ui.Path]: displayRule.Path ? this.dataStructureService.deepValue(originalData, displayRule.Path) : undefined, + })) + .filter((item) => item[Object.keys(item)[0]] !== undefined) + .reduce((acc, cur) => this.dataStructureService.deepMerge(acc, cur), {}), + ); + } + + public toOriginal(projectedData: any, template: DisplayRule[]): any { + if (!template) return projectedData; + + return this.dataStructureService.unflatten( + template + .filter((displayRule) => displayRule.Path) + .map((displayRule) => ({ [displayRule.Path]: this.dataStructureService.deepValue(projectedData, displayRule.ui.Path) })) + .reduce((acc, cur) => this.dataStructureService.deepMerge(acc, cur), {}), + ); + } + + public template(schema: Schema): DisplayRule[] { + return this.schemaElementToDisplayRuleService.mapSchemaToDisplayRules(schema); + } +} diff --git a/ui/ui-frontend-common/src/app/modules/object-viewer/models/schema-element.model.ts b/ui/ui-frontend-common/src/app/modules/object-viewer/models/schema-element.model.ts index c0ef0543768..07a0e190485 100644 --- a/ui/ui-frontend-common/src/app/modules/object-viewer/models/schema-element.model.ts +++ b/ui/ui-frontend-common/src/app/modules/object-viewer/models/schema-element.model.ts @@ -34,6 +34,7 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ +import { Collection } from '../../models'; import { Cardinality, SedaVersion } from '../types'; import { WithPath } from './with-path.model'; @@ -54,7 +55,7 @@ export interface SchemaElement extends WithPath { readonly StringSize?: 'SHORT' | 'MEDIUM' | 'LARGE'; readonly Cardinality: Cardinality; readonly SedaVersions: SedaVersion[]; - readonly Collection: string; + readonly Collection: Collection; readonly ApiPath: string; readonly Category: 'DESCRIPTION' | 'MANAGEMENT' | 'OTHER'; } diff --git a/ui/ui-frontend-common/src/app/modules/object-viewer/object-viewer.module.ts b/ui/ui-frontend-common/src/app/modules/object-viewer/object-viewer.module.ts index 4500a48401b..4449386a1a3 100644 --- a/ui/ui-frontend-common/src/app/modules/object-viewer/object-viewer.module.ts +++ b/ui/ui-frontend-common/src/app/modules/object-viewer/object-viewer.module.ts @@ -47,28 +47,18 @@ import { ListComponent } from './components/list/list.component'; import { PrimitiveComponent } from './components/primitive/primitive.component'; import { DisplayObjectService } from './models'; import { ObjectViewerComponent } from './object-viewer.component'; -import { DataStructureService } from './services/data-structure.service'; -import { DateDisplayService } from './services/date-display.service'; import { DisplayObjectHelperService } from './services/display-object-helper.service'; import { DisplayRuleHelperService } from './services/display-rule-helper.service'; -import { FavoriteEntryService } from './services/favorite-entry.service'; -import { LayoutService } from './services/layout.service'; import { PathStrategyDisplayObjectService } from './services/path-strategy-display-object.service'; import { SchemaElementToDisplayRuleService } from './services/schema-element-to-display-rule.service'; -import { TypeService } from './services/type.service'; @NgModule({ imports: [CommonModule, TranslateModule, PipesModule, MatTooltipModule, MatProgressSpinnerModule, AccordionModule, DataModule], declarations: [ObjectViewerComponent, GroupComponent, ListComponent, PrimitiveComponent], providers: [ - DateDisplayService, - DataStructureService, - TypeService, DisplayObjectHelperService, DisplayRuleHelperService, SchemaElementToDisplayRuleService, - LayoutService, - FavoriteEntryService, { provide: DisplayObjectService, useClass: PathStrategyDisplayObjectService }, ], exports: [ObjectViewerComponent, GroupComponent, ListComponent, PrimitiveComponent], diff --git a/ui/ui-frontend-common/src/app/modules/object-viewer/services/data-structure.service.ts b/ui/ui-frontend-common/src/app/modules/object-viewer/services/data-structure.service.ts index 83fb2a6d9d3..802e13ea3f4 100644 --- a/ui/ui-frontend-common/src/app/modules/object-viewer/services/data-structure.service.ts +++ b/ui/ui-frontend-common/src/app/modules/object-viewer/services/data-structure.service.ts @@ -36,7 +36,9 @@ */ import { Injectable } from '@angular/core'; -@Injectable() +@Injectable({ + providedIn: 'root', +}) export class DataStructureService { /** * Transforms a nested object into a flat object. @@ -44,14 +46,14 @@ export class DataStructureService { * @param data Nested object. * @returns Flat object. */ - public flatten(data: any) { + public flatten(data: any, arrayNotation = true) { const result = {}; function recurse(cur: any, prop: any) { if (Object(cur) !== cur) { result[prop] = cur; } else if (Array.isArray(cur)) { for (let i = 0, l = cur.length; i < l; i++) { - recurse(cur[i], prop + '[' + i + ']'); + recurse(cur[i], `${prop}${arrayNotation ? '[' + i + ']' : '.' + i}`); } if (cur.length === 0) { result[prop] = []; diff --git a/ui/ui-frontend-common/src/app/modules/object-viewer/services/date-display.service.ts b/ui/ui-frontend-common/src/app/modules/object-viewer/services/date-display.service.ts index fe65a05c047..82dc5a854ba 100644 --- a/ui/ui-frontend-common/src/app/modules/object-viewer/services/date-display.service.ts +++ b/ui/ui-frontend-common/src/app/modules/object-viewer/services/date-display.service.ts @@ -37,7 +37,9 @@ import { Injectable } from '@angular/core'; import { ComponentType } from '../types'; -@Injectable() +@Injectable({ + providedIn: 'root', +}) export class DateDisplayService { private dateFormat = { wanted: { datepicker: 'dd/MM/yyyy', datetime: 'dd/MM/yyyy hh:mm:ss' }, diff --git a/ui/ui-frontend-common/src/app/modules/object-viewer/services/display-object-helper.service.ts b/ui/ui-frontend-common/src/app/modules/object-viewer/services/display-object-helper.service.ts index 12e47c8f8e8..30974471ddb 100644 --- a/ui/ui-frontend-common/src/app/modules/object-viewer/services/display-object-helper.service.ts +++ b/ui/ui-frontend-common/src/app/modules/object-viewer/services/display-object-helper.service.ts @@ -35,7 +35,6 @@ * knowledge of the CeCILL-C license and that you accept its terms. */ import { Injectable } from '@angular/core'; -import { Logger } from '../../logger/logger'; import { DisplayObject, DisplayRule } from '../models'; import { ComponentType, DisplayObjectType } from '../types'; import { DataStructureService } from './data-structure.service'; @@ -45,7 +44,6 @@ import { TypeService } from './type.service'; @Injectable() export class DisplayObjectHelperService { constructor( - private logger: Logger, private typeService: TypeService, private dataStructureService: DataStructureService, private displayRuleHelperService: DisplayRuleHelperService, diff --git a/ui/ui-frontend-common/src/app/modules/object-viewer/services/favorite-entry.service.ts b/ui/ui-frontend-common/src/app/modules/object-viewer/services/favorite-entry.service.ts index 96f03363bfa..8634fcfce5d 100644 --- a/ui/ui-frontend-common/src/app/modules/object-viewer/services/favorite-entry.service.ts +++ b/ui/ui-frontend-common/src/app/modules/object-viewer/services/favorite-entry.service.ts @@ -1,5 +1,9 @@ +import { Injectable } from '@angular/core'; import { DisplayObject } from '../models'; +@Injectable({ + providedIn: 'root', +}) export class FavoriteEntryService { public favoriteEntry(displayObject: DisplayObject): [key: string, value: unknown] | null { const favoriteEntry: [key: string, value: any] = displayObject.favoriteKeys.reduce( diff --git a/ui/ui-frontend-common/src/app/modules/object-viewer/services/layout.service.ts b/ui/ui-frontend-common/src/app/modules/object-viewer/services/layout.service.ts index 3752a86de92..5d9f5b0290c 100644 --- a/ui/ui-frontend-common/src/app/modules/object-viewer/services/layout.service.ts +++ b/ui/ui-frontend-common/src/app/modules/object-viewer/services/layout.service.ts @@ -3,7 +3,9 @@ import { Logger } from '../../logger/logger'; import { DisplayObject, Layout } from '../models'; import { LayoutSize } from '../types'; -@Injectable() +@Injectable({ + providedIn: 'root', +}) export class LayoutService { MAX_COMLUMS = 2; DEFAULT_COLUMNS = this.MAX_COMLUMS; diff --git a/ui/ui-frontend-common/src/app/modules/object-viewer/services/mock-schema.service.ts b/ui/ui-frontend-common/src/app/modules/object-viewer/services/mock-schema.service.ts index e2c8a12147b..0b5a54e0e7e 100644 --- a/ui/ui-frontend-common/src/app/modules/object-viewer/services/mock-schema.service.ts +++ b/ui/ui-frontend-common/src/app/modules/object-viewer/services/mock-schema.service.ts @@ -9,12 +9,13 @@ export class MockSchemaService { { FieldName: 'AcquiredDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AcquiredDate', ApiField: 'AcquiredDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -25,12 +26,13 @@ export class MockSchemaService { { FieldName: 'Addressee', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Addressee', ApiField: 'Addressee', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -40,12 +42,13 @@ export class MockSchemaService { { FieldName: 'Activity', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Addressee.Activity', ApiField: 'Activity', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -56,12 +59,13 @@ export class MockSchemaService { { FieldName: 'BirthDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.BirthDate', ApiField: 'BirthDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -72,12 +76,13 @@ export class MockSchemaService { { FieldName: 'BirthName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.BirthName', ApiField: 'BirthName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -88,12 +93,13 @@ export class MockSchemaService { { FieldName: 'BirthPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.BirthPlace', ApiField: 'BirthPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -103,12 +109,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.BirthPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -119,12 +126,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.BirthPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -135,12 +143,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.BirthPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -151,12 +160,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.BirthPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -167,12 +177,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.BirthPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -183,12 +194,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.BirthPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -199,12 +211,13 @@ export class MockSchemaService { { FieldName: 'Corpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.Corpname', ApiField: 'Corpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -215,12 +228,13 @@ export class MockSchemaService { { FieldName: 'DeathDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.DeathDate', ApiField: 'DeathDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -231,12 +245,13 @@ export class MockSchemaService { { FieldName: 'DeathPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.DeathPlace', ApiField: 'DeathPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -246,12 +261,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.DeathPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -262,12 +278,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.DeathPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -278,12 +295,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.DeathPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -294,12 +312,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.DeathPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -310,12 +329,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.DeathPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -326,12 +346,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.DeathPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -342,12 +363,13 @@ export class MockSchemaService { { FieldName: 'FirstName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.FirstName', ApiField: 'FirstName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -358,12 +380,13 @@ export class MockSchemaService { { FieldName: 'FullName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.FullName', ApiField: 'FullName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -374,12 +397,13 @@ export class MockSchemaService { { FieldName: 'Fullpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.Fullpname', ApiField: 'Fullpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -389,12 +413,13 @@ export class MockSchemaService { { FieldName: 'Function', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Addressee.Function', ApiField: 'Function', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -405,12 +430,13 @@ export class MockSchemaService { { FieldName: 'Gender', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.Gender', ApiField: 'Gender', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -421,12 +447,13 @@ export class MockSchemaService { { FieldName: 'GivenName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Addressee.GivenName', ApiField: 'GivenName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -437,12 +464,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Addressee.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -453,12 +481,13 @@ export class MockSchemaService { { FieldName: 'Mandate', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Addressee.Mandate', ApiField: 'Mandate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -469,12 +498,13 @@ export class MockSchemaService { { FieldName: 'Nationality', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Addressee.Nationality', ApiField: 'Nationality', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -485,12 +515,13 @@ export class MockSchemaService { { FieldName: 'Position', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Addressee.Position', ApiField: 'Position', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -501,12 +532,13 @@ export class MockSchemaService { { FieldName: 'Role', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Addressee.Role', ApiField: 'Role', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -517,12 +549,13 @@ export class MockSchemaService { { FieldName: 'Agent', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Agent', ApiField: 'Agent', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -532,12 +565,13 @@ export class MockSchemaService { { FieldName: 'Activity', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Agent.Activity', ApiField: 'Activity', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -548,12 +582,13 @@ export class MockSchemaService { { FieldName: 'BirthDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.BirthDate', ApiField: 'BirthDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -564,12 +599,13 @@ export class MockSchemaService { { FieldName: 'BirthName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.BirthName', ApiField: 'BirthName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -580,12 +616,13 @@ export class MockSchemaService { { FieldName: 'BirthPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.BirthPlace', ApiField: 'BirthPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -595,12 +632,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.BirthPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -611,12 +649,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.BirthPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -627,12 +666,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.BirthPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -643,12 +683,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.BirthPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -659,12 +700,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.BirthPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -675,12 +717,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.BirthPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -691,12 +734,13 @@ export class MockSchemaService { { FieldName: 'Corpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.Corpname', ApiField: 'Corpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -707,12 +751,13 @@ export class MockSchemaService { { FieldName: 'DeathDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.DeathDate', ApiField: 'DeathDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -723,12 +768,13 @@ export class MockSchemaService { { FieldName: 'DeathPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.DeathPlace', ApiField: 'DeathPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -738,12 +784,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.DeathPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -754,12 +801,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.DeathPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -770,12 +818,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.DeathPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -786,12 +835,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.DeathPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -802,12 +852,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.DeathPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -818,12 +869,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.DeathPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -834,12 +886,13 @@ export class MockSchemaService { { FieldName: 'FirstName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.FirstName', ApiField: 'FirstName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -850,12 +903,13 @@ export class MockSchemaService { { FieldName: 'FullName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.FullName', ApiField: 'FullName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -866,12 +920,13 @@ export class MockSchemaService { { FieldName: 'Function', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Agent.Function', ApiField: 'Function', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -882,12 +937,13 @@ export class MockSchemaService { { FieldName: 'Gender', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.Gender', ApiField: 'Gender', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -898,12 +954,13 @@ export class MockSchemaService { { FieldName: 'GivenName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Agent.GivenName', ApiField: 'GivenName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -914,12 +971,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Agent.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -930,12 +988,13 @@ export class MockSchemaService { { FieldName: 'Mandate', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Agent.Mandate', ApiField: 'Mandate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -946,12 +1005,13 @@ export class MockSchemaService { { FieldName: 'Nationality', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Agent.Nationality', ApiField: 'Nationality', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -962,12 +1022,13 @@ export class MockSchemaService { { FieldName: 'Position', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Agent.Position', ApiField: 'Position', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -978,12 +1039,13 @@ export class MockSchemaService { { FieldName: 'Role', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Agent.Role', ApiField: 'Role', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -994,12 +1056,13 @@ export class MockSchemaService { { FieldName: 'ArchivalAgencyArchiveUnitIdentifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'ArchivalAgencyArchiveUnitIdentifier', ApiField: 'ArchivalAgencyArchiveUnitIdentifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -1010,12 +1073,13 @@ export class MockSchemaService { { FieldName: 'ArchiveUnitProfile', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'ArchiveUnitProfile', ApiField: 'ArchiveUnitProfile', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -1026,12 +1090,13 @@ export class MockSchemaService { { FieldName: 'AuthorizedAgent', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'AuthorizedAgent', ApiField: 'AuthorizedAgent', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1041,12 +1106,13 @@ export class MockSchemaService { { FieldName: 'Activity', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'AuthorizedAgent.Activity', ApiField: 'Activity', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1057,12 +1123,13 @@ export class MockSchemaService { { FieldName: 'BirthDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.BirthDate', ApiField: 'BirthDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1073,12 +1140,13 @@ export class MockSchemaService { { FieldName: 'BirthName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.BirthName', ApiField: 'BirthName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1089,12 +1157,13 @@ export class MockSchemaService { { FieldName: 'BirthPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.BirthPlace', ApiField: 'BirthPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1104,12 +1173,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.BirthPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1120,12 +1190,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.BirthPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1136,12 +1207,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.BirthPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1152,12 +1224,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.BirthPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1168,12 +1241,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.BirthPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1184,12 +1258,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.BirthPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1200,12 +1275,13 @@ export class MockSchemaService { { FieldName: 'Corpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.Corpname', ApiField: 'Corpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1216,12 +1292,13 @@ export class MockSchemaService { { FieldName: 'DeathDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.DeathDate', ApiField: 'DeathDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1232,12 +1309,13 @@ export class MockSchemaService { { FieldName: 'DeathPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.DeathPlace', ApiField: 'DeathPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1247,12 +1325,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.DeathPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1263,12 +1342,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.DeathPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1279,12 +1359,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.DeathPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1295,12 +1376,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.DeathPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1311,12 +1393,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.DeathPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1327,12 +1410,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.DeathPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1343,12 +1427,13 @@ export class MockSchemaService { { FieldName: 'FirstName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.FirstName', ApiField: 'FirstName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1359,12 +1444,13 @@ export class MockSchemaService { { FieldName: 'FullName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.FullName', ApiField: 'FullName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1375,12 +1461,13 @@ export class MockSchemaService { { FieldName: 'Function', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'AuthorizedAgent.Function', ApiField: 'Function', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1391,12 +1478,13 @@ export class MockSchemaService { { FieldName: 'Gender', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.Gender', ApiField: 'Gender', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1407,12 +1495,13 @@ export class MockSchemaService { { FieldName: 'GivenName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'AuthorizedAgent.GivenName', ApiField: 'GivenName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1423,12 +1512,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'AuthorizedAgent.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1439,12 +1529,13 @@ export class MockSchemaService { { FieldName: 'Mandate', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'AuthorizedAgent.Mandate', ApiField: 'Mandate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1455,12 +1546,13 @@ export class MockSchemaService { { FieldName: 'Nationality', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'AuthorizedAgent.Nationality', ApiField: 'Nationality', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1471,12 +1563,13 @@ export class MockSchemaService { { FieldName: 'Position', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'AuthorizedAgent.Position', ApiField: 'Position', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1487,12 +1580,13 @@ export class MockSchemaService { { FieldName: 'Role', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'AuthorizedAgent.Role', ApiField: 'Role', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1503,12 +1597,13 @@ export class MockSchemaService { { FieldName: 'Coverage', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Coverage', ApiField: 'Coverage', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1518,12 +1613,13 @@ export class MockSchemaService { { FieldName: 'Juridictional', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Coverage.Juridictional', ApiField: 'Juridictional', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1534,12 +1630,13 @@ export class MockSchemaService { { FieldName: 'Spatial', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Coverage.Spatial', ApiField: 'Spatial', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1550,12 +1647,13 @@ export class MockSchemaService { { FieldName: 'Temporal', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Coverage.Temporal', ApiField: 'Temporal', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1566,12 +1664,13 @@ export class MockSchemaService { { FieldName: 'CreatedDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'CreatedDate', ApiField: 'CreatedDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -1582,12 +1681,13 @@ export class MockSchemaService { { FieldName: 'CustodialHistory', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'CustodialHistory', ApiField: 'CustodialHistory', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -1597,12 +1697,13 @@ export class MockSchemaService { { FieldName: 'CustodialHistoryFile', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'CustodialHistory.CustodialHistoryFile', ApiField: 'CustodialHistoryFile', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1612,12 +1713,13 @@ export class MockSchemaService { { FieldName: 'DataObjectGroupReferenceId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE_REQUIRED', Indexed: true, Path: 'CustodialHistory.CustodialHistoryFile.DataObjectGroupReferenceId', ApiField: 'DataObjectGroupReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1628,12 +1730,13 @@ export class MockSchemaService { { FieldName: 'DataObjectReferenceId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE_REQUIRED', Indexed: true, Path: 'CustodialHistory.CustodialHistoryFile.DataObjectReferenceId', ApiField: 'DataObjectReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1644,12 +1747,13 @@ export class MockSchemaService { { FieldName: 'CustodialHistoryItem', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY_REQUIRED', Indexed: true, Path: 'CustodialHistory.CustodialHistoryItem', ApiField: 'CustodialHistoryItem', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1660,12 +1764,13 @@ export class MockSchemaService { { FieldName: 'DateLitteral', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'DateLitteral', ApiField: 'DateLitteral', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -1676,12 +1781,13 @@ export class MockSchemaService { { FieldName: 'Description', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Description', ApiField: 'Description', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -1689,30 +1795,16 @@ export class MockSchemaService { SedaField: 'Description', ShortName: 'Description', }, - { - FieldName: 'Description ', - Type: 'TEXT', - Origin: 'INTERNAL', - Cardinality: 'ONE', - Indexed: true, - Path: 'Description ', - ApiField: 'Description ', - Collection: 'Unit', - SedaVersions: ['2.1'], - StringSize: 'SHORT', - Category: 'DESCRIPTION', - ApiPath: 'Description ', - ShortName: 'Description', - }, { FieldName: 'DescriptionLanguage', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'DescriptionLanguage', ApiField: 'DescriptionLanguage', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -1723,12 +1815,13 @@ export class MockSchemaService { { FieldName: 'DescriptionLevel', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE_REQUIRED', Indexed: true, Path: 'DescriptionLevel', ApiField: 'DescriptionLevel', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1739,12 +1832,13 @@ export class MockSchemaService { { FieldName: 'Description_', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Description_', ApiField: 'Description_', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -1754,12 +1848,13 @@ export class MockSchemaService { { FieldName: '*', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Description_.*', ApiField: '*', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1769,12 +1864,13 @@ export class MockSchemaService { { FieldName: 'DocumentType', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'DocumentType', ApiField: 'DocumentType', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -1785,12 +1881,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -1801,12 +1898,13 @@ export class MockSchemaService { { FieldName: 'Event', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Event', ApiField: 'Event', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1816,12 +1914,13 @@ export class MockSchemaService { { FieldName: 'evDateTime', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Event.evDateTime', ApiField: 'evDateTime', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1832,12 +1931,13 @@ export class MockSchemaService { { FieldName: 'evDetData', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Event.evDetData', ApiField: 'evDetData', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -1848,12 +1948,13 @@ export class MockSchemaService { { FieldName: 'evId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Event.evId', ApiField: 'evId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1864,12 +1965,13 @@ export class MockSchemaService { { FieldName: 'evType', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Event.evType', ApiField: 'evType', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1880,12 +1982,13 @@ export class MockSchemaService { { FieldName: 'evTypeDetail', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Event.evTypeDetail', ApiField: 'evTypeDetail', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1896,12 +1999,13 @@ export class MockSchemaService { { FieldName: 'evTypeProc', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Event.evTypeProc', ApiField: 'evTypeProc', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1912,12 +2016,13 @@ export class MockSchemaService { { FieldName: 'outDetail', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Event.outDetail', ApiField: 'outDetail', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1928,12 +2033,13 @@ export class MockSchemaService { { FieldName: 'outMessg', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Event.outMessg', ApiField: 'outMessg', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1944,12 +2050,13 @@ export class MockSchemaService { { FieldName: 'outcome', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Event.outcome', ApiField: 'outcome', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1960,12 +2067,13 @@ export class MockSchemaService { { FieldName: 'FilePlanPosition', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'FilePlanPosition', ApiField: 'FilePlanPosition', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -1976,12 +2084,13 @@ export class MockSchemaService { { FieldName: 'Gps', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Gps', ApiField: 'Gps', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -1991,12 +2100,13 @@ export class MockSchemaService { { FieldName: 'GpsAltitude', Type: 'LONG', + DataType: 'LONG', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Gps.GpsAltitude', ApiField: 'GpsAltitude', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2007,12 +2117,13 @@ export class MockSchemaService { { FieldName: 'GpsAltitudeRef', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Gps.GpsAltitudeRef', ApiField: 'GpsAltitudeRef', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2023,12 +2134,13 @@ export class MockSchemaService { { FieldName: 'GpsDateStamp', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Gps.GpsDateStamp', ApiField: 'GpsDateStamp', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2039,12 +2151,13 @@ export class MockSchemaService { { FieldName: 'GpsLatitude', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Gps.GpsLatitude', ApiField: 'GpsLatitude', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2055,12 +2168,13 @@ export class MockSchemaService { { FieldName: 'GpsLatitudeRef', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Gps.GpsLatitudeRef', ApiField: 'GpsLatitudeRef', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2071,12 +2185,13 @@ export class MockSchemaService { { FieldName: 'GpsLongitude', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Gps.GpsLongitude', ApiField: 'GpsLongitude', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2087,12 +2202,13 @@ export class MockSchemaService { { FieldName: 'GpsLongitudeRef', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Gps.GpsLongitudeRef', ApiField: 'GpsLongitudeRef', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2103,12 +2219,13 @@ export class MockSchemaService { { FieldName: 'GpsVersionID', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Gps.GpsVersionID', ApiField: 'GpsVersionID', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2119,12 +2236,13 @@ export class MockSchemaService { { FieldName: 'Keyword', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Keyword', ApiField: 'Keyword', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2134,12 +2252,13 @@ export class MockSchemaService { { FieldName: 'KeywordContent', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Keyword.KeywordContent', ApiField: 'KeywordContent', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2150,12 +2269,13 @@ export class MockSchemaService { { FieldName: 'KeywordReference', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Keyword.KeywordReference', ApiField: 'KeywordReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2166,12 +2286,13 @@ export class MockSchemaService { { FieldName: 'KeywordType', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Keyword.KeywordType', ApiField: 'KeywordType', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2182,12 +2303,13 @@ export class MockSchemaService { { FieldName: 'Language', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Language', ApiField: 'Language', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2198,12 +2320,13 @@ export class MockSchemaService { { FieldName: 'LinkingAgentIdentifier', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'LinkingAgentIdentifier', ApiField: 'LinkingAgentIdentifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2213,12 +2336,13 @@ export class MockSchemaService { { FieldName: 'LinkingAgentIdentifierType', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'LinkingAgentIdentifier.LinkingAgentIdentifierType', ApiField: 'LinkingAgentIdentifierType', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2229,12 +2353,13 @@ export class MockSchemaService { { FieldName: 'LinkingAgentIdentifierValue', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'LinkingAgentIdentifier.LinkingAgentIdentifierValue', ApiField: 'LinkingAgentIdentifierValue', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2245,12 +2370,13 @@ export class MockSchemaService { { FieldName: 'LinkingAgentRole', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'LinkingAgentIdentifier.LinkingAgentRole', ApiField: 'LinkingAgentRole', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2261,12 +2387,13 @@ export class MockSchemaService { { FieldName: 'OriginatingAgency', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'OriginatingAgency', ApiField: 'OriginatingAgency', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2277,12 +2404,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'OriginatingAgency.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2293,12 +2421,13 @@ export class MockSchemaService { { FieldName: 'OrganizationDescriptiveMetadata', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'OriginatingAgency.OrganizationDescriptiveMetadata', ApiField: 'OrganizationDescriptiveMetadata', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2308,12 +2437,13 @@ export class MockSchemaService { { FieldName: 'OriginatingAgencyArchiveUnitIdentifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'OriginatingAgencyArchiveUnitIdentifier', ApiField: 'OriginatingAgencyArchiveUnitIdentifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2324,12 +2454,13 @@ export class MockSchemaService { { FieldName: 'OriginatingSystemId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'OriginatingSystemId', ApiField: 'OriginatingSystemId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2340,12 +2471,13 @@ export class MockSchemaService { { FieldName: 'OriginatingSystemIdReplyTo', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'OriginatingSystemIdReplyTo', ApiField: 'OriginatingSystemIdReplyTo', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2356,12 +2488,13 @@ export class MockSchemaService { { FieldName: 'PersistentIdentifier', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'PersistentIdentifier', ApiField: 'PersistentIdentifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2371,12 +2504,13 @@ export class MockSchemaService { { FieldName: 'PersistentIdentifierContent', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'PersistentIdentifier.PersistentIdentifierContent', ApiField: 'PersistentIdentifierContent', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2387,12 +2521,13 @@ export class MockSchemaService { { FieldName: 'PersistentIdentifierOrigin', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'PersistentIdentifier.PersistentIdentifierOrigin', ApiField: 'PersistentIdentifierOrigin', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2403,12 +2538,13 @@ export class MockSchemaService { { FieldName: 'PersistentIdentifierReference', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'PersistentIdentifier.PersistentIdentifierReference', ApiField: 'PersistentIdentifierReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2419,12 +2555,13 @@ export class MockSchemaService { { FieldName: 'PersistentIdentifierType', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'PersistentIdentifier.PersistentIdentifierType', ApiField: 'PersistentIdentifierType', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2435,12 +2572,13 @@ export class MockSchemaService { { FieldName: 'ReceivedDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'ReceivedDate', ApiField: 'ReceivedDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2451,12 +2589,13 @@ export class MockSchemaService { { FieldName: 'Recipient', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Recipient', ApiField: 'Recipient', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2466,12 +2605,13 @@ export class MockSchemaService { { FieldName: 'Activity', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Recipient.Activity', ApiField: 'Activity', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2482,12 +2622,13 @@ export class MockSchemaService { { FieldName: 'BirthDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.BirthDate', ApiField: 'BirthDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2498,12 +2639,13 @@ export class MockSchemaService { { FieldName: 'BirthName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.BirthName', ApiField: 'BirthName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2514,12 +2656,13 @@ export class MockSchemaService { { FieldName: 'BirthPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.BirthPlace', ApiField: 'BirthPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2529,12 +2672,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.BirthPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2545,12 +2689,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.BirthPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2561,12 +2706,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.BirthPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2577,12 +2723,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.BirthPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2593,12 +2740,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.BirthPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2609,12 +2757,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.BirthPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2625,12 +2774,13 @@ export class MockSchemaService { { FieldName: 'Corpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.Corpname', ApiField: 'Corpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2641,12 +2791,13 @@ export class MockSchemaService { { FieldName: 'DeathDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.DeathDate', ApiField: 'DeathDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2657,12 +2808,13 @@ export class MockSchemaService { { FieldName: 'DeathPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.DeathPlace', ApiField: 'DeathPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2672,12 +2824,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.DeathPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2688,12 +2841,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.DeathPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2704,12 +2858,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.DeathPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2720,12 +2875,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.DeathPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2736,12 +2892,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.DeathPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2752,12 +2909,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.DeathPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2768,12 +2926,13 @@ export class MockSchemaService { { FieldName: 'FirstName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.FirstName', ApiField: 'FirstName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2784,12 +2943,13 @@ export class MockSchemaService { { FieldName: 'FullName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.FullName', ApiField: 'FullName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2800,12 +2960,13 @@ export class MockSchemaService { { FieldName: 'Function', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Recipient.Function', ApiField: 'Function', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2816,12 +2977,13 @@ export class MockSchemaService { { FieldName: 'Gender', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.Gender', ApiField: 'Gender', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2832,12 +2994,13 @@ export class MockSchemaService { { FieldName: 'GivenName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Recipient.GivenName', ApiField: 'GivenName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2848,12 +3011,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Recipient.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2864,12 +3028,13 @@ export class MockSchemaService { { FieldName: 'Mandate', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Recipient.Mandate', ApiField: 'Mandate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2880,12 +3045,13 @@ export class MockSchemaService { { FieldName: 'Nationality', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Recipient.Nationality', ApiField: 'Nationality', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2896,12 +3062,13 @@ export class MockSchemaService { { FieldName: 'Position', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Recipient.Position', ApiField: 'Position', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2912,12 +3079,13 @@ export class MockSchemaService { { FieldName: 'Role', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Recipient.Role', ApiField: 'Role', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -2928,12 +3096,13 @@ export class MockSchemaService { { FieldName: 'RegisteredDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RegisteredDate', ApiField: 'RegisteredDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2944,12 +3113,13 @@ export class MockSchemaService { { FieldName: 'RelatedObjectReference', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference', ApiField: 'RelatedObjectReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2959,12 +3129,13 @@ export class MockSchemaService { { FieldName: 'IsPartOf', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'RelatedObjectReference.IsPartOf', ApiField: 'IsPartOf', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2974,12 +3145,13 @@ export class MockSchemaService { { FieldName: 'ArchiveUnitRefId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsPartOf.ArchiveUnitRefId', ApiField: 'ArchiveUnitRefId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -2990,12 +3162,13 @@ export class MockSchemaService { { FieldName: 'DataObjectReference', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsPartOf.DataObjectReference', ApiField: 'DataObjectReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3005,12 +3178,13 @@ export class MockSchemaService { { FieldName: 'DataObjectGroupReferenceId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsPartOf.DataObjectReference.DataObjectGroupReferenceId', ApiField: 'DataObjectGroupReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3021,12 +3195,13 @@ export class MockSchemaService { { FieldName: 'DataObjectReferenceId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsPartOf.DataObjectReference.DataObjectReferenceId', ApiField: 'DataObjectReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3037,12 +3212,13 @@ export class MockSchemaService { { FieldName: 'ExternalReference', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsPartOf.ExternalReference', ApiField: 'ExternalReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3053,12 +3229,13 @@ export class MockSchemaService { { FieldName: 'RepositoryArchiveUnitPID', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsPartOf.RepositoryArchiveUnitPID', ApiField: 'RepositoryArchiveUnitPID', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3069,12 +3246,13 @@ export class MockSchemaService { { FieldName: 'RepositoryObjectPID', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsPartOf.RepositoryObjectPID', ApiField: 'RepositoryObjectPID', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3085,12 +3263,13 @@ export class MockSchemaService { { FieldName: 'IsVersionOf', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'RelatedObjectReference.IsVersionOf', ApiField: 'IsVersionOf', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3100,12 +3279,13 @@ export class MockSchemaService { { FieldName: 'ArchiveUnitRefId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsVersionOf.ArchiveUnitRefId', ApiField: 'ArchiveUnitRefId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3116,12 +3296,13 @@ export class MockSchemaService { { FieldName: 'DataObjectReference', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsVersionOf.DataObjectReference', ApiField: 'DataObjectReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3131,12 +3312,13 @@ export class MockSchemaService { { FieldName: 'DataObjectGroupReferenceId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsVersionOf.DataObjectReference.DataObjectGroupReferenceId', ApiField: 'DataObjectGroupReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3147,12 +3329,13 @@ export class MockSchemaService { { FieldName: 'DataObjectReferenceId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsVersionOf.DataObjectReference.DataObjectReferenceId', ApiField: 'DataObjectReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3163,12 +3346,13 @@ export class MockSchemaService { { FieldName: 'ExternalReference', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsVersionOf.ExternalReference', ApiField: 'ExternalReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3179,12 +3363,13 @@ export class MockSchemaService { { FieldName: 'RepositoryArchiveUnitPID', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsVersionOf.RepositoryArchiveUnitPID', ApiField: 'RepositoryArchiveUnitPID', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3195,12 +3380,13 @@ export class MockSchemaService { { FieldName: 'RepositoryObjectPID', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.IsVersionOf.RepositoryObjectPID', ApiField: 'RepositoryObjectPID', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3211,12 +3397,13 @@ export class MockSchemaService { { FieldName: 'References', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'RelatedObjectReference.References', ApiField: 'References', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3226,12 +3413,13 @@ export class MockSchemaService { { FieldName: 'ArchiveUnitRefId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.References.ArchiveUnitRefId', ApiField: 'ArchiveUnitRefId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3242,12 +3430,13 @@ export class MockSchemaService { { FieldName: 'DataObjectReference', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.References.DataObjectReference', ApiField: 'DataObjectReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3257,12 +3446,13 @@ export class MockSchemaService { { FieldName: 'DataObjectGroupReferenceId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.References.DataObjectReference.DataObjectGroupReferenceId', ApiField: 'DataObjectGroupReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3273,12 +3463,13 @@ export class MockSchemaService { { FieldName: 'DataObjectReferenceId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.References.DataObjectReference.DataObjectReferenceId', ApiField: 'DataObjectReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3289,12 +3480,13 @@ export class MockSchemaService { { FieldName: 'ExternalReference', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.References.ExternalReference', ApiField: 'ExternalReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3305,12 +3497,13 @@ export class MockSchemaService { { FieldName: 'RepositoryArchiveUnitPID', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.References.RepositoryArchiveUnitPID', ApiField: 'RepositoryArchiveUnitPID', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3321,12 +3514,13 @@ export class MockSchemaService { { FieldName: 'RepositoryObjectPID', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.References.RepositoryObjectPID', ApiField: 'RepositoryObjectPID', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3337,12 +3531,13 @@ export class MockSchemaService { { FieldName: 'Replaces', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Replaces', ApiField: 'Replaces', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3352,12 +3547,13 @@ export class MockSchemaService { { FieldName: 'ArchiveUnitRefId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Replaces.ArchiveUnitRefId', ApiField: 'ArchiveUnitRefId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3368,12 +3564,13 @@ export class MockSchemaService { { FieldName: 'DataObjectReference', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Replaces.DataObjectReference', ApiField: 'DataObjectReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3383,12 +3580,13 @@ export class MockSchemaService { { FieldName: 'DataObjectGroupReferenceId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Replaces.DataObjectReference.DataObjectGroupReferenceId', ApiField: 'DataObjectGroupReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3399,12 +3597,13 @@ export class MockSchemaService { { FieldName: 'DataObjectReferenceId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Replaces.DataObjectReference.DataObjectReferenceId', ApiField: 'DataObjectReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3415,12 +3614,13 @@ export class MockSchemaService { { FieldName: 'ExternalReference', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Replaces.ExternalReference', ApiField: 'ExternalReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3431,12 +3631,13 @@ export class MockSchemaService { { FieldName: 'RepositoryArchiveUnitPID', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Replaces.RepositoryArchiveUnitPID', ApiField: 'RepositoryArchiveUnitPID', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3447,12 +3648,13 @@ export class MockSchemaService { { FieldName: 'RepositoryObjectPID', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Replaces.RepositoryObjectPID', ApiField: 'RepositoryObjectPID', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3463,12 +3665,13 @@ export class MockSchemaService { { FieldName: 'Requires', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'RelatedObjectReference.Requires', ApiField: 'Requires', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3478,12 +3681,13 @@ export class MockSchemaService { { FieldName: 'ArchiveUnitRefId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Requires.ArchiveUnitRefId', ApiField: 'ArchiveUnitRefId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3494,12 +3698,13 @@ export class MockSchemaService { { FieldName: 'DataObjectReference', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Requires.DataObjectReference', ApiField: 'DataObjectReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3509,12 +3714,13 @@ export class MockSchemaService { { FieldName: 'DataObjectGroupReferenceId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Requires.DataObjectReference.DataObjectGroupReferenceId', ApiField: 'DataObjectGroupReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3525,12 +3731,13 @@ export class MockSchemaService { { FieldName: 'DataObjectReferenceId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Requires.DataObjectReference.DataObjectReferenceId', ApiField: 'DataObjectReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3541,12 +3748,13 @@ export class MockSchemaService { { FieldName: 'ExternalReference', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Requires.ExternalReference', ApiField: 'ExternalReference', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3557,12 +3765,13 @@ export class MockSchemaService { { FieldName: 'RepositoryArchiveUnitPID', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Requires.RepositoryArchiveUnitPID', ApiField: 'RepositoryArchiveUnitPID', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3573,12 +3782,13 @@ export class MockSchemaService { { FieldName: 'RepositoryObjectPID', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'RelatedObjectReference.Requires.RepositoryObjectPID', ApiField: 'RepositoryObjectPID', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -3589,12 +3799,13 @@ export class MockSchemaService { { FieldName: 'Sender', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Sender', ApiField: 'Sender', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3604,12 +3815,13 @@ export class MockSchemaService { { FieldName: 'Activity', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Sender.Activity', ApiField: 'Activity', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3620,12 +3832,13 @@ export class MockSchemaService { { FieldName: 'BirthDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.BirthDate', ApiField: 'BirthDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3636,12 +3849,13 @@ export class MockSchemaService { { FieldName: 'BirthName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.BirthName', ApiField: 'BirthName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3652,12 +3866,13 @@ export class MockSchemaService { { FieldName: 'BirthPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.BirthPlace', ApiField: 'BirthPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3667,12 +3882,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.BirthPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3683,12 +3899,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.BirthPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3699,12 +3916,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.BirthPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3715,12 +3933,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.BirthPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3731,12 +3950,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.BirthPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3747,12 +3967,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.BirthPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3763,12 +3984,13 @@ export class MockSchemaService { { FieldName: 'Corpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.Corpname', ApiField: 'Corpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3779,12 +4001,13 @@ export class MockSchemaService { { FieldName: 'DeathDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.DeathDate', ApiField: 'DeathDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3795,12 +4018,13 @@ export class MockSchemaService { { FieldName: 'DeathPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.DeathPlace', ApiField: 'DeathPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3810,12 +4034,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.DeathPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3826,12 +4051,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.DeathPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3842,12 +4068,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.DeathPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3858,12 +4085,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.DeathPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3874,12 +4102,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.DeathPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3890,12 +4119,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.DeathPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3906,12 +4136,13 @@ export class MockSchemaService { { FieldName: 'FirstName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.FirstName', ApiField: 'FirstName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3922,12 +4153,13 @@ export class MockSchemaService { { FieldName: 'FullName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.FullName', ApiField: 'FullName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3938,12 +4170,13 @@ export class MockSchemaService { { FieldName: 'Function', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Sender.Function', ApiField: 'Function', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3954,12 +4187,13 @@ export class MockSchemaService { { FieldName: 'Gender', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.Gender', ApiField: 'Gender', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3970,12 +4204,13 @@ export class MockSchemaService { { FieldName: 'GivenName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Sender.GivenName', ApiField: 'GivenName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -3986,12 +4221,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Sender.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4002,12 +4238,13 @@ export class MockSchemaService { { FieldName: 'Mandate', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Sender.Mandate', ApiField: 'Mandate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4018,12 +4255,13 @@ export class MockSchemaService { { FieldName: 'Nationality', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Sender.Nationality', ApiField: 'Nationality', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4034,12 +4272,13 @@ export class MockSchemaService { { FieldName: 'Position', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Sender.Position', ApiField: 'Position', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4050,12 +4289,13 @@ export class MockSchemaService { { FieldName: 'Role', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Sender.Role', ApiField: 'Role', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4066,12 +4306,13 @@ export class MockSchemaService { { FieldName: 'SentDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SentDate', ApiField: 'SentDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -4082,12 +4323,13 @@ export class MockSchemaService { { FieldName: 'Signature', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature', ApiField: 'Signature', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4097,12 +4339,13 @@ export class MockSchemaService { { FieldName: 'Masterdata', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Masterdata', ApiField: 'Masterdata', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4112,12 +4355,13 @@ export class MockSchemaService { { FieldName: 'ReferencedObject', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE_REQUIRED', Indexed: true, Path: 'Signature.ReferencedObject', ApiField: 'ReferencedObject', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4127,12 +4371,13 @@ export class MockSchemaService { { FieldName: 'SignedObjectDigest', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.ReferencedObject.SignedObjectDigest', ApiField: 'SignedObjectDigest', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4142,12 +4387,13 @@ export class MockSchemaService { { FieldName: 'Algorithm', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.ReferencedObject.SignedObjectDigest.Algorithm', ApiField: 'Algorithm', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -4158,12 +4404,13 @@ export class MockSchemaService { { FieldName: 'MessageDigest', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.ReferencedObject.SignedObjectDigest.MessageDigest', ApiField: 'MessageDigest', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -4174,12 +4421,13 @@ export class MockSchemaService { { FieldName: 'SignedObjectId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE_REQUIRED', Indexed: true, Path: 'Signature.ReferencedObject.SignedObjectId', ApiField: 'SignedObjectId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4190,12 +4438,13 @@ export class MockSchemaService { { FieldName: 'Signer', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY_REQUIRED', Indexed: true, Path: 'Signature.Signer', ApiField: 'Signer', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4205,12 +4454,13 @@ export class MockSchemaService { { FieldName: 'Activity', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Signer.Activity', ApiField: 'Activity', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4221,12 +4471,13 @@ export class MockSchemaService { { FieldName: 'BirthDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.BirthDate', ApiField: 'BirthDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4237,12 +4488,13 @@ export class MockSchemaService { { FieldName: 'BirthName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.BirthName', ApiField: 'BirthName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4253,12 +4505,13 @@ export class MockSchemaService { { FieldName: 'BirthPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.BirthPlace', ApiField: 'BirthPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4268,12 +4521,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.BirthPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4284,12 +4538,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.BirthPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4300,12 +4555,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.BirthPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4316,12 +4572,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.BirthPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4332,12 +4589,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.BirthPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4348,12 +4606,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.BirthPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4364,12 +4623,13 @@ export class MockSchemaService { { FieldName: 'Corpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.Corpname', ApiField: 'Corpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4380,12 +4640,13 @@ export class MockSchemaService { { FieldName: 'DeathDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.DeathDate', ApiField: 'DeathDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4396,12 +4657,13 @@ export class MockSchemaService { { FieldName: 'DeathPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.DeathPlace', ApiField: 'DeathPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4411,12 +4673,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.DeathPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4427,12 +4690,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.DeathPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4443,12 +4707,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.DeathPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4459,12 +4724,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.DeathPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4475,12 +4741,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.DeathPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4491,12 +4758,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.DeathPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4507,12 +4775,13 @@ export class MockSchemaService { { FieldName: 'FirstName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.FirstName', ApiField: 'FirstName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4523,12 +4792,13 @@ export class MockSchemaService { { FieldName: 'FullName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.FullName', ApiField: 'FullName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -4539,12 +4809,13 @@ export class MockSchemaService { { FieldName: 'Fullpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.Fullpname', ApiField: 'Fullpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4554,12 +4825,13 @@ export class MockSchemaService { { FieldName: 'Function', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Signer.Function', ApiField: 'Function', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4570,12 +4842,13 @@ export class MockSchemaService { { FieldName: 'Gender', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.Gender', ApiField: 'Gender', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4586,12 +4859,13 @@ export class MockSchemaService { { FieldName: 'GivenName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Signer.GivenName', ApiField: 'GivenName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4602,12 +4876,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Signer.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4618,12 +4893,13 @@ export class MockSchemaService { { FieldName: 'Mandate', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Signer.Mandate', ApiField: 'Mandate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4634,12 +4910,13 @@ export class MockSchemaService { { FieldName: 'Nationality', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Signer.Nationality', ApiField: 'Nationality', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4650,12 +4927,13 @@ export class MockSchemaService { { FieldName: 'Position', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Signer.Position', ApiField: 'Position', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4666,12 +4944,13 @@ export class MockSchemaService { { FieldName: 'Role', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Signer.Role', ApiField: 'Role', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4682,12 +4961,13 @@ export class MockSchemaService { { FieldName: 'SigningTime', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE_REQUIRED', Indexed: true, Path: 'Signature.Signer.SigningTime', ApiField: 'SigningTime', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4698,12 +4978,13 @@ export class MockSchemaService { { FieldName: 'Validator', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator', ApiField: 'Validator', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4713,12 +4994,13 @@ export class MockSchemaService { { FieldName: 'Activity', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Validator.Activity', ApiField: 'Activity', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4729,12 +5011,13 @@ export class MockSchemaService { { FieldName: 'BirthDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.BirthDate', ApiField: 'BirthDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4745,12 +5028,13 @@ export class MockSchemaService { { FieldName: 'BirthName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.BirthName', ApiField: 'BirthName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4761,12 +5045,13 @@ export class MockSchemaService { { FieldName: 'BirthPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.BirthPlace', ApiField: 'BirthPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4776,12 +5061,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.BirthPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4792,12 +5078,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.BirthPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4808,12 +5095,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.BirthPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4824,12 +5112,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.BirthPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4840,12 +5129,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.BirthPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4856,12 +5146,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.BirthPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4872,12 +5163,13 @@ export class MockSchemaService { { FieldName: 'Corpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.Corpname', ApiField: 'Corpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4888,12 +5180,13 @@ export class MockSchemaService { { FieldName: 'DeathDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.DeathDate', ApiField: 'DeathDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4904,12 +5197,13 @@ export class MockSchemaService { { FieldName: 'DeathPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.DeathPlace', ApiField: 'DeathPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4919,12 +5213,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.DeathPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4935,12 +5230,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.DeathPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4951,12 +5247,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.DeathPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4967,12 +5264,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.DeathPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4983,12 +5281,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.DeathPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -4999,12 +5298,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.DeathPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5015,12 +5315,13 @@ export class MockSchemaService { { FieldName: 'FirstName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.FirstName', ApiField: 'FirstName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5031,12 +5332,13 @@ export class MockSchemaService { { FieldName: 'FullName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.FullName', ApiField: 'FullName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -5047,12 +5349,13 @@ export class MockSchemaService { { FieldName: 'Fullpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.Fullpname', ApiField: 'Fullpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5062,12 +5365,13 @@ export class MockSchemaService { { FieldName: 'Function', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Validator.Function', ApiField: 'Function', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5078,12 +5382,13 @@ export class MockSchemaService { { FieldName: 'Gender', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.Gender', ApiField: 'Gender', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5094,12 +5399,13 @@ export class MockSchemaService { { FieldName: 'GivenName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Signature.Validator.GivenName', ApiField: 'GivenName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5110,12 +5416,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Validator.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5126,12 +5433,13 @@ export class MockSchemaService { { FieldName: 'Mandate', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Validator.Mandate', ApiField: 'Mandate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5142,12 +5450,13 @@ export class MockSchemaService { { FieldName: 'Nationality', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Validator.Nationality', ApiField: 'Nationality', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5158,12 +5467,13 @@ export class MockSchemaService { { FieldName: 'Position', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Validator.Position', ApiField: 'Position', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5174,12 +5484,13 @@ export class MockSchemaService { { FieldName: 'Role', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Signature.Validator.Role', ApiField: 'Role', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5190,12 +5501,13 @@ export class MockSchemaService { { FieldName: 'ValidationTime', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE_REQUIRED', Indexed: true, Path: 'Signature.Validator.ValidationTime', ApiField: 'ValidationTime', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5206,12 +5518,13 @@ export class MockSchemaService { { FieldName: 'SigningInformation', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation', ApiField: 'SigningInformation', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5221,12 +5534,13 @@ export class MockSchemaService { { FieldName: 'AdditionalProof', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.AdditionalProof', ApiField: 'AdditionalProof', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5236,12 +5550,13 @@ export class MockSchemaService { { FieldName: 'AdditionalProofInformation', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.AdditionalProof.AdditionalProofInformation', ApiField: 'AdditionalProofInformation', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5252,12 +5567,13 @@ export class MockSchemaService { { FieldName: 'DetachedSigningRole', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.DetachedSigningRole', ApiField: 'DetachedSigningRole', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5268,12 +5584,13 @@ export class MockSchemaService { { FieldName: 'Extended', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.Extended', ApiField: 'Extended', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -5283,12 +5600,13 @@ export class MockSchemaService { { FieldName: 'SignatureDescription', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription', ApiField: 'SignatureDescription', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5298,12 +5616,13 @@ export class MockSchemaService { { FieldName: 'Signer', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer', ApiField: 'Signer', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5313,12 +5632,13 @@ export class MockSchemaService { { FieldName: 'Activity', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.Activity', ApiField: 'Activity', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5329,12 +5649,13 @@ export class MockSchemaService { { FieldName: 'BirthDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.BirthDate', ApiField: 'BirthDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5345,12 +5666,13 @@ export class MockSchemaService { { FieldName: 'BirthName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.BirthName', ApiField: 'BirthName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5361,12 +5683,13 @@ export class MockSchemaService { { FieldName: 'BirthPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.BirthPlace', ApiField: 'BirthPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5376,12 +5699,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.BirthPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5392,12 +5716,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.BirthPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5408,12 +5733,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.BirthPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5424,12 +5750,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.BirthPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5440,12 +5767,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.BirthPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5456,12 +5784,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.BirthPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5472,12 +5801,13 @@ export class MockSchemaService { { FieldName: 'Corpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.Corpname', ApiField: 'Corpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5488,12 +5818,13 @@ export class MockSchemaService { { FieldName: 'DeathDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.DeathDate', ApiField: 'DeathDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5504,12 +5835,13 @@ export class MockSchemaService { { FieldName: 'DeathPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.DeathPlace', ApiField: 'DeathPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5519,12 +5851,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.DeathPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5535,12 +5868,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.DeathPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5551,12 +5885,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.DeathPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5567,12 +5902,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.DeathPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5583,12 +5919,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.DeathPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5599,12 +5936,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.DeathPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5615,12 +5953,13 @@ export class MockSchemaService { { FieldName: 'FirstName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.FirstName', ApiField: 'FirstName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5631,12 +5970,13 @@ export class MockSchemaService { { FieldName: 'FullName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.FullName', ApiField: 'FullName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -5647,12 +5987,13 @@ export class MockSchemaService { { FieldName: 'Fullpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.Fullpname', ApiField: 'Fullpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5662,12 +6003,13 @@ export class MockSchemaService { { FieldName: 'Function', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.Function', ApiField: 'Function', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5678,12 +6020,13 @@ export class MockSchemaService { { FieldName: 'Gender', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.Gender', ApiField: 'Gender', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5694,12 +6037,13 @@ export class MockSchemaService { { FieldName: 'GivenName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.GivenName', ApiField: 'GivenName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5710,12 +6054,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5726,12 +6071,13 @@ export class MockSchemaService { { FieldName: 'Mandate', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.Mandate', ApiField: 'Mandate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5742,12 +6088,13 @@ export class MockSchemaService { { FieldName: 'Nationality', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.Nationality', ApiField: 'Nationality', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5758,12 +6105,13 @@ export class MockSchemaService { { FieldName: 'Position', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.Position', ApiField: 'Position', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5774,12 +6122,13 @@ export class MockSchemaService { { FieldName: 'Role', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.Role', ApiField: 'Role', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5790,12 +6139,13 @@ export class MockSchemaService { { FieldName: 'SigningTime', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE_REQUIRED', Indexed: true, Path: 'SigningInformation.SignatureDescription.Signer.SigningTime', ApiField: 'SigningTime', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5806,12 +6156,13 @@ export class MockSchemaService { { FieldName: 'SigningType', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.SigningType', ApiField: 'SigningType', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -5822,12 +6173,13 @@ export class MockSchemaService { { FieldName: 'SignningType', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.SignningType', ApiField: 'SignningType', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5837,12 +6189,13 @@ export class MockSchemaService { { FieldName: 'Validator', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator', ApiField: 'Validator', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5852,12 +6205,13 @@ export class MockSchemaService { { FieldName: 'Activity', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.Activity', ApiField: 'Activity', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5868,12 +6222,13 @@ export class MockSchemaService { { FieldName: 'BirthDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.BirthDate', ApiField: 'BirthDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5884,12 +6239,13 @@ export class MockSchemaService { { FieldName: 'BirthName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.BirthName', ApiField: 'BirthName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5900,12 +6256,13 @@ export class MockSchemaService { { FieldName: 'BirthPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.BirthPlace', ApiField: 'BirthPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5915,12 +6272,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.BirthPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5931,12 +6289,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.BirthPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5947,12 +6306,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.BirthPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5963,12 +6323,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.BirthPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5979,12 +6340,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.BirthPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -5995,12 +6357,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.BirthPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6011,12 +6374,13 @@ export class MockSchemaService { { FieldName: 'Corpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.Corpname', ApiField: 'Corpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6027,12 +6391,13 @@ export class MockSchemaService { { FieldName: 'DeathDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.DeathDate', ApiField: 'DeathDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6043,12 +6408,13 @@ export class MockSchemaService { { FieldName: 'DeathPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.DeathPlace', ApiField: 'DeathPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6058,12 +6424,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.DeathPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6074,12 +6441,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.DeathPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6090,12 +6458,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.DeathPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6106,12 +6475,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.DeathPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6122,12 +6492,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.DeathPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6138,12 +6509,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.DeathPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6154,12 +6526,13 @@ export class MockSchemaService { { FieldName: 'FirstName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.FirstName', ApiField: 'FirstName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6170,12 +6543,13 @@ export class MockSchemaService { { FieldName: 'FullName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.FullName', ApiField: 'FullName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6186,12 +6560,13 @@ export class MockSchemaService { { FieldName: 'Fullpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.Fullpname', ApiField: 'Fullpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6201,12 +6576,13 @@ export class MockSchemaService { { FieldName: 'Function', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.Function', ApiField: 'Function', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6217,12 +6593,13 @@ export class MockSchemaService { { FieldName: 'Gender', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.Gender', ApiField: 'Gender', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6233,12 +6610,13 @@ export class MockSchemaService { { FieldName: 'GivenName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.GivenName', ApiField: 'GivenName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6249,12 +6627,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6265,12 +6644,13 @@ export class MockSchemaService { { FieldName: 'Mandate', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.Mandate', ApiField: 'Mandate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6281,12 +6661,13 @@ export class MockSchemaService { { FieldName: 'Nationality', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.Nationality', ApiField: 'Nationality', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6297,12 +6678,13 @@ export class MockSchemaService { { FieldName: 'Position', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.Position', ApiField: 'Position', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6313,12 +6695,13 @@ export class MockSchemaService { { FieldName: 'Role', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.Role', ApiField: 'Role', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6329,12 +6712,13 @@ export class MockSchemaService { { FieldName: 'ValidationTime', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE_REQUIRED', Indexed: true, Path: 'SigningInformation.SignatureDescription.Validator.ValidationTime', ApiField: 'ValidationTime', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6345,12 +6729,13 @@ export class MockSchemaService { { FieldName: 'SignedDocumentReferenceId', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SigningInformation.SignedDocumentReferenceId', ApiField: 'SignedDocumentReferenceId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6360,12 +6745,13 @@ export class MockSchemaService { { FieldName: 'SigningRole', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY_REQUIRED', Indexed: true, Path: 'SigningInformation.SigningRole', ApiField: 'SigningRole', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6376,12 +6762,13 @@ export class MockSchemaService { { FieldName: 'TimestampingInformation', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.TimestampingInformation', ApiField: 'TimestampingInformation', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6391,12 +6778,13 @@ export class MockSchemaService { { FieldName: 'AdditionalTimestampingInformation', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.TimestampingInformation.AdditionalTimestampingInformation', ApiField: 'AdditionalTimestampingInformation', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6407,12 +6795,13 @@ export class MockSchemaService { { FieldName: 'TimeStamp', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SigningInformation.TimestampingInformation.TimeStamp', ApiField: 'TimeStamp', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6423,12 +6812,13 @@ export class MockSchemaService { { FieldName: 'Source', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Source', ApiField: 'Source', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6439,12 +6829,13 @@ export class MockSchemaService { { FieldName: 'StartDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'StartDate', ApiField: 'StartDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6455,12 +6846,13 @@ export class MockSchemaService { { FieldName: 'Status', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Status', ApiField: 'Status', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6471,12 +6863,13 @@ export class MockSchemaService { { FieldName: 'SubmissionAgency', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SubmissionAgency', ApiField: 'SubmissionAgency', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6487,12 +6880,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SubmissionAgency.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6503,12 +6897,13 @@ export class MockSchemaService { { FieldName: 'OrganizationDescriptiveMetadata', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'SubmissionAgency.OrganizationDescriptiveMetadata', ApiField: 'OrganizationDescriptiveMetadata', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6518,12 +6913,13 @@ export class MockSchemaService { { FieldName: 'SystemId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'SystemId', ApiField: 'SystemId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6534,12 +6930,13 @@ export class MockSchemaService { { FieldName: 'Tag', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Tag', ApiField: 'Tag', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6550,12 +6947,13 @@ export class MockSchemaService { { FieldName: 'TextContent', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'TextContent', ApiField: 'TextContent', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6566,12 +6964,13 @@ export class MockSchemaService { { FieldName: 'Title', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Title', ApiField: 'Title', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6579,30 +6978,16 @@ export class MockSchemaService { SedaField: 'Title', ShortName: 'Intitulé', }, - { - FieldName: 'Title ', - Type: 'TEXT', - Origin: 'INTERNAL', - Cardinality: 'ONE_REQUIRED', - Indexed: true, - Path: 'Title ', - ApiField: 'Title ', - Collection: 'Unit', - SedaVersions: ['2.1'], - StringSize: 'SHORT', - Category: 'DESCRIPTION', - ApiPath: 'Title ', - ShortName: 'Intitulé *', - }, { FieldName: 'keyword', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Title.keyword', ApiField: 'keyword', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6612,12 +6997,13 @@ export class MockSchemaService { { FieldName: 'Title_', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Title_', ApiField: 'Title_', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6627,12 +7013,13 @@ export class MockSchemaService { { FieldName: 'TransactedDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'TransactedDate', ApiField: 'TransactedDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6643,12 +7030,13 @@ export class MockSchemaService { { FieldName: 'TransferringAgencyArchiveUnitIdentifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'TransferringAgencyArchiveUnitIdentifier', ApiField: 'TransferringAgencyArchiveUnitIdentifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -6659,12 +7047,13 @@ export class MockSchemaService { { FieldName: 'Transmitter', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Transmitter', ApiField: 'Transmitter', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6674,12 +7063,13 @@ export class MockSchemaService { { FieldName: 'Activity', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Transmitter.Activity', ApiField: 'Activity', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6690,12 +7080,13 @@ export class MockSchemaService { { FieldName: 'BirthDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.BirthDate', ApiField: 'BirthDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6706,12 +7097,13 @@ export class MockSchemaService { { FieldName: 'BirthName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.BirthName', ApiField: 'BirthName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6722,12 +7114,13 @@ export class MockSchemaService { { FieldName: 'BirthPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.BirthPlace', ApiField: 'BirthPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6737,12 +7130,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.BirthPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6753,12 +7147,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.BirthPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6769,12 +7164,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.BirthPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6785,12 +7181,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.BirthPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6801,12 +7198,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.BirthPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6817,12 +7215,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.BirthPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6833,12 +7232,13 @@ export class MockSchemaService { { FieldName: 'Corpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.Corpname', ApiField: 'Corpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6849,12 +7249,13 @@ export class MockSchemaService { { FieldName: 'DeathDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.DeathDate', ApiField: 'DeathDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6865,12 +7266,13 @@ export class MockSchemaService { { FieldName: 'DeathPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.DeathPlace', ApiField: 'DeathPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6880,12 +7282,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.DeathPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6896,12 +7299,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.DeathPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6912,12 +7316,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.DeathPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6928,12 +7333,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.DeathPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6944,12 +7350,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.DeathPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6960,12 +7367,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.DeathPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6976,12 +7384,13 @@ export class MockSchemaService { { FieldName: 'FirstName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.FirstName', ApiField: 'FirstName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -6992,12 +7401,13 @@ export class MockSchemaService { { FieldName: 'FullName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.FullName', ApiField: 'FullName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7008,12 +7418,13 @@ export class MockSchemaService { { FieldName: 'Function', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Transmitter.Function', ApiField: 'Function', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7024,12 +7435,13 @@ export class MockSchemaService { { FieldName: 'Gender', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.Gender', ApiField: 'Gender', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7040,12 +7452,13 @@ export class MockSchemaService { { FieldName: 'GivenName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Transmitter.GivenName', ApiField: 'GivenName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7056,12 +7469,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Transmitter.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7072,12 +7486,13 @@ export class MockSchemaService { { FieldName: 'Mandate', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Transmitter.Mandate', ApiField: 'Mandate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7088,12 +7503,13 @@ export class MockSchemaService { { FieldName: 'Nationality', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Transmitter.Nationality', ApiField: 'Nationality', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7104,12 +7520,13 @@ export class MockSchemaService { { FieldName: 'Position', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Transmitter.Position', ApiField: 'Position', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7120,12 +7537,13 @@ export class MockSchemaService { { FieldName: 'Role', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Transmitter.Role', ApiField: 'Role', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7136,12 +7554,13 @@ export class MockSchemaService { { FieldName: 'Type', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Type', ApiField: 'Type', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7152,12 +7571,13 @@ export class MockSchemaService { { FieldName: 'Version', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Version', ApiField: 'Version', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7168,12 +7588,13 @@ export class MockSchemaService { { FieldName: 'Writer', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Writer', ApiField: 'Writer', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7183,12 +7604,13 @@ export class MockSchemaService { { FieldName: 'Activity', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Writer.Activity', ApiField: 'Activity', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7199,12 +7621,13 @@ export class MockSchemaService { { FieldName: 'BirthDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.BirthDate', ApiField: 'BirthDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7215,12 +7638,13 @@ export class MockSchemaService { { FieldName: 'BirthName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.BirthName', ApiField: 'BirthName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7231,12 +7655,13 @@ export class MockSchemaService { { FieldName: 'BirthPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.BirthPlace', ApiField: 'BirthPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7246,12 +7671,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.BirthPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7262,12 +7688,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.BirthPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7278,12 +7705,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.BirthPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7294,12 +7722,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.BirthPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7310,12 +7739,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.BirthPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7326,12 +7756,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.BirthPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7342,12 +7773,13 @@ export class MockSchemaService { { FieldName: 'Corpname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.Corpname', ApiField: 'Corpname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7358,12 +7790,13 @@ export class MockSchemaService { { FieldName: 'DeathDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.DeathDate', ApiField: 'DeathDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7374,12 +7807,13 @@ export class MockSchemaService { { FieldName: 'DeathPlace', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.DeathPlace', ApiField: 'DeathPlace', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7389,12 +7823,13 @@ export class MockSchemaService { { FieldName: 'Address', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.DeathPlace.Address', ApiField: 'Address', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7405,12 +7840,13 @@ export class MockSchemaService { { FieldName: 'City', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.DeathPlace.City', ApiField: 'City', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7421,12 +7857,13 @@ export class MockSchemaService { { FieldName: 'Country', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.DeathPlace.Country', ApiField: 'Country', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7437,12 +7874,13 @@ export class MockSchemaService { { FieldName: 'Geogname', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.DeathPlace.Geogname', ApiField: 'Geogname', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7453,12 +7891,13 @@ export class MockSchemaService { { FieldName: 'PostalCode', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.DeathPlace.PostalCode', ApiField: 'PostalCode', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7469,12 +7908,13 @@ export class MockSchemaService { { FieldName: 'Region', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.DeathPlace.Region', ApiField: 'Region', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7485,12 +7925,13 @@ export class MockSchemaService { { FieldName: 'FirstName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.FirstName', ApiField: 'FirstName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7501,12 +7942,13 @@ export class MockSchemaService { { FieldName: 'FullName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.FullName', ApiField: 'FullName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7517,12 +7959,13 @@ export class MockSchemaService { { FieldName: 'Function', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Writer.Function', ApiField: 'Function', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7533,12 +7976,13 @@ export class MockSchemaService { { FieldName: 'Gender', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.Gender', ApiField: 'Gender', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7549,12 +7993,13 @@ export class MockSchemaService { { FieldName: 'GivenName', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: 'Writer.GivenName', ApiField: 'GivenName', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7565,12 +8010,13 @@ export class MockSchemaService { { FieldName: 'Identifier', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Writer.Identifier', ApiField: 'Identifier', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7581,12 +8027,13 @@ export class MockSchemaService { { FieldName: 'Mandate', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Writer.Mandate', ApiField: 'Mandate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7597,12 +8044,13 @@ export class MockSchemaService { { FieldName: 'Nationality', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Writer.Nationality', ApiField: 'Nationality', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7613,12 +8061,13 @@ export class MockSchemaService { { FieldName: 'Position', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Writer.Position', ApiField: 'Position', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7629,12 +8078,13 @@ export class MockSchemaService { { FieldName: 'Role', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: 'Writer.Role', ApiField: 'Role', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -7645,12 +8095,13 @@ export class MockSchemaService { { FieldName: '_acd', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_acd', ApiField: '#approximate_creation_date', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7660,12 +8111,13 @@ export class MockSchemaService { { FieldName: '_aud', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_aud', ApiField: '#approximate_update_date', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7675,12 +8127,13 @@ export class MockSchemaService { { FieldName: '_av', Type: 'LONG', + DataType: 'LONG', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_av', ApiField: '#atomic_version', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7690,12 +8143,13 @@ export class MockSchemaService { { FieldName: '_computedInheritedRules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules', ApiField: '#computedInheritedRules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7705,12 +8159,13 @@ export class MockSchemaService { { FieldName: 'AccessRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.AccessRule', ApiField: 'AccessRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7720,12 +8175,13 @@ export class MockSchemaService { { FieldName: 'EndDates', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.AccessRule.EndDates', ApiField: 'EndDates', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7735,12 +8191,13 @@ export class MockSchemaService { { FieldName: 'InheritanceOrigin', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.AccessRule.InheritanceOrigin', ApiField: 'InheritanceOrigin', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7750,12 +8207,13 @@ export class MockSchemaService { { FieldName: 'InheritedRuleIds', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.AccessRule.InheritedRuleIds', ApiField: 'InheritedRuleIds', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7765,12 +8223,13 @@ export class MockSchemaService { { FieldName: 'MaxEndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.AccessRule.MaxEndDate', ApiField: 'MaxEndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7780,12 +8239,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.AccessRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7795,12 +8255,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.AccessRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7811,12 +8272,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.AccessRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7827,12 +8289,13 @@ export class MockSchemaService { { FieldName: 'AppraisalRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.AppraisalRule', ApiField: 'AppraisalRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7842,12 +8305,13 @@ export class MockSchemaService { { FieldName: 'EndDates', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.AppraisalRule.EndDates', ApiField: 'EndDates', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7857,12 +8321,13 @@ export class MockSchemaService { { FieldName: 'FinalAction', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.AppraisalRule.FinalAction', ApiField: 'FinalAction', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7873,12 +8338,13 @@ export class MockSchemaService { { FieldName: 'InheritanceOrigin', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.AppraisalRule.InheritanceOrigin', ApiField: 'InheritanceOrigin', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7888,12 +8354,13 @@ export class MockSchemaService { { FieldName: 'InheritedRuleIds', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.AppraisalRule.InheritedRuleIds', ApiField: 'InheritedRuleIds', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7903,12 +8370,13 @@ export class MockSchemaService { { FieldName: 'MaxEndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.AppraisalRule.MaxEndDate', ApiField: 'MaxEndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7918,12 +8386,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.AppraisalRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7933,12 +8402,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.AppraisalRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7949,12 +8419,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.AppraisalRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7965,12 +8436,13 @@ export class MockSchemaService { { FieldName: 'ClassificationRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.ClassificationRule', ApiField: 'ClassificationRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7980,12 +8452,13 @@ export class MockSchemaService { { FieldName: 'EndDates', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.ClassificationRule.EndDates', ApiField: 'EndDates', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -7995,12 +8468,13 @@ export class MockSchemaService { { FieldName: 'InheritanceOrigin', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.ClassificationRule.InheritanceOrigin', ApiField: 'InheritanceOrigin', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8010,12 +8484,13 @@ export class MockSchemaService { { FieldName: 'InheritedRuleIds', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.ClassificationRule.InheritedRuleIds', ApiField: 'InheritedRuleIds', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8025,12 +8500,13 @@ export class MockSchemaService { { FieldName: 'MaxEndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.ClassificationRule.MaxEndDate', ApiField: 'MaxEndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8040,12 +8516,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.ClassificationRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8055,12 +8532,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.ClassificationRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8071,12 +8549,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.ClassificationRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8087,12 +8566,13 @@ export class MockSchemaService { { FieldName: 'DisseminationRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.DisseminationRule', ApiField: 'DisseminationRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8102,12 +8582,13 @@ export class MockSchemaService { { FieldName: 'EndDates', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.DisseminationRule.EndDates', ApiField: 'EndDates', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8117,12 +8598,13 @@ export class MockSchemaService { { FieldName: 'InheritanceOrigin', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.DisseminationRule.InheritanceOrigin', ApiField: 'InheritanceOrigin', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8132,12 +8614,13 @@ export class MockSchemaService { { FieldName: 'InheritedRuleIds', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.DisseminationRule.InheritedRuleIds', ApiField: 'InheritedRuleIds', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8147,12 +8630,13 @@ export class MockSchemaService { { FieldName: 'MaxEndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.DisseminationRule.MaxEndDate', ApiField: 'MaxEndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8162,12 +8646,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.DisseminationRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8177,12 +8662,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.DisseminationRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8193,12 +8679,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.DisseminationRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8209,12 +8696,13 @@ export class MockSchemaService { { FieldName: 'HoldRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.HoldRule', ApiField: 'HoldRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8224,12 +8712,13 @@ export class MockSchemaService { { FieldName: 'EndDates', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.HoldRule.EndDates', ApiField: 'EndDates', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8239,12 +8728,13 @@ export class MockSchemaService { { FieldName: 'InheritanceOrigin', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.HoldRule.InheritanceOrigin', ApiField: 'InheritanceOrigin', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8254,12 +8744,13 @@ export class MockSchemaService { { FieldName: 'InheritedRuleIds', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.HoldRule.InheritedRuleIds', ApiField: 'InheritedRuleIds', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8269,12 +8760,13 @@ export class MockSchemaService { { FieldName: 'MaxEndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.HoldRule.MaxEndDate', ApiField: 'MaxEndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8284,12 +8776,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.HoldRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8299,12 +8792,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.HoldRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8315,12 +8809,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.HoldRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8331,12 +8826,13 @@ export class MockSchemaService { { FieldName: 'NeedAuthorization', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.NeedAuthorization', ApiField: 'NeedAuthorization', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8347,12 +8843,13 @@ export class MockSchemaService { { FieldName: 'ReuseRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.ReuseRule', ApiField: 'ReuseRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8362,12 +8859,13 @@ export class MockSchemaService { { FieldName: 'EndDates', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.ReuseRule.EndDates', ApiField: 'EndDates', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8377,12 +8875,13 @@ export class MockSchemaService { { FieldName: 'InheritanceOrigin', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.ReuseRule.InheritanceOrigin', ApiField: 'InheritanceOrigin', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8392,12 +8891,13 @@ export class MockSchemaService { { FieldName: 'InheritedRuleIds', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.ReuseRule.InheritedRuleIds', ApiField: 'InheritedRuleIds', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8407,12 +8907,13 @@ export class MockSchemaService { { FieldName: 'MaxEndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.ReuseRule.MaxEndDate', ApiField: 'MaxEndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8422,12 +8923,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.ReuseRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8437,12 +8939,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.ReuseRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8453,12 +8956,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.ReuseRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8469,12 +8973,13 @@ export class MockSchemaService { { FieldName: 'StorageRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.StorageRule', ApiField: 'StorageRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8484,12 +8989,13 @@ export class MockSchemaService { { FieldName: 'EndDates', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.StorageRule.EndDates', ApiField: 'EndDates', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8499,12 +9005,13 @@ export class MockSchemaService { { FieldName: 'FinalAction', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.StorageRule.FinalAction', ApiField: 'FinalAction', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8515,12 +9022,13 @@ export class MockSchemaService { { FieldName: 'InheritanceOrigin', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.StorageRule.InheritanceOrigin', ApiField: 'InheritanceOrigin', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8530,12 +9038,13 @@ export class MockSchemaService { { FieldName: 'InheritedRuleIds', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.StorageRule.InheritedRuleIds', ApiField: 'InheritedRuleIds', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8545,12 +9054,13 @@ export class MockSchemaService { { FieldName: 'MaxEndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.StorageRule.MaxEndDate', ApiField: 'MaxEndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8560,12 +9070,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.StorageRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8575,12 +9086,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.StorageRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8591,12 +9103,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.StorageRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8607,12 +9120,13 @@ export class MockSchemaService { { FieldName: 'indexationDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_computedInheritedRules.indexationDate', ApiField: 'indexationDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8622,12 +9136,13 @@ export class MockSchemaService { { FieldName: 'inheritedRulesAPIOutput', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_computedInheritedRules.inheritedRulesAPIOutput', ApiField: 'inheritedRulesAPIOutput', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8637,12 +9152,13 @@ export class MockSchemaService { { FieldName: '_elimination', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_elimination', ApiField: '#elimination', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8652,12 +9168,13 @@ export class MockSchemaService { { FieldName: 'DestroyableOriginatingAgencies', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_elimination.DestroyableOriginatingAgencies', ApiField: 'DestroyableOriginatingAgencies', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8667,12 +9184,13 @@ export class MockSchemaService { { FieldName: 'ExtendedInfo', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_elimination.ExtendedInfo', ApiField: 'ExtendedInfo', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8682,12 +9200,13 @@ export class MockSchemaService { { FieldName: 'ExtendedInfoDetails', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_elimination.ExtendedInfo.ExtendedInfoDetails', ApiField: 'ExtendedInfoDetails', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8697,12 +9216,13 @@ export class MockSchemaService { { FieldName: 'DestroyableOriginatingAgencies', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_elimination.ExtendedInfo.ExtendedInfoDetails.DestroyableOriginatingAgencies', ApiField: 'DestroyableOriginatingAgencies', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8712,12 +9232,13 @@ export class MockSchemaService { { FieldName: 'HoldRuleIds', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_elimination.ExtendedInfo.ExtendedInfoDetails.HoldRuleIds', ApiField: 'HoldRuleIds', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8727,12 +9248,13 @@ export class MockSchemaService { { FieldName: 'NonDestroyableOriginatingAgencies', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_elimination.ExtendedInfo.ExtendedInfoDetails.NonDestroyableOriginatingAgencies', ApiField: 'NonDestroyableOriginatingAgencies', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8742,12 +9264,13 @@ export class MockSchemaService { { FieldName: 'OriginatingAgenciesInConflict', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_elimination.ExtendedInfo.ExtendedInfoDetails.OriginatingAgenciesInConflict', ApiField: 'OriginatingAgenciesInConflict', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8757,12 +9280,13 @@ export class MockSchemaService { { FieldName: 'ParentUnitId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_elimination.ExtendedInfo.ExtendedInfoDetails.ParentUnitId', ApiField: 'ParentUnitId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8772,12 +9296,13 @@ export class MockSchemaService { { FieldName: 'ExtendedInfoType', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_elimination.ExtendedInfo.ExtendedInfoType', ApiField: 'ExtendedInfoType', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8787,12 +9312,13 @@ export class MockSchemaService { { FieldName: 'GlobalStatus', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_elimination.GlobalStatus', ApiField: 'GlobalStatus', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8802,12 +9328,13 @@ export class MockSchemaService { { FieldName: 'NonDestroyableOriginatingAgencies', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_elimination.NonDestroyableOriginatingAgencies', ApiField: 'NonDestroyableOriginatingAgencies', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8817,12 +9344,13 @@ export class MockSchemaService { { FieldName: 'OperationId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_elimination.OperationId', ApiField: 'OperationId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8832,12 +9360,13 @@ export class MockSchemaService { { FieldName: '_glpd', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: false, Path: '_glpd', ApiField: '#graph_last_persisted_date', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8847,12 +9376,13 @@ export class MockSchemaService { { FieldName: '_graph', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: false, Path: '_graph', ApiField: '#graph', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8862,12 +9392,13 @@ export class MockSchemaService { { FieldName: '_history', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_history', ApiField: '#history', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8877,12 +9408,13 @@ export class MockSchemaService { { FieldName: 'data', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data', ApiField: 'data', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8892,12 +9424,13 @@ export class MockSchemaService { { FieldName: '_mgt', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._mgt', ApiField: '#management', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8907,12 +9440,13 @@ export class MockSchemaService { { FieldName: 'ClassificationRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._mgt.ClassificationRule', ApiField: 'ClassificationRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8922,12 +9456,13 @@ export class MockSchemaService { { FieldName: 'ClassificationAudience', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._mgt.ClassificationRule.ClassificationAudience', ApiField: 'ClassificationAudience', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8938,12 +9473,13 @@ export class MockSchemaService { { FieldName: 'ClassificationLevel', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._mgt.ClassificationRule.ClassificationLevel', ApiField: 'ClassificationLevel', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8954,12 +9490,13 @@ export class MockSchemaService { { FieldName: 'ClassificationOwner', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._mgt.ClassificationRule.ClassificationOwner', ApiField: 'ClassificationOwner', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8970,12 +9507,13 @@ export class MockSchemaService { { FieldName: 'ClassificationReassessingDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._mgt.ClassificationRule.ClassificationReassessingDate', ApiField: 'ClassificationReassessingDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -8986,12 +9524,13 @@ export class MockSchemaService { { FieldName: 'Inheritance', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._mgt.ClassificationRule.Inheritance', ApiField: 'Inheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9001,12 +9540,13 @@ export class MockSchemaService { { FieldName: 'PreventInheritance', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._mgt.ClassificationRule.Inheritance.PreventInheritance', ApiField: 'PreventInheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9017,12 +9557,13 @@ export class MockSchemaService { { FieldName: 'PreventRulesId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_history.data._mgt.ClassificationRule.Inheritance.PreventRulesId', ApiField: 'PreventRulesId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9033,12 +9574,13 @@ export class MockSchemaService { { FieldName: 'NeedReassessingAuthorization', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._mgt.ClassificationRule.NeedReassessingAuthorization', ApiField: 'NeedReassessingAuthorization', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9049,12 +9591,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_history.data._mgt.ClassificationRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9064,12 +9607,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._mgt.ClassificationRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9080,12 +9624,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._mgt.ClassificationRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9096,12 +9641,13 @@ export class MockSchemaService { { FieldName: 'StartDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._mgt.ClassificationRule.Rules.StartDate', ApiField: 'StartDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9112,12 +9658,13 @@ export class MockSchemaService { { FieldName: '_v', Type: 'LONG', + DataType: 'LONG', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.data._v', ApiField: '#version', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9127,12 +9674,13 @@ export class MockSchemaService { { FieldName: 'ud', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_history.ud', ApiField: 'ud', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9142,12 +9690,13 @@ export class MockSchemaService { { FieldName: '_id', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_id', ApiField: '#id', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9157,12 +9706,13 @@ export class MockSchemaService { { FieldName: '_implementationVersion', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_implementationVersion', ApiField: '#implementationVersion', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9172,12 +9722,13 @@ export class MockSchemaService { { FieldName: '_max', Type: 'LONG', + DataType: 'LONG', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_max', ApiField: '#max', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -9187,12 +9738,13 @@ export class MockSchemaService { { FieldName: '_mgt', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt', ApiField: '#management', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9202,12 +9754,13 @@ export class MockSchemaService { { FieldName: 'AccessRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AccessRule', ApiField: 'AccessRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9217,12 +9770,13 @@ export class MockSchemaService { { FieldName: 'Inheritance', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AccessRule.Inheritance', ApiField: 'Inheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9232,12 +9786,13 @@ export class MockSchemaService { { FieldName: 'PreventInheritance', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AccessRule.Inheritance.PreventInheritance', ApiField: 'PreventInheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9248,12 +9803,13 @@ export class MockSchemaService { { FieldName: 'PreventRulesId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.AccessRule.Inheritance.PreventRulesId', ApiField: 'PreventRulesId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9264,12 +9820,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.AccessRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9279,12 +9836,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AccessRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9295,12 +9853,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AccessRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9311,12 +9870,13 @@ export class MockSchemaService { { FieldName: 'StartDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AccessRule.Rules.StartDate', ApiField: 'StartDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9327,12 +9887,13 @@ export class MockSchemaService { { FieldName: 'AppraisalRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AppraisalRule', ApiField: 'AppraisalRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9342,12 +9903,13 @@ export class MockSchemaService { { FieldName: 'FinalAction', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AppraisalRule.FinalAction', ApiField: 'FinalAction', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9358,12 +9920,13 @@ export class MockSchemaService { { FieldName: 'Inheritance', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AppraisalRule.Inheritance', ApiField: 'Inheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9373,12 +9936,13 @@ export class MockSchemaService { { FieldName: 'PreventInheritance', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AppraisalRule.Inheritance.PreventInheritance', ApiField: 'PreventInheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9389,12 +9953,13 @@ export class MockSchemaService { { FieldName: 'PreventRulesId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.AppraisalRule.Inheritance.PreventRulesId', ApiField: 'PreventRulesId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9405,12 +9970,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.AppraisalRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9420,12 +9986,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AppraisalRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9436,12 +10003,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AppraisalRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9452,12 +10020,13 @@ export class MockSchemaService { { FieldName: 'StartDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.AppraisalRule.Rules.StartDate', ApiField: 'StartDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9468,12 +10037,13 @@ export class MockSchemaService { { FieldName: 'ClassificationRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ClassificationRule', ApiField: 'ClassificationRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9483,12 +10053,13 @@ export class MockSchemaService { { FieldName: 'ClassificationAudience', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ClassificationRule.ClassificationAudience', ApiField: 'ClassificationAudience', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9499,12 +10070,13 @@ export class MockSchemaService { { FieldName: 'ClassificationLevel', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ClassificationRule.ClassificationLevel', ApiField: 'ClassificationLevel', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9515,12 +10087,13 @@ export class MockSchemaService { { FieldName: 'ClassificationOwner', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ClassificationRule.ClassificationOwner', ApiField: 'ClassificationOwner', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9531,12 +10104,13 @@ export class MockSchemaService { { FieldName: 'ClassificationReassessingDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ClassificationRule.ClassificationReassessingDate', ApiField: 'ClassificationReassessingDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9547,12 +10121,13 @@ export class MockSchemaService { { FieldName: 'Inheritance', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ClassificationRule.Inheritance', ApiField: 'Inheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9562,12 +10137,13 @@ export class MockSchemaService { { FieldName: 'PreventInheritance', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ClassificationRule.Inheritance.PreventInheritance', ApiField: 'PreventInheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9578,12 +10154,13 @@ export class MockSchemaService { { FieldName: 'PreventRulesId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.ClassificationRule.Inheritance.PreventRulesId', ApiField: 'PreventRulesId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9594,12 +10171,13 @@ export class MockSchemaService { { FieldName: 'NeedReassessingAuthorization', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ClassificationRule.NeedReassessingAuthorization', ApiField: 'NeedReassessingAuthorization', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9610,12 +10188,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.ClassificationRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9625,12 +10204,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ClassificationRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9641,12 +10221,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ClassificationRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9657,12 +10238,13 @@ export class MockSchemaService { { FieldName: 'StartDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ClassificationRule.Rules.StartDate', ApiField: 'StartDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9673,12 +10255,13 @@ export class MockSchemaService { { FieldName: 'DisseminationRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.DisseminationRule', ApiField: 'DisseminationRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9688,12 +10271,13 @@ export class MockSchemaService { { FieldName: 'Inheritance', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.DisseminationRule.Inheritance', ApiField: 'Inheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9703,12 +10287,13 @@ export class MockSchemaService { { FieldName: 'PreventInheritance', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.DisseminationRule.Inheritance.PreventInheritance', ApiField: 'PreventInheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9719,12 +10304,13 @@ export class MockSchemaService { { FieldName: 'PreventRulesId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.DisseminationRule.Inheritance.PreventRulesId', ApiField: 'PreventRulesId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9735,12 +10321,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.DisseminationRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9750,12 +10337,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.DisseminationRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9766,12 +10354,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.DisseminationRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9782,12 +10371,13 @@ export class MockSchemaService { { FieldName: 'StartDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.DisseminationRule.Rules.StartDate', ApiField: 'StartDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9798,12 +10388,13 @@ export class MockSchemaService { { FieldName: 'HoldRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.HoldRule', ApiField: 'HoldRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9813,12 +10404,13 @@ export class MockSchemaService { { FieldName: 'Inheritance', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.HoldRule.Inheritance', ApiField: 'Inheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9828,12 +10420,13 @@ export class MockSchemaService { { FieldName: 'PreventInheritance', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.HoldRule.Inheritance.PreventInheritance', ApiField: 'PreventInheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9844,12 +10437,13 @@ export class MockSchemaService { { FieldName: 'PreventRulesId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.HoldRule.Inheritance.PreventRulesId', ApiField: 'PreventRulesId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9860,12 +10454,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.HoldRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9875,12 +10470,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.HoldRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9891,12 +10487,13 @@ export class MockSchemaService { { FieldName: 'HoldEndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.HoldRule.Rules.HoldEndDate', ApiField: 'HoldEndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9907,12 +10504,13 @@ export class MockSchemaService { { FieldName: 'HoldOwner', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.HoldRule.Rules.HoldOwner', ApiField: 'HoldOwner', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9923,12 +10521,13 @@ export class MockSchemaService { { FieldName: 'HoldReason', Type: 'TEXT', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.HoldRule.Rules.HoldReason', ApiField: 'HoldReason', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9939,12 +10538,13 @@ export class MockSchemaService { { FieldName: 'HoldReassessingDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.HoldRule.Rules.HoldReassessingDate', ApiField: 'HoldReassessingDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9955,12 +10555,13 @@ export class MockSchemaService { { FieldName: 'PreventRearrangement', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.HoldRule.Rules.PreventRearrangement', ApiField: 'PreventRearrangement', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9971,12 +10572,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.HoldRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -9987,12 +10589,13 @@ export class MockSchemaService { { FieldName: 'StartDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.HoldRule.Rules.StartDate', ApiField: 'StartDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10003,12 +10606,13 @@ export class MockSchemaService { { FieldName: 'NeedAuthorization', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.NeedAuthorization', ApiField: 'NeedAuthorization', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10019,12 +10623,13 @@ export class MockSchemaService { { FieldName: 'ReuseRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ReuseRule', ApiField: 'ReuseRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10034,12 +10639,13 @@ export class MockSchemaService { { FieldName: 'Inheritance', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ReuseRule.Inheritance', ApiField: 'Inheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10049,12 +10655,13 @@ export class MockSchemaService { { FieldName: 'PreventInheritance', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ReuseRule.Inheritance.PreventInheritance', ApiField: 'PreventInheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10065,12 +10672,13 @@ export class MockSchemaService { { FieldName: 'PreventRulesId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.ReuseRule.Inheritance.PreventRulesId', ApiField: 'PreventRulesId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10081,12 +10689,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.ReuseRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10096,12 +10705,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ReuseRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10112,12 +10722,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ReuseRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10128,12 +10739,13 @@ export class MockSchemaService { { FieldName: 'StartDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.ReuseRule.Rules.StartDate', ApiField: 'StartDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10144,12 +10756,13 @@ export class MockSchemaService { { FieldName: 'StorageRule', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.StorageRule', ApiField: 'StorageRule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10159,12 +10772,13 @@ export class MockSchemaService { { FieldName: 'FinalAction', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.StorageRule.FinalAction', ApiField: 'FinalAction', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10175,12 +10789,13 @@ export class MockSchemaService { { FieldName: 'Inheritance', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.StorageRule.Inheritance', ApiField: 'Inheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10190,12 +10805,13 @@ export class MockSchemaService { { FieldName: 'PreventInheritance', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.StorageRule.Inheritance.PreventInheritance', ApiField: 'PreventInheritance', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10206,12 +10822,13 @@ export class MockSchemaService { { FieldName: 'PreventRulesId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.StorageRule.Inheritance.PreventRulesId', ApiField: 'PreventRulesId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10222,12 +10839,13 @@ export class MockSchemaService { { FieldName: 'Rules', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_mgt.StorageRule.Rules', ApiField: 'Rules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10237,12 +10855,13 @@ export class MockSchemaService { { FieldName: 'EndDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.StorageRule.Rules.EndDate', ApiField: 'EndDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10253,12 +10872,13 @@ export class MockSchemaService { { FieldName: 'Rule', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.StorageRule.Rules.Rule', ApiField: 'Rule', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10269,12 +10889,13 @@ export class MockSchemaService { { FieldName: 'StartDate', Type: 'DATE', + DataType: 'DATETIME', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_mgt.StorageRule.Rules.StartDate', ApiField: 'StartDate', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'MANAGEMENT', @@ -10285,12 +10906,13 @@ export class MockSchemaService { { FieldName: '_min', Type: 'LONG', + DataType: 'LONG', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_min', ApiField: '#min', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10300,12 +10922,13 @@ export class MockSchemaService { { FieldName: '_og', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_og', ApiField: '#object', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10315,12 +10938,13 @@ export class MockSchemaService { { FieldName: '_opi', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_opi', ApiField: '#opi', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10330,12 +10954,13 @@ export class MockSchemaService { { FieldName: '_ops', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_ops', ApiField: '#operations', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10345,12 +10970,13 @@ export class MockSchemaService { { FieldName: '_opts', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_opts', ApiField: '#opts', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10360,12 +10986,13 @@ export class MockSchemaService { { FieldName: '_sedaVersion', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_sedaVersion', ApiField: '#sedaVersion', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10375,12 +11002,13 @@ export class MockSchemaService { { FieldName: '_sp', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE_REQUIRED', Indexed: true, Path: '_sp', ApiField: '#originating_agency', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['INTERNE'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -10391,12 +11019,13 @@ export class MockSchemaService { { FieldName: '_sps', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY_REQUIRED', Indexed: true, Path: '_sps', ApiField: '#originating_agencies', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['INTERNE'], StringSize: 'SHORT', Category: 'DESCRIPTION', @@ -10406,12 +11035,13 @@ export class MockSchemaService { { FieldName: '_storage', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_storage', ApiField: '#storage', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10421,12 +11051,13 @@ export class MockSchemaService { { FieldName: '_nbc', Type: 'LONG', + DataType: 'LONG', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_storage._nbc', ApiField: '#nbc', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10436,12 +11067,13 @@ export class MockSchemaService { { FieldName: 'offerIds', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_storage.offerIds', ApiField: 'offerIds', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10451,12 +11083,13 @@ export class MockSchemaService { { FieldName: 'strategyId', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_storage.strategyId', ApiField: 'strategyId', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10466,12 +11099,13 @@ export class MockSchemaService { { FieldName: '_tenant', Type: 'LONG', + DataType: 'LONG', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_tenant', ApiField: '#tenant', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10481,12 +11115,13 @@ export class MockSchemaService { { FieldName: '_uds', Type: 'OBJECT', + DataType: 'OBJECT', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_uds', ApiField: '#uds', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10496,12 +11131,13 @@ export class MockSchemaService { { FieldName: '_unitType', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_unitType', ApiField: '#unitType', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10511,12 +11147,13 @@ export class MockSchemaService { { FieldName: '_up', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_up', ApiField: '#unitups', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10526,12 +11163,13 @@ export class MockSchemaService { { FieldName: '_us', Type: 'KEYWORD', + DataType: 'STRING', Origin: 'INTERNAL', Cardinality: 'MANY', Indexed: true, Path: '_us', ApiField: '#allunitups', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', @@ -10541,12 +11179,13 @@ export class MockSchemaService { { FieldName: '_validComputedInheritedRules', Type: 'BOOLEAN', + DataType: 'BOOLEAN', Origin: 'INTERNAL', Cardinality: 'ONE', Indexed: true, Path: '_validComputedInheritedRules', ApiField: '#validComputedInheritedRules', - Collection: 'Unit', + Collection: Collection.ARCHIVE_UNIT, SedaVersions: ['2.1', '2.2', '2.3'], StringSize: 'SHORT', Category: 'OTHER', diff --git a/ui/ui-frontend-common/src/app/modules/object-viewer/services/schema-strategy-display-object.service.ts b/ui/ui-frontend-common/src/app/modules/object-viewer/services/schema-strategy-display-object.service.ts index e4e410ebc78..85e6194f282 100644 --- a/ui/ui-frontend-common/src/app/modules/object-viewer/services/schema-strategy-display-object.service.ts +++ b/ui/ui-frontend-common/src/app/modules/object-viewer/services/schema-strategy-display-object.service.ts @@ -204,12 +204,14 @@ export class SchemaStrategyDisplayObjectService implements DisplayObjectService } private hideSchemaCategoryDisplayObjects(displayObject: DisplayObject, schema: Schema, categories: string[]): void { - const dataPath = displayObject.displayRule.Path; - const schemaPath = this.displayRuleHelper.convertDataPathToSchemaPath(dataPath); - const schemaElement = schema.find((se) => se.ApiPath === schemaPath); - - if (Boolean(schemaElement) && categories.includes(schemaElement.Category)) { - displayObject.displayRule = { ...displayObject.displayRule, ui: { ...displayObject.displayRule.ui, display: false } }; + if (displayObject.displayRule.Path) { + const dataPath = displayObject.displayRule.Path; + const schemaPath = this.displayRuleHelper.convertDataPathToSchemaPath(dataPath); + const schemaElement = schema.find((se) => se.ApiPath === schemaPath); + + if (Boolean(schemaElement) && categories.includes(schemaElement.Category)) { + displayObject.displayRule = { ...displayObject.displayRule, ui: { ...displayObject.displayRule.ui, display: false } }; + } } displayObject.children.forEach((child) => this.hideSchemaCategoryDisplayObjects(child, schema, categories)); @@ -226,13 +228,19 @@ export class SchemaStrategyDisplayObjectService implements DisplayObjectService } private fillDisplayObjectLabelsWithSchemaShortNames(displayObject: DisplayObject, schema: Schema) { - const dataPath = displayObject.displayRule.Path; - const schemaPath = this.displayRuleHelper.convertDataPathToSchemaPath(dataPath); - const schemaElement = schema.find((se) => se.ApiPath === schemaPath); - - if (Boolean(schemaElement)) { - displayObject.displayRule = { ...displayObject.displayRule, ui: { ...displayObject.displayRule.ui, label: schemaElement.ShortName } }; + if (displayObject.displayRule.Path) { + const dataPath = displayObject.displayRule.Path; + const schemaPath = this.displayRuleHelper.convertDataPathToSchemaPath(dataPath); + const schemaElement = schema.find((se) => se.ApiPath === schemaPath); + + if (Boolean(schemaElement)) { + displayObject.displayRule = { + ...displayObject.displayRule, + ui: { ...displayObject.displayRule.ui, label: schemaElement.ShortName }, + }; + } } + displayObject.children.forEach((child) => this.fillDisplayObjectLabelsWithSchemaShortNames(child, schema)); } diff --git a/ui/ui-frontend-common/src/app/modules/object-viewer/services/type.service.ts b/ui/ui-frontend-common/src/app/modules/object-viewer/services/type.service.ts index 904687d9408..2c2b6b081ed 100644 --- a/ui/ui-frontend-common/src/app/modules/object-viewer/services/type.service.ts +++ b/ui/ui-frontend-common/src/app/modules/object-viewer/services/type.service.ts @@ -37,7 +37,9 @@ import { Injectable } from '@angular/core'; import { DisplayObjectType } from '../types'; -@Injectable() +@Injectable({ + providedIn: 'root', +}) export class TypeService { public isPrimitive(value: any): boolean { const type = typeof value; diff --git a/ui/ui-frontend-common/src/app/modules/vitamui-common.module.ts b/ui/ui-frontend-common/src/app/modules/vitamui-common.module.ts index bbc53a8f4e1..ae8439c6140 100644 --- a/ui/ui-frontend-common/src/app/modules/vitamui-common.module.ts +++ b/ui/ui-frontend-common/src/app/modules/vitamui-common.module.ts @@ -108,6 +108,7 @@ import { ErrorDialogComponent } from './error-dialog/error-dialog.component'; import { ENVIRONMENT, SUBROGRATION_REFRESH_RATE_MS, WINDOW_LOCATION } from './injection-tokens'; import { LogbookModule } from './logbook/logbook.module'; import { LoggerModule } from './logger/logger.module'; +import { ObjectEditorModule } from './object-editor/object-editor.module'; import { ObjectViewerModule } from './object-viewer/object-viewer.module'; import { PipesModule } from './pipes/pipes.module'; import { SecurityModule } from './security/security.module'; @@ -172,6 +173,7 @@ export function startupServiceFactory(startupService: StartupService, authServic MatSnackBarModule, NavbarModule, ObjectViewerModule, + ObjectEditorModule, OrderByButtonModule, OrderDropdownModule, PipesModule, @@ -235,6 +237,7 @@ export function startupServiceFactory(startupService: StartupService, authServic LoggerModule, NavbarModule, ObjectViewerModule, + ObjectEditorModule, OrderByButtonModule, OrderDropdownModule, PipesModule, diff --git a/ui/ui-frontend-common/src/assets/shared-i18n/en.json b/ui/ui-frontend-common/src/assets/shared-i18n/en.json index 73d7076f8e5..c52f33c97ae 100644 --- a/ui/ui-frontend-common/src/assets/shared-i18n/en.json +++ b/ui/ui-frontend-common/src/assets/shared-i18n/en.json @@ -4507,6 +4507,37 @@ "Thumbnail": "Thumbnail" } }, + "ARCHIVE_UNIT": { + "DIALOGS": { + "SAVE": { + "TITLE": "Edit Descriptive Metadata", + "CONTENT": "Have you completed all modifications to the descriptive metadata of the archival unit before saving ?", + "BUTTONS": { + "CONFIRM": "CONFIRM SAVE", + "CANCEL": "RETURN TO INPUT" + }, + "MESSAGES": { + "SUCCESS": "The request to modify the archival unit has been successfully sent", + "FAILURE": "" + } + }, + "CANCEL": { + "TITLE": "Save Pending Changes", + "CONTENT": "You have made modifications to the descriptive metadata of the archival unit. Do you wish to save or cancel them ?", + "BUTTONS": { + "CONFIRM": "SAVE", + "CANCEL": "CANCEL MODIFICATIONS" + }, + "MESSAGES": { + "SUCCESS": "", + "FAILURE": "" + } + } + }, + "EDITOR_BANNER": { + "TITLE": "EDIT MODE (MODIFICATION AND COMPLETION) - VERSION {{sedaVersion}} SEDA" + } + }, "UNIT_UPDATE": { "CLASS": "Class", "CLOSE": "CLOSE", @@ -4528,7 +4559,7 @@ "SUBFONDS": "Subfonds", "SUBGRP": "SubGrp", "SUBSERIES": "Subseries", - "UPDATE_DESC_METADATA": " Mettre à jour les metadonnées descriptives" + "UPDATE_DESC_METADATA": "Update descriptive metadata" }, "PERSISTENT_IDENTIFIER_SEARCH": { "SEARCH_PLACEHOLDER": "Search for an archive unit or technical object by permanent identifier", @@ -4676,5 +4707,10 @@ } } }, - "TAB.DESCRIPTION": "Description" + "TAB.DESCRIPTION": "Description", + "DISPLAY_RULE": { + "OTHER_METADATA": { + "LABEL": "Other metadata" + } + } } diff --git a/ui/ui-frontend-common/src/assets/shared-i18n/fr.json b/ui/ui-frontend-common/src/assets/shared-i18n/fr.json index 030448994fc..9c33a34fee1 100644 --- a/ui/ui-frontend-common/src/assets/shared-i18n/fr.json +++ b/ui/ui-frontend-common/src/assets/shared-i18n/fr.json @@ -4764,12 +4764,43 @@ "GEL": "Gel / Dégel" } }, + "ARCHIVE_UNIT": { + "DIALOGS": { + "SAVE": { + "TITLE": "Modifier les métadonnées descriptives", + "CONTENT": "Avez-vous effectué l'ensemble des modifications des métadonnées descriptives de l'unité archivistique avant leur enregistrement ?", + "BUTTONS": { + "CONFIRM": "CONFIRMER L'ENREGISTREMENT", + "CANCEL": "REVENIR À LA SAISIE" + }, + "MESSAGES": { + "SUCCESS": "La demande de modification de l'unité archivistique a bien été envoyée", + "FAILURE": "" + } + }, + "CANCEL": { + "TITLE": "Sauvegarder les modifications en cours", + "CONTENT": "Vous avez effectué des modifications sur les métadonnées descriptives de l'unité archivistique. Souhaitez-vous les enregistrer ou les annuler ?", + "BUTTONS": { + "CONFIRM": "ENREGISTRER", + "CANCEL": "ANNULER LES MODIFICATIONS" + }, + "MESSAGES": { + "SUCCESS": "", + "FAILURE": "" + } + } + }, + "EDITOR_BANNER": { + "TITLE": "MODE EDITION (MODIFICATION ET COMPLÉTION) - VERSION {{sedaVersion}} SEDA" + } + }, "UNIT_UPDATE": { "EXECUTE_UNIT_UPDATE_MESSAGE": "La demande de mise à jour d'unité archivistique a bien été envoyée", "MESSAGE": "Voulez-vous confirmer la mise à jour des métadonnées de cette unité archivistique ?", "HINT": "Validation de mise à jour", "NO_PERMISSION": "Votre contrat d'accès n'autorise pas cette action", - "UPDATE_DESC_METADATA": " Mettre à jour les metadonnées descriptives", + "UPDATE_DESC_METADATA": "Modifier les metadonnées descriptives", "CLOSE": "FERMER", "CONFIRM_CLOSE": "Les données modifiées ne seront pas sauvegardées. Êtes-vous sûr de vouloir fermer la fenêtre ?", "CLOSE_WINDOW_HINT": "Quitter la mise à jour", @@ -5524,5 +5555,10 @@ } } }, - "TAB.DESCRIPTION": "Description" + "TAB.DESCRIPTION": "Description", + "DISPLAY_RULE": { + "OTHER_METADATA": { + "LABEL": "Autres métadonnées" + } + } } diff --git a/ui/ui-frontend/package-lock.json b/ui/ui-frontend/package-lock.json index 185b955f3d8..cf773398461 100644 --- a/ui/ui-frontend/package-lock.json +++ b/ui/ui-frontend/package-lock.json @@ -19271,7 +19271,7 @@ "node_modules/ui-frontend-common": { "version": "2.1.58", "resolved": "file:../ui-frontend-common/ui-frontend-common-2.1.58.tgz", - "integrity": "sha512-UbB+WehH7XZW/mIsa1WDpHwE5BZvPcRQKcuw5qiocgMb1mnNSy26naXcNwxtlafTs+UfU7LkKE7RRVlpk2z8xg==", + "integrity": "sha512-9bCahNwWj/oZ9YGV42BNiQYvChZhnXbItJ4U4BMPf1H0qEYfzVpz5PbsJY27bDFj/npRDg5zttLBrkRaoJFeNg==", "dependencies": { "@angular/material-moment-adapter": "^10.2.3", "@ngx-translate/core": "13.0.0", @@ -35045,7 +35045,7 @@ }, "ui-frontend-common": { "version": "file:../ui-frontend-common/ui-frontend-common-2.1.58.tgz", - "integrity": "sha512-UbB+WehH7XZW/mIsa1WDpHwE5BZvPcRQKcuw5qiocgMb1mnNSy26naXcNwxtlafTs+UfU7LkKE7RRVlpk2z8xg==", + "integrity": "sha512-9bCahNwWj/oZ9YGV42BNiQYvChZhnXbItJ4U4BMPf1H0qEYfzVpz5PbsJY27bDFj/npRDg5zttLBrkRaoJFeNg==", "requires": { "@angular/material-moment-adapter": "^10.2.3", "@ngx-translate/core": "13.0.0", diff --git a/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-preview.component.html b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-preview.component.html index ea7e05d084b..ee4343ed0fd 100644 --- a/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-preview.component.html +++ b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-preview.component.html @@ -44,7 +44,7 @@ - + diff --git a/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-unit-description-tab/archive-unit-description-tab.component.html b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-unit-description-tab/archive-unit-description-tab.component.html new file mode 100644 index 00000000000..3db3b6dd46c --- /dev/null +++ b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-unit-description-tab/archive-unit-description-tab.component.html @@ -0,0 +1,51 @@ + + +
+ + + + + +
+ + + +
+ {{ 'ARCHIVE_UNIT.DIALOGS.SAVE.TITLE' | translate }} +
+ +
+ {{ 'ARCHIVE_UNIT.DIALOGS.SAVE.CONTENT' | translate }} +
+
+
+ + + + +
+ + + +
+ {{ 'ARCHIVE_UNIT.DIALOGS.CANCEL.TITLE' | translate }} +
+ +
+ {{ 'ARCHIVE_UNIT.DIALOGS.CANCEL.CONTENT' | translate }} +
+
+
+ + + + +
diff --git a/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-unit-description-tab/archive-unit-description-tab.component.scss b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-unit-description-tab/archive-unit-description-tab.component.scss new file mode 100644 index 00000000000..318596f7995 --- /dev/null +++ b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-unit-description-tab/archive-unit-description-tab.component.scss @@ -0,0 +1,25 @@ +button { + &.save { + background-color: white; + color: var(--vitamui-primary); + } + + &.cancel { + background-color: transparent; + color: white; + box-shadow: none; + border: none; + } +} + +.editor-banner { + margin-left: -40px; + margin-right: -40px; + position: sticky; + z-index: 10; + top: -20px; +} + +.margin-btn { + margin-right: 1rem; +} diff --git a/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-unit-description-tab/archive-unit-description-tab.component.ts b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-unit-description-tab/archive-unit-description-tab.component.ts new file mode 100644 index 00000000000..57f2b5a9213 --- /dev/null +++ b/ui/ui-frontend/projects/archive-search/src/app/archive/archive-preview/archive-unit-description-tab/archive-unit-description-tab.component.ts @@ -0,0 +1,123 @@ +import { Component, EventEmitter, Input, OnDestroy, Output, TemplateRef, ViewChild } from '@angular/core'; +import { MatDialog, MatDialogConfig } from '@angular/material/dialog'; +import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; +import { ActivatedRoute } from '@angular/router'; +import { TranslateService } from '@ngx-translate/core'; +import { Subscription, throwError } from 'rxjs'; +import { filter, switchMap } from 'rxjs/operators'; +import { ArchiveUnit, ArchiveUnitEditorComponent, Logger, StartupService } from 'ui-frontend-common'; +import { EditObject } from 'ui-frontend-common/app/modules/object-editor/models/edit-object.model'; +import { VitamUISnackBarComponent } from '../../shared/vitamui-snack-bar'; + +@Component({ + selector: 'app-archive-unit-description-tab', + templateUrl: './archive-unit-description-tab.component.html', + styleUrls: ['./archive-unit-description-tab.component.scss'], +}) +export class ArchiveUnitDescriptionTabComponent implements OnDestroy { + @Input() archiveUnit: ArchiveUnit; + @Input() editMode = false; + @Output() editModeChange = new EventEmitter(); + + @ViewChild('updateDialog') updateDialog: TemplateRef; + @ViewChild('cancelDialog') cancelDialog: TemplateRef; + + archiveUnitEditor: ArchiveUnitEditorComponent; + editObject: EditObject; + + private readonly subscriptions = new Subscription(); + private readonly dialogConfig: MatDialogConfig = { panelClass: 'vitamui-dialog' }; + private readonly snackBarConfig: MatSnackBarConfig = { + panelClass: 'vitamui-snack-bar', + data: { + type: 'WorkflowSuccessSnackBar', + }, + duration: 100000, + }; + + constructor( + private logger: Logger, + private dialog: MatDialog, + private snackBar: MatSnackBar, + private startupService: StartupService, + private translateService: TranslateService, + private route: ActivatedRoute, + ) {} + + ngOnDestroy(): void { + this.subscriptions.unsubscribe(); + } + + @ViewChild(ArchiveUnitEditorComponent) set editor(editor: ArchiveUnitEditorComponent) { + if (editor) { + this.archiveUnitEditor = editor; + + const subscription = this.archiveUnitEditor?.editObject$.subscribe((editObject) => { + this.editObject = editObject; + }); + + if (subscription) this.subscriptions.add(subscription); + } + } + + onCancel(): void { + if (this.editObject?.control?.pristine) return this.backToDisplayMode(); + + this.subscriptions.add( + this.dialog + .open(this.cancelDialog, this.dialogConfig) + .afterClosed() + .pipe( + switchMap((result) => { + if (result) return this.archiveUnitEditor.update(); + + return throwError(result); + }), + ) + .subscribe( + ({ operationId }) => this.handleUpdateSuccess({ operationId }), + () => this.backToDisplayMode(), + ), + ); + } + + onSave(): void { + this.subscriptions.add( + this.dialog + .open(this.updateDialog, this.dialogConfig) + .afterClosed() + .pipe( + filter((result) => !!result), + switchMap(() => this.archiveUnitEditor.update()), + ) + .subscribe(({ operationId }) => this.handleUpdateSuccess({ operationId })), + ); + } + + private handleUpdateSuccess({ operationId }: { operationId: String }): void { + const tenantId = this.route.snapshot.params.tenantIdentifier; + + if (!operationId) return this.logger.error(this, 'Operation id is mandatory to build logbook operation link'); + if (!tenantId) return this.logger.error(this, 'Tenant id is mandatory to build logbook operation link'); + + const serviceUrl = `${this.startupService.getReferentialUrl()}/logbook-operation/tenant/${tenantId}?guid=${operationId}`; + const translationKey = 'ARCHIVE_UNIT.DIALOGS.SAVE.MESSAGES.SUCCESS'; + const message = this.translateService.instant(translationKey); + + this.snackBar.openFromComponent(VitamUISnackBarComponent, { + ...this.snackBarConfig, + data: { + ...this.snackBarConfig.data, + message, + serviceUrl, + }, + }); + this.editObject.control.markAsPristine(); + } + + private backToDisplayMode(): void { + this.archiveUnit = { ...this.archiveUnit }; + this.editMode = false; + this.editModeChange.emit(this.editMode); + } +} diff --git a/ui/ui-frontend/projects/archive-search/src/app/archive/archive.module.ts b/ui/ui-frontend/projects/archive-search/src/app/archive/archive.module.ts index 3f377ba8f8a..b2952bf5f48 100644 --- a/ui/ui-frontend/projects/archive-search/src/app/archive/archive.module.ts +++ b/ui/ui-frontend/projects/archive-search/src/app/archive/archive.module.ts @@ -62,6 +62,7 @@ import { ArchiveApiService } from '../core/api/archive-api.service'; import { ArchiveSharedDataService } from '../core/archive-shared-data.service'; import { ManagementRulesSharedDataService } from '../core/management-rules-shared-data.service'; import { ArchivePreviewComponent } from './archive-preview/archive-preview.component'; +import { ArchiveUnitDescriptionTabComponent } from './archive-preview/archive-unit-description-tab/archive-unit-description-tab.component'; import { ArchiveUnitInformationTabComponent } from './archive-preview/archive-unit-information-tab/archive-unit-information-tab.component'; import { ArchiveUnitObjectsDetailsTabComponent } from './archive-preview/archive-unit-objects-details-tab/archive-unit-objects-details-tab.component'; import { ArchiveUnitRulesDetailsTabComponent } from './archive-preview/archive-unit-rules-details-tab/archive-unit-rules-details-tab.component'; @@ -194,6 +195,7 @@ import { ManagementRulesValidatorService } from './validators/management-rules-v ReclassificationComponent, DeleteUnitRulesComponent, ArchiveUnitInformationTabComponent, + ArchiveUnitDescriptionTabComponent, ArchiveUnitRulesDetailsTabComponent, ArchiveUnitObjectsDetailsTabComponent, ArchiveUnitRulesInformationsTabComponent, diff --git a/ui/ui-frontend/projects/archive-search/src/app/archive/archive.service.ts b/ui/ui-frontend/projects/archive-search/src/app/archive/archive.service.ts index 1bce28851a9..19cba5e6832 100644 --- a/ui/ui-frontend/projects/archive-search/src/app/archive/archive.service.ts +++ b/ui/ui-frontend/projects/archive-search/src/app/archive/archive.service.ts @@ -60,10 +60,10 @@ import { SecurityService, Unit, } from 'ui-frontend-common'; +import { ArchiveUnit } from 'ui-frontend-common/app/modules/archive/models/archive-unit'; +import { JsonPatchDto, MultiJsonPatchDto } from 'ui-frontend-common/app/modules/archive/models/json-patch'; import { ArchiveApiService } from '../core/api/archive-api.service'; -import { ArchiveUnit } from './models/archive-unit'; import { ExportDIPRequestDto, TransferRequestDto } from './models/dip.interface'; -import { JsonPatchDto, MultiJsonPatchDto } from './models/json-patch'; import { ReclassificationCriteriaDto } from './models/reclassification-request.interface'; import { RuleSearchCriteriaDto } from './models/ruleAction.interface'; import { UnitDescriptiveMetadataDto } from './models/unitDescriptiveMetadata.interface'; diff --git a/ui/ui-frontend/projects/archive-search/src/app/core/api/archive-api.service.ts b/ui/ui-frontend/projects/archive-search/src/app/core/api/archive-api.service.ts index 2134c3bd6a4..4366799889a 100644 --- a/ui/ui-frontend/projects/archive-search/src/app/core/api/archive-api.service.ts +++ b/ui/ui-frontend/projects/archive-search/src/app/core/api/archive-api.service.ts @@ -50,9 +50,9 @@ import { SearchResponse, Unit, } from 'ui-frontend-common'; -import { ArchiveUnit } from '../../archive/models/archive-unit'; +import { ArchiveUnit } from 'ui-frontend-common/app/modules/archive/models/archive-unit'; +import { JsonPatchDto, MultiJsonPatchDto } from 'ui-frontend-common/app/modules/archive/models/json-patch'; import { ExportDIPRequestDto, TransferRequestDto } from '../../archive/models/dip.interface'; -import { JsonPatchDto, MultiJsonPatchDto } from '../../archive/models/json-patch'; import { ReclassificationCriteriaDto } from '../../archive/models/reclassification-request.interface'; import { RuleSearchCriteriaDto } from '../../archive/models/ruleAction.interface'; import { UnitDescriptiveMetadataDto } from '../../archive/models/unitDescriptiveMetadata.interface'; diff --git a/ui/ui-frontend/proxy-gateway.conf.js b/ui/ui-frontend/proxy-gateway.conf.js index 881a6b81f6f..ec4798c62c3 100644 --- a/ui/ui-frontend/proxy-gateway.conf.js +++ b/ui/ui-frontend/proxy-gateway.conf.js @@ -108,11 +108,7 @@ const PROXY_CONFIG = [ { // archive-search to Referential External Backend - context: [ - '/archive-search-api/security-profile', - '/archive-search-api/ontology', - '/archive-search-api/schemas', - ], + context: ['/archive-search-api/security-profile', '/archive-search-api/ontology', '/archive-search-api/schemas'], target: { protocol: 'https:', host: 'localhost', @@ -162,7 +158,7 @@ const PROXY_CONFIG = [ }, }, { - context: ['/archive-search-api/archive-search'], + context: ['/archive-search-api/archive-search', '/archive-search-api/archive-units'], target: { protocol: 'https:', host: 'localhost', @@ -177,14 +173,12 @@ const PROXY_CONFIG = [ '^/archive-search-api/archive-search/searchcriteriahistory': '/searchcriteriahistory', '^/archive-search-api/archive-search/filingholdingscheme': '/archives-search/filling-holding-schema', '^/archive-search-api/archive-search/': '/archives-search/', + '^/archive-search-api/archive-units': '/archive-units', }, }, { // Pastis to Referential External Backend - context: [ - '/pastis-api/archival-profile', - '/pastis-api/profile', - ], + context: ['/pastis-api/archival-profile', '/pastis-api/profile'], target: { protocol: 'https:', host: 'localhost', @@ -277,11 +271,7 @@ const PROXY_CONFIG = [ }, { // collect to Referential External Backend - context: [ - '/collect-api/ontology', - '/collect-api/search/filingplan', - '/collect-api/schemas', - ], + context: ['/collect-api/ontology', '/collect-api/search/filingplan', '/collect-api/schemas'], target: { protocol: 'https:', host: 'localhost', @@ -299,10 +289,7 @@ const PROXY_CONFIG = [ }, }, { - context: [ - '/collect-api/projects', - '/collect-api/transactions', - ], + context: ['/collect-api/projects', '/collect-api/transactions'], target: { protocol: 'https:', host: 'localhost', @@ -318,17 +305,17 @@ const PROXY_CONFIG = [ '^/collect-api/projects': '/collect-api/v1/projects', '^/collect-api/projects/object-groups': '/collect-api/v1/projects/object-groups', '^/collect-api/transactions/archive-units/([^/]+)/search': '/collect-api/v1/transactions/$1/archive-units', - '^/collect-api/transactions/archive-units/([^/]+)/export-csv-search': '/collect-api/v1/transactions/$1/archive-units/export-csv-search', - '^/collect-api/transactions/archive-units/([^/]+)/update-units-metadata': '/collect-api/v1/transactions/$1/archive-units/update-units-metadata', + '^/collect-api/transactions/archive-units/([^/]+)/export-csv-search': + '/collect-api/v1/transactions/$1/archive-units/export-csv-search', + '^/collect-api/transactions/archive-units/([^/]+)/update-units-metadata': + '/collect-api/v1/transactions/$1/archive-units/update-units-metadata', '^/collect-api/transactions/archive-units': '/collect-api/v1/transactions', '^/collect-api/transactions': '/collect-api/v1/transactions', - } + }, }, { // ingest to Referential External Backend - context: [ - '/ingest-api/ontology' - ], + context: ['/ingest-api/ontology'], target: { protocol: 'https:', host: 'localhost', @@ -386,9 +373,9 @@ const PROXY_CONFIG = [ secure: false, logLevel: 'debug', pathRewrite: { - '^/ingest-api/': '/v1/' + '^/ingest-api/': '/v1/', }, - } + }, ]; module.exports = PROXY_CONFIG;