diff --git a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/ResearcherMigrationService.java b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/ResearcherMigrationService.java index 25fb2fd42..931d0b89e 100644 --- a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/ResearcherMigrationService.java +++ b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/ResearcherMigrationService.java @@ -19,6 +19,8 @@ import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; import java.util.Locale; +import java.util.regex.Matcher; +import java.util.regex.Pattern; @Service public class ResearcherMigrationService { @@ -75,6 +77,11 @@ public class ResearcherMigrationService { data.setSource(isInternal? "Internal" : referenceParts[0]); data.setSourceType(isInternal? ReferenceSourceType.Internal : ReferenceSourceType.External); + Pattern pattern = Pattern.compile("\\(orcid:(.*?)\\)"); + if (data.getSource().equalsIgnoreCase("orcid") && !pattern.matcher(data.getLabel()).find()){ + data.setLabel(data.getLabel() + " (orcid:" + data.getReference() + ")"); + } + DefinitionEntity definitionEntity = new DefinitionEntity(); definitionEntity.setFields(new ArrayList<>()); if (!this.conventionService.isNullOrEmpty(item.getUri())){