Merge remote-tracking branch 'origin/dmp-refactoring' into dmp-refactoring

This commit is contained in:
George Kalampokis 2023-12-20 10:49:56 +02:00
commit ea371cb1a1
1 changed files with 9 additions and 9 deletions

View File

@ -202,13 +202,12 @@ public class DmpMigrationService {
if (licenseMap.containsKey("name")) {
referenceEntity.setLabel(licenseMap.get("name"));
}
if (licenseMap.containsKey("uri")) {
referenceEntity.setReference(licenseMap.get("uri"));
if (!this.conventionService.isNullOrEmpty(licenseMap.get("uri"))){
if (licenseMap.containsKey("pid")) {
if (!this.conventionService.isNullOrEmpty(licensePid)){
FieldEntity fieldEntity = new FieldEntity();
fieldEntity.setCode("uri");
fieldEntity.setCode("pid");
fieldEntity.setDataType(ReferenceFieldDataType.Text);
fieldEntity.setValue(licenseMap.get("uri"));
fieldEntity.setValue(licensePid);
fields.add(fieldEntity);
}
}
@ -221,12 +220,13 @@ public class DmpMigrationService {
fields.add(fieldEntity);
}
}
if (licenseMap.containsKey("hint")) {
if (!this.conventionService.isNullOrEmpty(licenseMap.get("hint"))){
if (licenseMap.containsKey("uri")) {
referenceEntity.setReference(licenseMap.get("uri"));
if (!this.conventionService.isNullOrEmpty(licenseMap.get("uri"))){
FieldEntity fieldEntity = new FieldEntity();
fieldEntity.setCode("hint");
fieldEntity.setCode("uri");
fieldEntity.setDataType(ReferenceFieldDataType.Text);
fieldEntity.setValue(licenseMap.get("hint"));
fieldEntity.setValue(licenseMap.get("uri"));
fields.add(fieldEntity);
}
}