From c55f160d9be742acce13ebc5a30c0264b72caca7 Mon Sep 17 00:00:00 2001 From: amentis Date: Tue, 20 Feb 2024 14:58:16 +0200 Subject: [PATCH] add semantics controller --- .../java/eu/eudat/audit/AuditableAction.java | 3 +- ...anticsLookup.java => SemanticsLookup.java} | 2 +- .../DescriptionTemplateService.java | 4 - .../DescriptionTemplateServiceImpl.java | 39 --------- .../Semantic.java | 2 +- .../service/semantic/SemanticsService.java | 13 +++ .../semantic/SemanticsServiceImpl.java | 81 +++++++++++++++++++ .../DescriptionTemplateController.java | 13 --- .../controllers/SemanticsController.java | 56 +++++++++++++ .../src/app/core/core-service.module.ts | 4 +- .../description-template-semantics.lookup.ts | 7 -- .../src/app/core/query/semantic.lookup.ts | 7 ++ .../description-template.service.ts | 19 ----- .../services/semantic/semantics.service.ts | 41 ++++++++++ ...ption-template-editor-field.component.html | 2 +- ...ription-template-editor-field.component.ts | 4 +- .../dmp-blueprint-editor.component.html | 2 +- .../editor/dmp-blueprint-editor.component.ts | 4 +- 18 files changed, 213 insertions(+), 90 deletions(-) rename dmp-backend/core/src/main/java/eu/eudat/query/lookup/{DescriptionTemplateSemanticsLookup.java => SemanticsLookup.java} (79%) rename dmp-backend/core/src/main/java/eu/eudat/service/{descriptiontemplate => semantic}/Semantic.java (91%) create mode 100644 dmp-backend/core/src/main/java/eu/eudat/service/semantic/SemanticsService.java create mode 100644 dmp-backend/core/src/main/java/eu/eudat/service/semantic/SemanticsServiceImpl.java create mode 100644 dmp-backend/web/src/main/java/eu/eudat/controllers/SemanticsController.java delete mode 100644 dmp-frontend/src/app/core/query/description-template-semantics.lookup.ts create mode 100644 dmp-frontend/src/app/core/query/semantic.lookup.ts create mode 100644 dmp-frontend/src/app/core/services/semantic/semantics.service.ts diff --git a/dmp-backend/core/src/main/java/eu/eudat/audit/AuditableAction.java b/dmp-backend/core/src/main/java/eu/eudat/audit/AuditableAction.java index fcf0cdc4e..aa262ad0e 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/audit/AuditableAction.java +++ b/dmp-backend/core/src/main/java/eu/eudat/audit/AuditableAction.java @@ -66,7 +66,6 @@ public class AuditableAction { public static final EventId DescriptionTemplate_PersistNewVersion = new EventId(8005, "DescriptionTemplate_PersistNewVersion"); public static final EventId DescriptionTemplate_GetXml = new EventId(8006, "DescriptionTemplate_GetXml"); public static final EventId DescriptionTemplate_Import = new EventId(8007, "DescriptionTemplate_Import"); - public static final EventId DescriptionTemplate_GetSemantics = new EventId(8007, "DescriptionTemplate_GetSemantics"); public static final EventId SupportiveMaterial_Query = new EventId(9000, "SupportiveMaterial_Query"); public static final EventId SupportiveMaterial_Lookup = new EventId(9001, "SupportiveMaterial_Lookup"); @@ -144,5 +143,7 @@ public class AuditableAction { public static final EventId Principal_Lookup = new EventId(240000, "Principal_Lookup"); + public static final EventId GetSemantics = new EventId(250000, "GetSemantics"); + } diff --git a/dmp-backend/core/src/main/java/eu/eudat/query/lookup/DescriptionTemplateSemanticsLookup.java b/dmp-backend/core/src/main/java/eu/eudat/query/lookup/SemanticsLookup.java similarity index 79% rename from dmp-backend/core/src/main/java/eu/eudat/query/lookup/DescriptionTemplateSemanticsLookup.java rename to dmp-backend/core/src/main/java/eu/eudat/query/lookup/SemanticsLookup.java index 163ba4117..586a98241 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/query/lookup/DescriptionTemplateSemanticsLookup.java +++ b/dmp-backend/core/src/main/java/eu/eudat/query/lookup/SemanticsLookup.java @@ -1,6 +1,6 @@ package eu.eudat.query.lookup; -public class DescriptionTemplateSemanticsLookup { +public class SemanticsLookup { private String like; diff --git a/dmp-backend/core/src/main/java/eu/eudat/service/descriptiontemplate/DescriptionTemplateService.java b/dmp-backend/core/src/main/java/eu/eudat/service/descriptiontemplate/DescriptionTemplateService.java index 3b9d5c00b..357eead87 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/service/descriptiontemplate/DescriptionTemplateService.java +++ b/dmp-backend/core/src/main/java/eu/eudat/service/descriptiontemplate/DescriptionTemplateService.java @@ -17,7 +17,6 @@ import javax.management.InvalidApplicationException; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import java.io.IOException; -import java.util.List; import java.util.UUID; public interface DescriptionTemplateService { @@ -29,7 +28,4 @@ public interface DescriptionTemplateService { DescriptionTemplate importXml(byte[] bytes, UUID id, String label, FieldSet fields) throws MyForbiddenException, MyNotFoundException, JAXBException, ParserConfigurationException, TransformerException, InvalidApplicationException, IOException, InstantiationException, IllegalAccessException, SAXException; ResponseEntity exportXml(UUID id) throws MyForbiddenException, MyNotFoundException, JAXBException, ParserConfigurationException, IOException, InstantiationException, IllegalAccessException, SAXException, TransformerException, InvalidApplicationException; - List getSemantics(String query) throws IOException; - - List getSemantics() throws IOException; } diff --git a/dmp-backend/core/src/main/java/eu/eudat/service/descriptiontemplate/DescriptionTemplateServiceImpl.java b/dmp-backend/core/src/main/java/eu/eudat/service/descriptiontemplate/DescriptionTemplateServiceImpl.java index 8e440ba1b..f2c4b6cef 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/service/descriptiontemplate/DescriptionTemplateServiceImpl.java +++ b/dmp-backend/core/src/main/java/eu/eudat/service/descriptiontemplate/DescriptionTemplateServiceImpl.java @@ -82,8 +82,6 @@ import java.util.stream.Collectors; @Service public class DescriptionTemplateServiceImpl implements DescriptionTemplateService { - private List semantics = null; - private static final LoggerService logger = new LoggerService(LoggerFactory.getLogger(DescriptionTemplateServiceImpl.class)); private final EntityManager entityManager; @@ -901,42 +899,5 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic } //endregion - - //region - - @Override - public List getSemantics(String like) throws IOException { - List semantics = this.getSemantics(); - List filteredSemantics = semantics.stream().map(Semantic::getName).collect(Collectors.toList()); - if (like != null && !like.isEmpty()) { - filteredSemantics = semantics.stream().filter(x -> x.getCategory().contains(like.replaceAll("%", "")) || x.getName().contains(like.replaceAll("%", ""))).map(Semantic::getName).collect(Collectors.toList()); - } - return filteredSemantics; - } - - @Override - public List getSemantics() throws IOException { - this.authorizationService.authorizeForce(Permission.BrowseDescriptionTemplate); - - if (semantics == null) { - semantics = new ArrayList<>(); - this.loadSemantics(); - } - return semantics; - } - - private void loadSemantics() throws IOException { - byte[] bytes = this.storageFileService.getSemanticsFile(); - if (bytes != null) { - try { - String json = new String(bytes, StandardCharsets.UTF_8); - semantics = List.of(jsonHandlingService.fromJson(Semantic[].class, json)); - } catch (IOException e) { - logger.error(e.getMessage(), e); - } - } - } - - //endregion } diff --git a/dmp-backend/core/src/main/java/eu/eudat/service/descriptiontemplate/Semantic.java b/dmp-backend/core/src/main/java/eu/eudat/service/semantic/Semantic.java similarity index 91% rename from dmp-backend/core/src/main/java/eu/eudat/service/descriptiontemplate/Semantic.java rename to dmp-backend/core/src/main/java/eu/eudat/service/semantic/Semantic.java index 6c7162462..d98e58a69 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/service/descriptiontemplate/Semantic.java +++ b/dmp-backend/core/src/main/java/eu/eudat/service/semantic/Semantic.java @@ -1,4 +1,4 @@ -package eu.eudat.service.descriptiontemplate; +package eu.eudat.service.semantic; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/dmp-backend/core/src/main/java/eu/eudat/service/semantic/SemanticsService.java b/dmp-backend/core/src/main/java/eu/eudat/service/semantic/SemanticsService.java new file mode 100644 index 000000000..e760314e9 --- /dev/null +++ b/dmp-backend/core/src/main/java/eu/eudat/service/semantic/SemanticsService.java @@ -0,0 +1,13 @@ +package eu.eudat.service.semantic; + +import eu.eudat.query.lookup.SemanticsLookup; + +import java.io.IOException; +import java.util.List; + +public interface SemanticsService { + + List getSemantics(SemanticsLookup lookup) throws IOException; + + List getSemantics() throws IOException; +} diff --git a/dmp-backend/core/src/main/java/eu/eudat/service/semantic/SemanticsServiceImpl.java b/dmp-backend/core/src/main/java/eu/eudat/service/semantic/SemanticsServiceImpl.java new file mode 100644 index 000000000..4e97b1501 --- /dev/null +++ b/dmp-backend/core/src/main/java/eu/eudat/service/semantic/SemanticsServiceImpl.java @@ -0,0 +1,81 @@ +package eu.eudat.service.semantic; + + +import eu.eudat.authorization.Permission; +import eu.eudat.commons.JsonHandlingService; +import eu.eudat.query.lookup.SemanticsLookup; +import eu.eudat.service.storage.StorageFileService; +import gr.cite.commons.web.authz.service.AuthorizationService; +import gr.cite.tools.logging.LoggerService; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +@Service +public class SemanticsServiceImpl implements SemanticsService { + + private List semantics = null; + + private static final LoggerService logger = new LoggerService(LoggerFactory.getLogger(SemanticsServiceImpl.class)); + + + private final AuthorizationService authorizationService; + + private final StorageFileService storageFileService; + + private final JsonHandlingService jsonHandlingService; + + + @Autowired + public SemanticsServiceImpl( + AuthorizationService authorizationService, + StorageFileService storageFileService, + JsonHandlingService jsonHandlingService) { + this.authorizationService = authorizationService; + this.storageFileService = storageFileService; + this.jsonHandlingService = jsonHandlingService; + } + + + @Override + public List getSemantics(SemanticsLookup lookup) throws IOException { + List semantics = this.getSemantics(); + List filteredSemantics = semantics.stream().map(Semantic::getName).collect(Collectors.toList()); + String like = lookup.getLike(); + if (like != null && !like.isEmpty()) { + filteredSemantics = semantics.stream().filter(x -> x.getCategory().contains(like.replaceAll("%", "")) || x.getName().contains(like.replaceAll("%", ""))).map(Semantic::getName).collect(Collectors.toList()); + } + return filteredSemantics; + } + + @Override + public List getSemantics() throws IOException { + this.authorizationService.authorizeForce(Permission.BrowseDescriptionTemplate); + + if (semantics == null) { + semantics = new ArrayList<>(); + this.loadSemantics(); + } + return semantics; + } + + private void loadSemantics() throws IOException { + byte[] bytes = this.storageFileService.getSemanticsFile(); + if (bytes != null) { + try { + String json = new String(bytes, StandardCharsets.UTF_8); + semantics = List.of(jsonHandlingService.fromJson(Semantic[].class, json)); + } catch (IOException e) { + logger.error(e.getMessage(), e); + } + } + } + +} + diff --git a/dmp-backend/web/src/main/java/eu/eudat/controllers/DescriptionTemplateController.java b/dmp-backend/web/src/main/java/eu/eudat/controllers/DescriptionTemplateController.java index 280d415df..87eb1dbca 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/controllers/DescriptionTemplateController.java +++ b/dmp-backend/web/src/main/java/eu/eudat/controllers/DescriptionTemplateController.java @@ -3,7 +3,6 @@ package eu.eudat.controllers; import com.fasterxml.jackson.core.JsonProcessingException; import eu.eudat.audit.AuditableAction; import eu.eudat.authorization.AuthorizationFlags; -import eu.eudat.query.lookup.DescriptionTemplateSemanticsLookup; import gr.cite.tools.fieldset.BaseFieldSet; import gr.cite.tools.validation.ValidationFilterAnnotation; import eu.eudat.data.DescriptionTemplateEntity; @@ -203,16 +202,4 @@ public class DescriptionTemplateController { return model; } - @RequestMapping(method = RequestMethod.POST, value = {"get-semantics"}) - public List getSemantics(@RequestBody DescriptionTemplateSemanticsLookup lookup) throws IOException { - logger.debug(new MapLogEntry("retrieving {}" + DescriptionTemplate.class.getSimpleName()).And("like", lookup.getLike())); - - List semantics = this.descriptionTemplateTypeService.getSemantics(lookup.getLike()); - - this.auditService.track(AuditableAction.DescriptionTemplate_GetSemantics, Map.ofEntries( - new AbstractMap.SimpleEntry("lookup", lookup) - )); - - return semantics; - } } diff --git a/dmp-backend/web/src/main/java/eu/eudat/controllers/SemanticsController.java b/dmp-backend/web/src/main/java/eu/eudat/controllers/SemanticsController.java new file mode 100644 index 000000000..3cdd51373 --- /dev/null +++ b/dmp-backend/web/src/main/java/eu/eudat/controllers/SemanticsController.java @@ -0,0 +1,56 @@ +package eu.eudat.controllers; + +import eu.eudat.audit.AuditableAction; +import eu.eudat.query.lookup.SemanticsLookup; +import eu.eudat.service.semantic.SemanticsService; +import gr.cite.commons.web.authz.service.AuthorizationService; +import gr.cite.tools.auditing.AuditService; +import gr.cite.tools.logging.LoggerService; +import gr.cite.tools.logging.MapLogEntry; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.MessageSource; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.AbstractMap; +import java.util.List; +import java.util.Map; + + +@RestController +@RequestMapping(path = {"api/semantics"}) +public class SemanticsController { + + private static final LoggerService logger = new LoggerService(LoggerFactory.getLogger(SemanticsController.class)); + + private final AuditService auditService; + + private final MessageSource messageSource; + + private final AuthorizationService authService; + + private final SemanticsService semanticsService; + + @Autowired + public SemanticsController(AuditService auditService, + MessageSource messageSource, AuthorizationService authService, SemanticsService semanticsService) { + this.auditService = auditService; + this.messageSource = messageSource; + this.authService = authService; + this.semanticsService = semanticsService; + } + + @PostMapping() + public List getSemantics(@RequestBody SemanticsLookup lookup) throws IOException { + logger.debug(new MapLogEntry("retrieving semantics ")); + + List semantics = this.semanticsService.getSemantics(lookup); + + this.auditService.track(AuditableAction.GetSemantics, Map.ofEntries( + new AbstractMap.SimpleEntry("lookup", lookup) + )); + + return semantics; + } +} diff --git a/dmp-frontend/src/app/core/core-service.module.ts b/dmp-frontend/src/app/core/core-service.module.ts index 4bf56873c..5eac92f6e 100644 --- a/dmp-frontend/src/app/core/core-service.module.ts +++ b/dmp-frontend/src/app/core/core-service.module.ts @@ -46,6 +46,7 @@ import { QueryParamsService } from './services/utilities/query-params.service'; import { FileTransformerHttpService } from './services/file-transformer/file-transformer.http.service'; import { InAppNotificationService } from './services/inapp-notification/inapp-notification.service'; import { NotificationService } from './services/notification/notification-service'; +import { SemanticsService } from './services/semantic/semantics.service'; // // // This is shared module that provides all the services. Its imported only once on the AppModule. @@ -110,7 +111,8 @@ export class CoreServiceModule { FileTransformerService, FileTransformerHttpService, InAppNotificationService, - NotificationService + NotificationService, + SemanticsService ], }; } diff --git a/dmp-frontend/src/app/core/query/description-template-semantics.lookup.ts b/dmp-frontend/src/app/core/query/description-template-semantics.lookup.ts deleted file mode 100644 index f63fe41c4..000000000 --- a/dmp-frontend/src/app/core/query/description-template-semantics.lookup.ts +++ /dev/null @@ -1,7 +0,0 @@ -export class DescriptionTemplateSemanticsLookup { - like: string; - - constructor() { - - } -} \ No newline at end of file diff --git a/dmp-frontend/src/app/core/query/semantic.lookup.ts b/dmp-frontend/src/app/core/query/semantic.lookup.ts new file mode 100644 index 000000000..0f7347e52 --- /dev/null +++ b/dmp-frontend/src/app/core/query/semantic.lookup.ts @@ -0,0 +1,7 @@ +export class SemanticsLookup { + like: string; + + constructor() { + + } +} \ No newline at end of file diff --git a/dmp-frontend/src/app/core/services/description-template/description-template.service.ts b/dmp-frontend/src/app/core/services/description-template/description-template.service.ts index 46deab175..33afc9b03 100644 --- a/dmp-frontend/src/app/core/services/description-template/description-template.service.ts +++ b/dmp-frontend/src/app/core/services/description-template/description-template.service.ts @@ -18,7 +18,6 @@ import { ConfigurationService } from '../configuration/configuration.service'; import { BaseHttpV2Service } from '../http/base-http-v2.service'; import { DescriptionTemplateVersionStatus } from '@app/core/common/enum/description-template-version-status'; import { DescriptionTemplateStatus } from '@app/core/common/enum/description-template-status'; -import { DescriptionTemplateSemanticsLookup } from '@app/core/query/description-template-semantics.lookup'; @Injectable() export class DescriptionTemplateService { @@ -99,11 +98,6 @@ export class DescriptionTemplateService { return this.http.post(url, formData, { params: params }); } - searchSemantics(q: DescriptionTemplateSemanticsLookup ): Observable { - const url = `${this.apiBase}/get-semantics`; - return this.http.post(url, q).pipe(catchError((error: any) => throwError(error))); - } - // // Autocomplete Commons // @@ -199,17 +193,4 @@ export class DescriptionTemplateService { return lookup; } - // Semantics Autocomplete - semanticsAutoCompleteConfiguration: MultipleAutoCompleteConfiguration = { - initialItems: (data?: any) => this.searchSemantics(this.buildSemanticsAutocompleteLookup()).pipe(map(x => x)), - filterFn: (searchQuery: string, data?: any) => this.searchSemantics(this.buildSemanticsAutocompleteLookup(searchQuery)).pipe(map(x => x)), - displayFn: (item) => item, - titleFn: (item) => item, - } - - private buildSemanticsAutocompleteLookup(like?: string ): DescriptionTemplateSemanticsLookup { - const lookup: DescriptionTemplateSemanticsLookup = new DescriptionTemplateSemanticsLookup(); - if (like) { lookup.like = this.filterService.transformLike(like); } - return lookup; - } } diff --git a/dmp-frontend/src/app/core/services/semantic/semantics.service.ts b/dmp-frontend/src/app/core/services/semantic/semantics.service.ts new file mode 100644 index 000000000..c8b7b8ca5 --- /dev/null +++ b/dmp-frontend/src/app/core/services/semantic/semantics.service.ts @@ -0,0 +1,41 @@ +import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { MultipleAutoCompleteConfiguration } from '@app/library/auto-complete/multiple/multiple-auto-complete-configuration'; +import { FilterService } from '@common/modules/text-filter/filter-service'; +import { Observable, throwError } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; +import { ConfigurationService } from '../configuration/configuration.service'; +import { BaseHttpV2Service } from '../http/base-http-v2.service'; +import { SemanticsLookup } from '@app/core/query/semantic.lookup'; + +@Injectable() +export class SemanticsService { + + private headers = new HttpHeaders(); + + constructor(private http: BaseHttpV2Service, private httpClient: HttpClient, private configurationService: ConfigurationService, private filterService: FilterService) { + } + + private get apiBase(): string { return `${this.configurationService.server}semantics`; } + + + searchSemantics(q: SemanticsLookup ): Observable { + const url = `${this.apiBase}`; + return this.http.post(url, q).pipe(catchError((error: any) => throwError(error))); + } + + + // Autocomplete + multipleAutocompleteConfiguration: MultipleAutoCompleteConfiguration = { + initialItems: (data?: any) => this.searchSemantics(this.buildSemanticsAutocompleteLookup()).pipe(map(x => x)), + filterFn: (searchQuery: string, data?: any) => this.searchSemantics(this.buildSemanticsAutocompleteLookup(searchQuery)).pipe(map(x => x)), + displayFn: (item) => item, + titleFn: (item) => item, + } + + private buildSemanticsAutocompleteLookup(like?: string ): SemanticsLookup { + const lookup: SemanticsLookup = new SemanticsLookup(); + if (like) { lookup.like = this.filterService.transformLike(like); } + return lookup; + } +} diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/field/description-template-editor-field.component.html b/dmp-frontend/src/app/ui/admin/description-template/editor/components/field/description-template-editor-field.component.html index b182b4ae1..3382a4a78 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/field/description-template-editor-field.component.html +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/field/description-template-editor-field.component.html @@ -136,7 +136,7 @@ {{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.SEMANTICS' | translate}} - + {{form.get('schematics').getError('backendError').message}} diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/field/description-template-editor-field.component.ts b/dmp-frontend/src/app/ui/admin/description-template/editor/components/field/description-template-editor-field.component.ts index dfd9e700e..ff28f505e 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/field/description-template-editor-field.component.ts +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/field/description-template-editor-field.component.ts @@ -26,6 +26,7 @@ import { map } from 'rxjs/operators'; import { DescriptionTemplateFieldEditorModel, DescriptionTemplateRuleEditorModel } from '../../description-template-editor.model'; import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model'; import { FilterService } from '@common/modules/text-filter/filter-service'; +import { SemanticsService } from '@app/core/services/semantic/semantics.service'; @Component({ selector: 'app-description-template-editor-field-component', @@ -55,7 +56,8 @@ export class DescriptionTemplateEditorFieldComponent extends BaseComponent imple public descriptionTemplateService: DescriptionTemplateService, private dialog: MatDialog, private configurationService: ConfigurationService, - private filterService: FilterService + private filterService: FilterService, + public semanticsService: SemanticsService ) { super(); diff --git a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html index 833cdff0a..47c1cbcce 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html @@ -163,7 +163,7 @@
{{'DMP-BLUEPRINT-EDITOR.FIELDS.SEMANTICS' | translate}} - + {{field.get('semantics').getError('backendError').message}} {{'GENERAL.VALIDATION.REQUIRED' | translate}} diff --git a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.ts b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.ts index cf3d85950..8a46c19a2 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.ts @@ -41,6 +41,7 @@ import { DmpBlueprintEditorModel } from './dmp-blueprint-editor.model'; import { DmpBlueprintEditorResolver } from './dmp-blueprint-editor.resolver'; import { DmpBlueprintEditorService } from './dmp-blueprint-editor.service'; import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service'; +import { SemanticsService } from '@app/core/services/semantic/semantics.service'; @Component({ @@ -122,7 +123,8 @@ export class DmpBlueprintEditorComponent extends BaseEditor