From 3c3a83bb58b48502ce046ec74bcc7cac90e06abb Mon Sep 17 00:00:00 2001 From: sgiannopoulos Date: Wed, 8 May 2024 10:25:44 +0300 Subject: [PATCH] migration changes --- backend/core/pom.xml | 5 +++++ dmp-migration-tool/pom.xml | 2 +- .../eu/old/eudat/migration/DatasetMigrationService.java | 6 +++--- ...riptionTemplateXmlCleanInvalidReferenceTypesService.java | 4 ++-- .../migration/DescriptionTemplateXmlMigrationService.java | 2 +- .../eudat/migration/DmpBlueprintXmlMigrationService.java | 4 ++-- .../java/eu/old/eudat/migration/DmpMigrationService.java | 2 +- .../java/eu/old/eudat/migration/UserMigrationService.java | 2 +- .../old/eudat/publicapi/migration/MigrationController.java | 2 +- 9 files changed, 17 insertions(+), 12 deletions(-) diff --git a/backend/core/pom.xml b/backend/core/pom.xml index bdba39df7..6e9ac0a3a 100644 --- a/backend/core/pom.xml +++ b/backend/core/pom.xml @@ -58,6 +58,11 @@ common-models 0.0.14 + + gr.cite + data-tools + 2.1.3 + org.opencdmp file-transformer-base diff --git a/dmp-migration-tool/pom.xml b/dmp-migration-tool/pom.xml index 52f764bf3..c8b2b6b73 100644 --- a/dmp-migration-tool/pom.xml +++ b/dmp-migration-tool/pom.xml @@ -312,7 +312,7 @@ gr.cite data-tools - 2.1.2 + 2.1.3 gr.cite diff --git a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DatasetMigrationService.java b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DatasetMigrationService.java index 58dac7a92..57e8f95dd 100644 --- a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DatasetMigrationService.java +++ b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DatasetMigrationService.java @@ -12,10 +12,10 @@ import org.opencdmp.commons.types.externalfetcher.ExternalFetcherApiSourceConfig import org.opencdmp.commons.types.referencetype.ReferenceTypeDefinitionEntity; import org.opencdmp.convention.ConventionService; import org.opencdmp.data.*; -import org.opencdmp.model.Dmp; -import org.opencdmp.model.Reference; -import org.opencdmp.model.ReferenceType; +import org.opencdmp.model.dmp.Dmp; import org.opencdmp.model.persist.descriptionreference.DescriptionReferenceDataPersist; +import org.opencdmp.model.reference.Reference; +import org.opencdmp.model.referencetype.ReferenceType; import org.opencdmp.query.*; import eu.old.eudat.data.dao.entities.DatasetDao; import eu.old.eudat.data.entities.Dataset; diff --git a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DescriptionTemplateXmlCleanInvalidReferenceTypesService.java b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DescriptionTemplateXmlCleanInvalidReferenceTypesService.java index 3f06445a6..f51cb3872 100644 --- a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DescriptionTemplateXmlCleanInvalidReferenceTypesService.java +++ b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DescriptionTemplateXmlCleanInvalidReferenceTypesService.java @@ -9,8 +9,8 @@ import org.opencdmp.commons.types.descriptiontemplate.fielddata.ReferenceTypeDat import org.opencdmp.convention.ConventionService; import org.opencdmp.data.DescriptionTemplateEntity; import org.opencdmp.data.ReferenceTypeEntity; -import org.opencdmp.model.DescriptionTemplate; -import org.opencdmp.model.ReferenceType; +import org.opencdmp.model.descriptiontemplate.DescriptionTemplate; +import org.opencdmp.model.referencetype.ReferenceType; import org.opencdmp.query.DescriptionTemplateQuery; import org.opencdmp.query.ReferenceTypeQuery; import gr.cite.tools.data.query.Ordering; diff --git a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DescriptionTemplateXmlMigrationService.java b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DescriptionTemplateXmlMigrationService.java index 00f09bbbd..c52dc900e 100644 --- a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DescriptionTemplateXmlMigrationService.java +++ b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DescriptionTemplateXmlMigrationService.java @@ -13,7 +13,7 @@ import org.opencdmp.data.DescriptionTemplateEntity; import org.opencdmp.data.ReferenceEntity; import org.opencdmp.data.ReferenceTypeEntity; import org.opencdmp.data.converters.enums.DatabaseEnum; -import org.opencdmp.model.DescriptionTemplate; +import org.opencdmp.model.descriptiontemplate.DescriptionTemplate; import org.opencdmp.query.DescriptionTemplateQuery; import org.opencdmp.query.ReferenceTypeQuery; import eu.old.eudat.logic.services.helpers.HelpersService; diff --git a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DmpBlueprintXmlMigrationService.java b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DmpBlueprintXmlMigrationService.java index f26a6738d..f59b1c224 100644 --- a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DmpBlueprintXmlMigrationService.java +++ b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DmpBlueprintXmlMigrationService.java @@ -8,7 +8,7 @@ import org.opencdmp.commons.types.dmpblueprint.*; import org.opencdmp.convention.ConventionService; import org.opencdmp.data.DescriptionTemplateEntity; import org.opencdmp.data.DmpBlueprintEntity; -import org.opencdmp.model.DmpBlueprint; +import org.opencdmp.model.dmpblueprint.DmpBlueprint; import org.opencdmp.query.DescriptionTemplateQuery; import org.opencdmp.query.DmpBlueprintQuery; import eu.old.eudat.logic.utilities.builders.XmlBuilder; @@ -60,7 +60,7 @@ public class DmpBlueprintXmlMigrationService { int page = 0; List items; - List descriptionTemplateEntities = this.queryFactory.query(DescriptionTemplateQuery.class).collectAs(new BaseFieldSet().ensure(org.opencdmp.model.DescriptionTemplate._id).ensure(org.opencdmp.model.DescriptionTemplate._groupId)); + List descriptionTemplateEntities = this.queryFactory.query(DescriptionTemplateQuery.class).collectAs(new BaseFieldSet().ensure(org.opencdmp.model.descriptiontemplate.DescriptionTemplate._id).ensure(org.opencdmp.model.descriptiontemplate.DescriptionTemplate._groupId)); Map descriptionTemplateGroupMap = new HashMap<>(); for (DescriptionTemplateEntity descriptionTemplateEntity: descriptionTemplateEntities) { descriptionTemplateGroupMap.put(descriptionTemplateEntity.getId(), descriptionTemplateEntity.getGroupId()); diff --git a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DmpMigrationService.java b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DmpMigrationService.java index 2e3f798dd..469f17337 100644 --- a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DmpMigrationService.java +++ b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DmpMigrationService.java @@ -14,7 +14,7 @@ import org.opencdmp.commons.types.reference.DefinitionEntity; import org.opencdmp.commons.types.reference.FieldEntity; import org.opencdmp.convention.ConventionService; import org.opencdmp.data.*; -import org.opencdmp.model.DmpBlueprint; +import org.opencdmp.model.dmpblueprint.DmpBlueprint; import org.opencdmp.query.DmpBlueprintQuery; import eu.old.eudat.data.dao.entities.DMPDao; import eu.old.eudat.data.entities.*; diff --git a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/UserMigrationService.java b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/UserMigrationService.java index aa7aca09b..7f89bd572 100644 --- a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/UserMigrationService.java +++ b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/UserMigrationService.java @@ -8,7 +8,7 @@ import org.opencdmp.commons.enums.ReferenceSourceType; import org.opencdmp.commons.types.user.AdditionalInfoEntity; import org.opencdmp.data.ReferenceEntity; import org.opencdmp.data.UserEntity; -import org.opencdmp.model.User; +import org.opencdmp.model.user.User; import org.opencdmp.query.ReferenceQuery; import org.opencdmp.query.UserQuery; import eu.old.eudat.data.dao.entities.UserInfoDao; diff --git a/dmp-migration-tool/web/src/main/java/eu/old/eudat/publicapi/migration/MigrationController.java b/dmp-migration-tool/web/src/main/java/eu/old/eudat/publicapi/migration/MigrationController.java index f10e82c0b..91a56b536 100644 --- a/dmp-migration-tool/web/src/main/java/eu/old/eudat/publicapi/migration/MigrationController.java +++ b/dmp-migration-tool/web/src/main/java/eu/old/eudat/publicapi/migration/MigrationController.java @@ -113,7 +113,7 @@ public class MigrationController { // this.dmpMigrationService.migrate(); // this.dmpDatasetProfileMigrationService.migrate(); // this.dmpUserMigrationService.migrate(); - +// //Description this.datasetMigrationService.migrate(); this.datasetReferenceMigrationService.migrateDatasetReferences();