Merge branch 'dmp-refactoring' of https://code-repo.d4science.org/MaDgiK-CITE/argos into dmp-refactoring

This commit is contained in:
Sofia Papacharalampous 2024-04-26 17:18:01 +03:00
commit c91a2408a3
40 changed files with 235 additions and 229 deletions

View File

@ -7,7 +7,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
@SpringBootApplication( @SpringBootApplication(
scanBasePackages = { scanBasePackages = {
"eu.eudat", "gr.cite.annotation.*",
"gr.cite", "gr.cite",
"gr.cite.queueoutbox", "gr.cite.queueoutbox",
"gr.cite.queueinbox", "gr.cite.queueinbox",

View File

@ -19,14 +19,14 @@ permissions:
EditTenant: EditTenant:
roles: roles:
- Admin - Admin
clients: [ "opendmp-api-dev" ] clients: [ "opencdmp-api-dev" ]
allowAnonymous: false allowAnonymous: false
allowAuthenticated: false allowAuthenticated: false
DeleteTenant: DeleteTenant:
roles: roles:
- Admin - Admin
claims: [ ] claims: [ ]
clients: [ "opendmp-api-dev" ] clients: [ "opencdmp-api-dev" ]
allowAnonymous: false allowAnonymous: false
allowAuthenticated: false allowAuthenticated: false
AllowNoTenant: AllowNoTenant:
@ -46,14 +46,14 @@ permissions:
EditUser: EditUser:
roles: roles:
- TenantAdmin - TenantAdmin
clients: [ "opendmp-api-dev" ] clients: [ "opencdmp-api-dev" ]
allowAnonymous: false allowAnonymous: false
allowAuthenticated: false allowAuthenticated: false
DeleteUser: DeleteUser:
roles: roles:
- TenantAdmin - TenantAdmin
claims: [ ] claims: [ ]
clients: [ "opendmp-api-dev" ] clients: [ "opencdmp-api-dev" ]
allowAnonymous: false allowAnonymous: false
allowAuthenticated: false allowAuthenticated: false
#Annotation #Annotation

View File

@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>gr.cite</groupId> <groupId>gr.cite</groupId>
<artifactId>annotation-service-parent</artifactId> <artifactId>annotation-service-parent</artifactId>
<name>OpenDMP Annotation Parent</name> <name>Annotation Parent</name>
<version>${revision}</version> <version>${revision}</version>
<packaging>pom</packaging> <packaging>pom</packaging>

View File

@ -17,7 +17,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>eu.eudat</groupId> <groupId>org.opencdmp</groupId>
<artifactId>core</artifactId> <artifactId>core</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
</dependency> </dependency>
@ -37,5 +37,11 @@
<artifactId>swagger-annotations</artifactId> <artifactId>swagger-annotations</artifactId>
<version>1.5.20</version> <version>1.5.20</version>
</dependency> </dependency>
<dependency>
<groupId>org.opencdmp</groupId>
<artifactId>core</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -1,9 +1,9 @@
package eu.old.eudat.data.entities; package eu.old.eudat.data.entities;
import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.annotation.JsonValue;
import eu.eudat.commons.enums.EnumUtils; import org.opencdmp.commons.enums.EnumUtils;
import eu.eudat.data.converters.enums.DatabaseEnum; import org.opencdmp.data.converters.enums.DatabaseEnum;
import eu.eudat.data.converters.enums.DatabaseEnumConverter; import org.opencdmp.data.converters.enums.DatabaseEnumConverter;
import eu.old.eudat.data.converters.DateToUTCConverter; import eu.old.eudat.data.converters.DateToUTCConverter;
import eu.old.eudat.data.entities.helpers.EntityBinder; import eu.old.eudat.data.entities.helpers.EntityBinder;
import eu.old.eudat.queryable.queryableentity.DataEntity; import eu.old.eudat.queryable.queryableentity.DataEntity;

View File

@ -1,6 +1,6 @@
package eu.old.eudat.data.entities; package eu.old.eudat.data.entities;
import eu.eudat.data.converters.enums.DatabaseEnumConverter; import org.opencdmp.data.converters.enums.DatabaseEnumConverter;
import jakarta.persistence.Converter; import jakarta.persistence.Converter;
@Converter @Converter

View File

@ -15,7 +15,7 @@
<modules> <modules>
<module>queryable</module> <module>queryable</module>
<module>../dmp-backend/core</module> <module>../backend/core</module>
<module>web</module> <module>web</module>
<module>data</module> <module>data</module>
<module>elastic</module> <module>elastic</module>

View File

@ -17,7 +17,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>eu.eudat</groupId> <groupId>org.opencdmp</groupId>
<artifactId>core</artifactId> <artifactId>core</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
</dependency> </dependency>

View File

@ -17,7 +17,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
import java.util.ArrayList; import java.util.ArrayList;
@SpringBootApplication(scanBasePackages = {"eu.eudat" ,"eu.old.eudat", "eu.old.eudat.depositinterface", "gr.cite"}) @SpringBootApplication(scanBasePackages = {"org.opencdmp" ,"eu.old.eudat", "eu.old.eudat.depositinterface", "gr.cite"})
@Configuration @Configuration
@EnableAsync @EnableAsync
public class EuDatApplication extends SpringBootServletInitializer { public class EuDatApplication extends SpringBootServletInitializer {

View File

@ -42,7 +42,7 @@ public class DevelDatabaseConfiguration {
public LocalContainerEntityManagerFactoryBean entityManagerFactory() { public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean(); LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource()); em.setDataSource(dataSource());
em.setPackagesToScan("eu.old.eudat.data.entities", "eu.eudat.data"); em.setPackagesToScan("eu.old.eudat.data.entities", "eu.eudat.data", "org.opencdmp.data");
em.setPersistenceUnitPostProcessors(persistenceUnit -> { em.setPersistenceUnitPostProcessors(persistenceUnit -> {
List<String> managedClassNames = persistenceUnit.getManagedClassNames(); List<String> managedClassNames = persistenceUnit.getManagedClassNames();
managedClassNames.removeIf(fullClassName -> fullClassName.startsWith("eu.eudat.data.old")); managedClassNames.removeIf(fullClassName -> fullClassName.startsWith("eu.eudat.data.old"));

View File

@ -1,7 +1,7 @@
package eu.old.eudat.configurations; package eu.old.eudat.configurations;
import eu.eudat.authorization.OwnedAuthorizationRequirement; import org.opencdmp.authorization.OwnedAuthorizationRequirement;
import eu.eudat.authorization.OwnedResource; import org.opencdmp.authorization.OwnedResource;
import gr.cite.commons.web.authz.handler.AuthorizationHandler; import gr.cite.commons.web.authz.handler.AuthorizationHandler;
import gr.cite.commons.web.authz.handler.PermissionAuthenticatedAuthorizationHandler; import gr.cite.commons.web.authz.handler.PermissionAuthenticatedAuthorizationHandler;
import gr.cite.commons.web.authz.handler.PermissionClaimAuthorizationHandler; import gr.cite.commons.web.authz.handler.PermissionClaimAuthorizationHandler;

View File

@ -1,13 +1,13 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.commons.enums.ReferenceFieldDataType; import org.opencdmp.commons.enums.ReferenceFieldDataType;
import eu.eudat.commons.enums.ReferenceSourceType; import org.opencdmp.commons.enums.ReferenceSourceType;
import eu.eudat.commons.types.reference.DefinitionEntity; import org.opencdmp.commons.types.reference.DefinitionEntity;
import eu.eudat.commons.types.reference.FieldEntity; import org.opencdmp.commons.types.reference.FieldEntity;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.old.eudat.data.dao.entities.DataRepositoryDao; import eu.old.eudat.data.dao.entities.DataRepositoryDao;
import eu.old.eudat.data.entities.DataRepository; import eu.old.eudat.data.entities.DataRepository;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;

View File

@ -1,22 +1,22 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.JsonHandlingService; import org.opencdmp.commons.JsonHandlingService;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.*; import org.opencdmp.commons.enums.*;
import eu.eudat.commons.types.description.*; import org.opencdmp.commons.types.description.*;
import eu.eudat.commons.types.descriptionreference.DescriptionReferenceDataEntity; import org.opencdmp.commons.types.descriptionreference.DescriptionReferenceDataEntity;
import eu.eudat.commons.types.descriptiontemplate.FieldSetEntity; import org.opencdmp.commons.types.descriptiontemplate.FieldSetEntity;
import eu.eudat.commons.types.descriptiontemplate.fielddata.ReferenceTypeDataEntity; import org.opencdmp.commons.types.descriptiontemplate.fielddata.ReferenceTypeDataEntity;
import eu.eudat.commons.types.dmpblueprint.DefinitionEntity; import org.opencdmp.commons.types.dmpblueprint.DefinitionEntity;
import eu.eudat.commons.types.externalfetcher.ExternalFetcherApiSourceConfigurationEntity; import org.opencdmp.commons.types.externalfetcher.ExternalFetcherApiSourceConfigurationEntity;
import eu.eudat.commons.types.referencetype.ReferenceTypeDefinitionEntity; import org.opencdmp.commons.types.referencetype.ReferenceTypeDefinitionEntity;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.*; import org.opencdmp.data.*;
import eu.eudat.model.Dmp; import org.opencdmp.model.Dmp;
import eu.eudat.model.Reference; import org.opencdmp.model.Reference;
import eu.eudat.model.ReferenceType; import org.opencdmp.model.ReferenceType;
import eu.eudat.model.persist.descriptionreference.DescriptionReferenceDataPersist; import org.opencdmp.model.persist.descriptionreference.DescriptionReferenceDataPersist;
import eu.eudat.query.*; import org.opencdmp.query.*;
import eu.old.eudat.data.dao.entities.DatasetDao; import eu.old.eudat.data.dao.entities.DatasetDao;
import eu.old.eudat.data.entities.Dataset; import eu.old.eudat.data.entities.Dataset;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;
@ -102,9 +102,9 @@ public class DatasetMigrationService {
List<DescriptionTemplateEntity> descriptionTemplates = this.queryFactory.query(DescriptionTemplateQuery.class).ids(items.stream().map(x-> x.getProfile().getId()).distinct().toList()).collect(); List<DescriptionTemplateEntity> descriptionTemplates = this.queryFactory.query(DescriptionTemplateQuery.class).ids(items.stream().map(x-> x.getProfile().getId()).distinct().toList()).collect();
Map<UUID, UUID> creatorsByDmp = this.queryFactory.query(DmpQuery.class).ids(items.stream().map(x-> x.getDmp().getId()).distinct().toList()).collectAs(new BaseFieldSet().ensure(Dmp._id).ensure(Dmp._creator)).stream().collect(Collectors.toMap(DmpEntity::getId, DmpEntity::getCreatorId)); Map<UUID, UUID> creatorsByDmp = this.queryFactory.query(DmpQuery.class).ids(items.stream().map(x-> x.getDmp().getId()).distinct().toList()).collectAs(new BaseFieldSet().ensure(Dmp._id).ensure(Dmp._creator)).stream().collect(Collectors.toMap(DmpEntity::getId, DmpEntity::getCreatorId));
Map<UUID, eu.eudat.commons.types.descriptiontemplate.DefinitionEntity> descriptionTemplateDefinitionMap = new HashMap<>(); Map<UUID, org.opencdmp.commons.types.descriptiontemplate.DefinitionEntity> descriptionTemplateDefinitionMap = new HashMap<>();
for (DescriptionTemplateEntity descriptionTemplateEntity : descriptionTemplates){ for (DescriptionTemplateEntity descriptionTemplateEntity : descriptionTemplates){
descriptionTemplateDefinitionMap.put(descriptionTemplateEntity.getId(), this.xmlHandlingService.fromXml(eu.eudat.commons.types.descriptiontemplate.DefinitionEntity.class, descriptionTemplateEntity.getDefinition())); descriptionTemplateDefinitionMap.put(descriptionTemplateEntity.getId(), this.xmlHandlingService.fromXml(org.opencdmp.commons.types.descriptiontemplate.DefinitionEntity.class, descriptionTemplateEntity.getDefinition()));
} }
for (Dataset item : items) { for (Dataset item : items) {
DefinitionEntity definition = dmpBlueprintsMap.getOrDefault(item.getDmp().getProfile().getId(), null); DefinitionEntity definition = dmpBlueprintsMap.getOrDefault(item.getDmp().getProfile().getId(), null);
@ -149,7 +149,7 @@ public class DatasetMigrationService {
if (data.getCreatedById() == null){ if (data.getCreatedById() == null){
throw new MyApplicationException("Migration skipped creator not found " + item.getId()); throw new MyApplicationException("Migration skipped creator not found " + item.getId());
} }
eu.eudat.commons.types.descriptiontemplate.DefinitionEntity descriptionTemplateDefinitionEntity = descriptionTemplateDefinitionMap.getOrDefault(item.getProfile().getId(), null); org.opencdmp.commons.types.descriptiontemplate.DefinitionEntity descriptionTemplateDefinitionEntity = descriptionTemplateDefinitionMap.getOrDefault(item.getProfile().getId(), null);
this.entityManager.persist(data); this.entityManager.persist(data);
this.entityManager.flush(); this.entityManager.flush();
@ -186,7 +186,7 @@ public class DatasetMigrationService {
return itemDescriptionTemplates; return itemDescriptionTemplates;
} }
private PropertyDefinitionEntity buildPropertyDefinitionEntity(Dataset item, eu.eudat.commons.types.descriptiontemplate.DefinitionEntity descriptionTemplateDefinitionEntity, Map<UUID, ReferenceTypeDefinitionEntity> referenceTypeDefinitionEntityMap, Map<ReferenceKey, ReferenceEntity> referenceMap) { private PropertyDefinitionEntity buildPropertyDefinitionEntity(Dataset item, org.opencdmp.commons.types.descriptiontemplate.DefinitionEntity descriptionTemplateDefinitionEntity, Map<UUID, ReferenceTypeDefinitionEntity> referenceTypeDefinitionEntityMap, Map<ReferenceKey, ReferenceEntity> referenceMap) {
if (this.conventionService.isNullOrEmpty(item.getProperties())) return null; if (this.conventionService.isNullOrEmpty(item.getProperties())) return null;
JSONObject jObject = new JSONObject(item.getProperties()); JSONObject jObject = new JSONObject(item.getProperties());
Map<String, Object> properties = jObject.toMap(); Map<String, Object> properties = jObject.toMap();
@ -210,9 +210,9 @@ public class DatasetMigrationService {
} else { } else {
if (!key.toLowerCase(Locale.ROOT).trim().startsWith("multiple_")) { if (!key.toLowerCase(Locale.ROOT).trim().startsWith("multiple_")) {
FieldSetEntity currentFieldSet = null; FieldSetEntity currentFieldSet = null;
eu.eudat.commons.types.descriptiontemplate.FieldEntity currentField = null; org.opencdmp.commons.types.descriptiontemplate.FieldEntity currentField = null;
for (FieldSetEntity fieldSetEntity : fieldSetEntities) { for (FieldSetEntity fieldSetEntity : fieldSetEntities) {
List<eu.eudat.commons.types.descriptiontemplate.FieldEntity> fieldEntities = fieldSetEntity.getFieldById(key.trim()); List<org.opencdmp.commons.types.descriptiontemplate.FieldEntity> fieldEntities = fieldSetEntity.getFieldById(key.trim());
if (!fieldEntities.isEmpty()) { if (!fieldEntities.isEmpty()) {
currentFieldSet = fieldSetEntity; currentFieldSet = fieldSetEntity;
currentField = fieldEntities.getFirst(); currentField = fieldEntities.getFirst();
@ -245,7 +245,7 @@ public class DatasetMigrationService {
return propertyDefinitionEntity; return propertyDefinitionEntity;
} }
private void addMultipleField(Dataset item, Map<String, Object> properties, eu.eudat.commons.types.descriptiontemplate.DefinitionEntity descriptionTemplateDefinitionEntity, PropertyDefinitionEntity propertyDefinitionEntity, Map<UUID, ReferenceTypeDefinitionEntity> referenceTypeDefinitionEntityMap, Map<ReferenceKey, ReferenceEntity> referenceMap){ private void addMultipleField(Dataset item, Map<String, Object> properties, org.opencdmp.commons.types.descriptiontemplate.DefinitionEntity descriptionTemplateDefinitionEntity, PropertyDefinitionEntity propertyDefinitionEntity, Map<UUID, ReferenceTypeDefinitionEntity> referenceTypeDefinitionEntityMap, Map<ReferenceKey, ReferenceEntity> referenceMap){
Map<MultipleFieldKey, Integer> groupOrdinalMapping = new HashMap<>(); Map<MultipleFieldKey, Integer> groupOrdinalMapping = new HashMap<>();
for (String key : properties.keySet()) { for (String key : properties.keySet()) {
if (key.trim().toLowerCase(Locale.ROOT).startsWith("multiple_")) { if (key.trim().toLowerCase(Locale.ROOT).startsWith("multiple_")) {
@ -280,7 +280,7 @@ public class DatasetMigrationService {
throw new MyApplicationException("Migrate Dataset " + item.getId() + " " + item.getLabel() + " Field group key has invalid format " + key + " " + properties.get(key).toString()); throw new MyApplicationException("Migrate Dataset " + item.getId() + " " + item.getLabel() + " Field group key has invalid format " + key + " " + properties.get(key).toString());
} }
eu.eudat.commons.types.descriptiontemplate.FieldEntity currentField = descriptionTemplateDefinitionEntity.getFieldById(fieldId).stream().findFirst().orElse(null); org.opencdmp.commons.types.descriptiontemplate.FieldEntity currentField = descriptionTemplateDefinitionEntity.getFieldById(fieldId).stream().findFirst().orElse(null);
if (currentField == null) { if (currentField == null) {
logger.warn("Migrate Dataset " + item.getId() + " " + item.getLabel() + " Field set not found for field " + key + " " + properties.get(key).toString()); logger.warn("Migrate Dataset " + item.getId() + " " + item.getLabel() + " Field set not found for field " + key + " " + properties.get(key).toString());
continue; continue;
@ -313,7 +313,7 @@ public class DatasetMigrationService {
} }
} }
private void addMultipleField(Dataset item, PropertyDefinitionFieldSetEntity propertyDefinitionFieldSetEntity, int ordinal, eu.eudat.commons.types.descriptiontemplate.FieldEntity currentField, Map<String, Object> properties, Map<UUID, ReferenceTypeDefinitionEntity> referenceTypeDefinitionEntityMap, Map<ReferenceKey, ReferenceEntity> referenceMap){ private void addMultipleField(Dataset item, PropertyDefinitionFieldSetEntity propertyDefinitionFieldSetEntity, int ordinal, org.opencdmp.commons.types.descriptiontemplate.FieldEntity currentField, Map<String, Object> properties, Map<UUID, ReferenceTypeDefinitionEntity> referenceTypeDefinitionEntityMap, Map<ReferenceKey, ReferenceEntity> referenceMap){
PropertyDefinitionFieldSetItemEntity propertyDefinitionFieldSetItemEntity = propertyDefinitionFieldSetEntity.getItems().stream().filter(x-> x.getOrdinal() == ordinal).findFirst().orElse(null); PropertyDefinitionFieldSetItemEntity propertyDefinitionFieldSetItemEntity = propertyDefinitionFieldSetEntity.getItems().stream().filter(x-> x.getOrdinal() == ordinal).findFirst().orElse(null);
if (propertyDefinitionFieldSetItemEntity == null){ if (propertyDefinitionFieldSetItemEntity == null){
@ -326,7 +326,7 @@ public class DatasetMigrationService {
propertyDefinitionFieldSetItemEntity.getFields().put(currentField.getId(), this.buildField(item, currentField, properties, referenceTypeDefinitionEntityMap, referenceMap)); propertyDefinitionFieldSetItemEntity.getFields().put(currentField.getId(), this.buildField(item, currentField, properties, referenceTypeDefinitionEntityMap, referenceMap));
} }
private void addSimpleField(Dataset item, PropertyDefinitionEntity propertyDefinitionEntity, FieldSetEntity currentFieldSet, eu.eudat.commons.types.descriptiontemplate.FieldEntity currentField, Map<String, Object> properties, Map<UUID, ReferenceTypeDefinitionEntity> referenceTypeDefinitionEntityMap, Map<ReferenceKey, ReferenceEntity> referenceMap){ private void addSimpleField(Dataset item, PropertyDefinitionEntity propertyDefinitionEntity, FieldSetEntity currentFieldSet, org.opencdmp.commons.types.descriptiontemplate.FieldEntity currentField, Map<String, Object> properties, Map<UUID, ReferenceTypeDefinitionEntity> referenceTypeDefinitionEntityMap, Map<ReferenceKey, ReferenceEntity> referenceMap){
PropertyDefinitionFieldSetEntity propertyDefinitionFieldSetEntity = propertyDefinitionEntity.getFieldSets().getOrDefault(currentFieldSet.getId(), null); PropertyDefinitionFieldSetEntity propertyDefinitionFieldSetEntity = propertyDefinitionEntity.getFieldSets().getOrDefault(currentFieldSet.getId(), null);
if (propertyDefinitionFieldSetEntity == null) { if (propertyDefinitionFieldSetEntity == null) {
propertyDefinitionFieldSetEntity = new PropertyDefinitionFieldSetEntity(); propertyDefinitionFieldSetEntity = new PropertyDefinitionFieldSetEntity();
@ -369,7 +369,7 @@ public class DatasetMigrationService {
propertyDefinitionFieldSetItemEntity.setComment(comment); propertyDefinitionFieldSetItemEntity.setComment(comment);
} }
private FieldEntity buildField(Dataset item, eu.eudat.commons.types.descriptiontemplate.FieldEntity currentField, Map<String, Object> properties, Map<UUID, ReferenceTypeDefinitionEntity> referenceTypeDefinitionEntityMap, Map<ReferenceKey, ReferenceEntity> referenceMap){ private FieldEntity buildField(Dataset item, org.opencdmp.commons.types.descriptiontemplate.FieldEntity currentField, Map<String, Object> properties, Map<UUID, ReferenceTypeDefinitionEntity> referenceTypeDefinitionEntityMap, Map<ReferenceKey, ReferenceEntity> referenceMap){
FieldEntity fieldEntity = new FieldEntity(); FieldEntity fieldEntity = new FieldEntity();
String textValue = properties.get(currentField.getId()) != null ? properties.get(currentField.getId()).toString() : null; String textValue = properties.get(currentField.getId()) != null ? properties.get(currentField.getId()).toString() : null;
if (textValue == null || textValue.isEmpty()) return fieldEntity; if (textValue == null || textValue.isEmpty()) return fieldEntity;
@ -723,12 +723,12 @@ public class DatasetMigrationService {
data.setSourceType(ReferenceSourceType.External); data.setSourceType(ReferenceSourceType.External);
data.setTypeId(referenceTypeDataEntity.getReferenceTypeId()); data.setTypeId(referenceTypeDataEntity.getReferenceTypeId());
data.setIsActive(IsActive.Active); data.setIsActive(IsActive.Active);
eu.eudat.commons.types.reference.DefinitionEntity definitionEntity = new eu.eudat.commons.types.reference.DefinitionEntity(); org.opencdmp.commons.types.reference.DefinitionEntity definitionEntity = new org.opencdmp.commons.types.reference.DefinitionEntity();
definitionEntity.setFields(new ArrayList<>()); definitionEntity.setFields(new ArrayList<>());
for (Map.Entry<String, Object> entries : item.entrySet()){ for (Map.Entry<String, Object> entries : item.entrySet()){
if (entries.getValue() != null && !entries.getKey().equals("name") && !entries.getKey().equals("label")&& !entries.getKey().equals("abbreviation") if (entries.getValue() != null && !entries.getKey().equals("name") && !entries.getKey().equals("label")&& !entries.getKey().equals("abbreviation")
&& !entries.getKey().equals("id") && !entries.getKey().equals("key") && !entries.getKey().equals("pid")&& !entries.getKey().equals("source")) { && !entries.getKey().equals("id") && !entries.getKey().equals("key") && !entries.getKey().equals("pid")&& !entries.getKey().equals("source")) {
eu.eudat.commons.types.reference.FieldEntity field = new eu.eudat.commons.types.reference.FieldEntity(); org.opencdmp.commons.types.reference.FieldEntity field = new org.opencdmp.commons.types.reference.FieldEntity();
field.setCode(entries.getKey()); field.setCode(entries.getKey());
field.setDataType(ReferenceFieldDataType.Text); field.setDataType(ReferenceFieldDataType.Text);
field.setValue(entries.getValue().toString()); field.setValue(entries.getValue().toString());
@ -1003,7 +1003,7 @@ public class DatasetMigrationService {
} }
private void createDescriptionReferenceEntity(UUID referenceId, UUID descriptionId, eu.eudat.commons.types.descriptiontemplate.FieldEntity currentField ){ private void createDescriptionReferenceEntity(UUID referenceId, UUID descriptionId, org.opencdmp.commons.types.descriptiontemplate.FieldEntity currentField ){
DescriptionReferenceEntity data = new DescriptionReferenceEntity(); DescriptionReferenceEntity data = new DescriptionReferenceEntity();
data.setId(UUID.randomUUID()); data.setId(UUID.randomUUID());
data.setReferenceId(referenceId); data.setReferenceId(referenceId);
@ -1015,7 +1015,7 @@ public class DatasetMigrationService {
this.entityManager.persist(data); this.entityManager.persist(data);
} }
private @NotNull DescriptionReferenceDataEntity buildDescriptionReferenceDataEntity(eu.eudat.commons.types.descriptiontemplate.FieldEntity currentField){ private @NotNull DescriptionReferenceDataEntity buildDescriptionReferenceDataEntity(org.opencdmp.commons.types.descriptiontemplate.FieldEntity currentField){
DescriptionReferenceDataEntity data = new DescriptionReferenceDataEntity(); DescriptionReferenceDataEntity data = new DescriptionReferenceDataEntity();
data.setFieldId(currentField.getId()); data.setFieldId(currentField.getId());
return data; return data;

View File

@ -1,7 +1,7 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.data.DescriptionReferenceEntity; import org.opencdmp.data.DescriptionReferenceEntity;
import eu.old.eudat.data.dao.entities.*; import eu.old.eudat.data.dao.entities.*;
import eu.old.eudat.data.entities.*; import eu.old.eudat.data.entities.*;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;

View File

@ -1,18 +1,18 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.FieldType; import org.opencdmp.commons.enums.FieldType;
import eu.eudat.commons.types.descriptiontemplate.*; import org.opencdmp.commons.types.descriptiontemplate.*;
import eu.eudat.commons.types.descriptiontemplate.fielddata.BaseFieldDataEntity; import org.opencdmp.commons.types.descriptiontemplate.fielddata.BaseFieldDataEntity;
import eu.eudat.commons.types.descriptiontemplate.fielddata.LabelDataEntity; import org.opencdmp.commons.types.descriptiontemplate.fielddata.LabelDataEntity;
import eu.eudat.commons.types.descriptiontemplate.fielddata.ReferenceTypeDataEntity; import org.opencdmp.commons.types.descriptiontemplate.fielddata.ReferenceTypeDataEntity;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.DescriptionTemplateEntity; import org.opencdmp.data.DescriptionTemplateEntity;
import eu.eudat.data.ReferenceTypeEntity; import org.opencdmp.data.ReferenceTypeEntity;
import eu.eudat.model.DescriptionTemplate; import org.opencdmp.model.DescriptionTemplate;
import eu.eudat.model.ReferenceType; import org.opencdmp.model.ReferenceType;
import eu.eudat.query.DescriptionTemplateQuery; import org.opencdmp.query.DescriptionTemplateQuery;
import eu.eudat.query.ReferenceTypeQuery; import org.opencdmp.query.ReferenceTypeQuery;
import gr.cite.tools.data.query.Ordering; import gr.cite.tools.data.query.Ordering;
import gr.cite.tools.data.query.Paging; import gr.cite.tools.data.query.Paging;
import gr.cite.tools.data.query.QueryFactory; import gr.cite.tools.data.query.QueryFactory;

View File

@ -1,20 +1,20 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.annotation.JsonValue;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.*; import org.opencdmp.commons.enums.*;
import eu.eudat.commons.types.descriptiontemplate.*; import org.opencdmp.commons.types.descriptiontemplate.*;
import eu.eudat.commons.types.descriptiontemplate.fielddata.*; import org.opencdmp.commons.types.descriptiontemplate.fielddata.*;
import eu.eudat.commons.types.externalfetcher.*; import org.opencdmp.commons.types.externalfetcher.*;
import eu.eudat.commons.types.referencetype.*; import org.opencdmp.commons.types.referencetype.*;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.DescriptionTemplateEntity; import org.opencdmp.data.DescriptionTemplateEntity;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.eudat.data.ReferenceTypeEntity; import org.opencdmp.data.ReferenceTypeEntity;
import eu.eudat.data.converters.enums.DatabaseEnum; import org.opencdmp.data.converters.enums.DatabaseEnum;
import eu.eudat.model.DescriptionTemplate; import org.opencdmp.model.DescriptionTemplate;
import eu.eudat.query.DescriptionTemplateQuery; import org.opencdmp.query.DescriptionTemplateQuery;
import eu.eudat.query.ReferenceTypeQuery; import org.opencdmp.query.ReferenceTypeQuery;
import eu.old.eudat.logic.services.helpers.HelpersService; import eu.old.eudat.logic.services.helpers.HelpersService;
import eu.old.eudat.logic.utilities.builders.XmlBuilder; import eu.old.eudat.logic.utilities.builders.XmlBuilder;
import eu.old.eudat.models.data.components.commons.Multiplicity; import eu.old.eudat.models.data.components.commons.Multiplicity;
@ -436,7 +436,7 @@ public class DescriptionTemplateXmlMigrationService {
} }
case DATASET_IDENTIFIER, VALIDATION -> { case DATASET_IDENTIFIER, VALIDATION -> {
if(!this.conventionService.isNullOrEmpty(textValue)) { if(!this.conventionService.isNullOrEmpty(textValue)) {
eu.eudat.commons.types.descriptiontemplate.ExternalIdentifierEntity externalIdentifierEntity = migrationTools.tryParseJsonAsObjectString(eu.eudat.commons.types.descriptiontemplate.ExternalIdentifierEntity.class, textValue); org.opencdmp.commons.types.descriptiontemplate.ExternalIdentifierEntity externalIdentifierEntity = migrationTools.tryParseJsonAsObjectString(org.opencdmp.commons.types.descriptiontemplate.ExternalIdentifierEntity.class, textValue);
if (externalIdentifierEntity == null) throw new MyApplicationException("Could not parse dataset External Identifier : " + textValue); if (externalIdentifierEntity == null) throw new MyApplicationException("Could not parse dataset External Identifier : " + textValue);
data.setExternalIdentifier(externalIdentifierEntity); data.setExternalIdentifier(externalIdentifierEntity);
} }

View File

@ -1,16 +1,16 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.DmpBlueprintExtraFieldDataType; import org.opencdmp.commons.enums.DmpBlueprintExtraFieldDataType;
import eu.eudat.commons.enums.DmpBlueprintFieldCategory; import org.opencdmp.commons.enums.DmpBlueprintFieldCategory;
import eu.eudat.commons.enums.DmpBlueprintSystemFieldType; import org.opencdmp.commons.enums.DmpBlueprintSystemFieldType;
import eu.eudat.commons.types.dmpblueprint.*; import org.opencdmp.commons.types.dmpblueprint.*;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.DescriptionTemplateEntity; import org.opencdmp.data.DescriptionTemplateEntity;
import eu.eudat.data.DmpBlueprintEntity; import org.opencdmp.data.DmpBlueprintEntity;
import eu.eudat.model.DmpBlueprint; import org.opencdmp.model.DmpBlueprint;
import eu.eudat.query.DescriptionTemplateQuery; import org.opencdmp.query.DescriptionTemplateQuery;
import eu.eudat.query.DmpBlueprintQuery; import org.opencdmp.query.DmpBlueprintQuery;
import eu.old.eudat.logic.utilities.builders.XmlBuilder; import eu.old.eudat.logic.utilities.builders.XmlBuilder;
import eu.old.eudat.models.data.entities.xmlmodels.dmpprofiledefinition.*; import eu.old.eudat.models.data.entities.xmlmodels.dmpprofiledefinition.*;
import eu.old.eudat.models.data.entities.xmlmodels.dmpprofiledefinition.types.FieldCategory; import eu.old.eudat.models.data.entities.xmlmodels.dmpprofiledefinition.types.FieldCategory;
@ -60,7 +60,7 @@ public class DmpBlueprintXmlMigrationService {
int page = 0; int page = 0;
List<DmpBlueprintEntity> items; List<DmpBlueprintEntity> items;
List<DescriptionTemplateEntity> descriptionTemplateEntities = this.queryFactory.query(DescriptionTemplateQuery.class).collectAs(new BaseFieldSet().ensure(eu.eudat.model.DescriptionTemplate._id).ensure(eu.eudat.model.DescriptionTemplate._groupId)); List<DescriptionTemplateEntity> descriptionTemplateEntities = this.queryFactory.query(DescriptionTemplateQuery.class).collectAs(new BaseFieldSet().ensure(org.opencdmp.model.DescriptionTemplate._id).ensure(org.opencdmp.model.DescriptionTemplate._groupId));
Map<UUID, UUID> descriptionTemplateGroupMap = new HashMap<>(); Map<UUID, UUID> descriptionTemplateGroupMap = new HashMap<>();
for (DescriptionTemplateEntity descriptionTemplateEntity: descriptionTemplateEntities) { for (DescriptionTemplateEntity descriptionTemplateEntity: descriptionTemplateEntities) {
descriptionTemplateGroupMap.put(descriptionTemplateEntity.getId(), descriptionTemplateEntity.getGroupId()); descriptionTemplateGroupMap.put(descriptionTemplateEntity.getId(), descriptionTemplateEntity.getGroupId());
@ -94,8 +94,8 @@ public class DmpBlueprintXmlMigrationService {
} while (items != null && !items.isEmpty() && !TestMode); } while (items != null && !items.isEmpty() && !TestMode);
} }
private @NotNull eu.eudat.commons.types.dmpblueprint.DefinitionEntity buildDefinitionEntity(DataManagementPlanBlueprint dataManagementPlanBlueprint, Map<UUID, UUID> descriptionTemplateGroupMap ) { private @NotNull org.opencdmp.commons.types.dmpblueprint.DefinitionEntity buildDefinitionEntity(DataManagementPlanBlueprint dataManagementPlanBlueprint, Map<UUID, UUID> descriptionTemplateGroupMap ) {
eu.eudat.commons.types.dmpblueprint.DefinitionEntity data = new DefinitionEntity(); org.opencdmp.commons.types.dmpblueprint.DefinitionEntity data = new DefinitionEntity();
if (dataManagementPlanBlueprint == null) if (dataManagementPlanBlueprint == null)
return data; return data;
if (!this.conventionService.isListNullOrEmpty(dataManagementPlanBlueprint.getSections())) { if (!this.conventionService.isListNullOrEmpty(dataManagementPlanBlueprint.getSections())) {
@ -135,8 +135,8 @@ public class DmpBlueprintXmlMigrationService {
return data; return data;
} }
private @NotNull eu.eudat.commons.types.dmpblueprint.DescriptionTemplateEntity buildDescriptionTemplateEntity(DescriptionTemplate itm, Map<UUID, UUID> descriptionTemplateGroupMap ) { private @NotNull org.opencdmp.commons.types.dmpblueprint.DescriptionTemplateEntity buildDescriptionTemplateEntity(DescriptionTemplate itm, Map<UUID, UUID> descriptionTemplateGroupMap ) {
eu.eudat.commons.types.dmpblueprint.DescriptionTemplateEntity data = new eu.eudat.commons.types.dmpblueprint.DescriptionTemplateEntity(); org.opencdmp.commons.types.dmpblueprint.DescriptionTemplateEntity data = new org.opencdmp.commons.types.dmpblueprint.DescriptionTemplateEntity();
if (itm == null) if (itm == null)
return data; return data;
UUID groupId = descriptionTemplateGroupMap.getOrDefault(itm.getDescriptionTemplateId(), null); UUID groupId = descriptionTemplateGroupMap.getOrDefault(itm.getDescriptionTemplateId(), null);
@ -154,7 +154,7 @@ public class DmpBlueprintXmlMigrationService {
} }
private @NotNull eu.eudat.commons.types.dmpblueprint.FieldEntity buildFieldEntity(FieldModel itm) { private @NotNull org.opencdmp.commons.types.dmpblueprint.FieldEntity buildFieldEntity(FieldModel itm) {
if (itm == null) if (itm == null)
return new ExtraFieldEntity(); return new ExtraFieldEntity();
FieldEntity data; FieldEntity data;

View File

@ -1,13 +1,13 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import eu.eudat.commons.JsonHandlingService; import org.opencdmp.commons.JsonHandlingService;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.data.DmpBlueprintEntity; import org.opencdmp.data.DmpBlueprintEntity;
import eu.eudat.data.DmpDescriptionTemplateEntity; import org.opencdmp.data.DmpDescriptionTemplateEntity;
import eu.eudat.query.DmpBlueprintQuery; import org.opencdmp.query.DmpBlueprintQuery;
import eu.eudat.query.DmpDescriptionTemplateQuery; import org.opencdmp.query.DmpDescriptionTemplateQuery;
import eu.old.eudat.data.dao.entities.DmpDatasetProfileDao; import eu.old.eudat.data.dao.entities.DmpDatasetProfileDao;
import eu.old.eudat.data.entities.DMPDatasetProfile; import eu.old.eudat.data.entities.DMPDatasetProfile;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;
@ -24,7 +24,7 @@ import jakarta.xml.bind.JAXBException;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import eu.eudat.commons.types.dmpblueprint.DefinitionEntity; import org.opencdmp.commons.types.dmpblueprint.DefinitionEntity;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import java.io.IOException; import java.io.IOException;

View File

@ -1,21 +1,21 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import eu.eudat.commons.JsonHandlingService; import org.opencdmp.commons.JsonHandlingService;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.*; import org.opencdmp.commons.enums.*;
import eu.eudat.commons.types.dmp.DmpBlueprintValueEntity; import org.opencdmp.commons.types.dmp.DmpBlueprintValueEntity;
import eu.eudat.commons.types.dmp.DmpContactEntity; import org.opencdmp.commons.types.dmp.DmpContactEntity;
import eu.eudat.commons.types.dmp.DmpPropertiesEntity; import org.opencdmp.commons.types.dmp.DmpPropertiesEntity;
import eu.eudat.commons.types.dmpblueprint.ReferenceTypeFieldEntity; import org.opencdmp.commons.types.dmpblueprint.ReferenceTypeFieldEntity;
import eu.eudat.commons.types.dmpblueprint.SectionEntity; import org.opencdmp.commons.types.dmpblueprint.SectionEntity;
import eu.eudat.commons.types.dmpreference.DmpReferenceDataEntity; import org.opencdmp.commons.types.dmpreference.DmpReferenceDataEntity;
import eu.eudat.commons.types.reference.DefinitionEntity; import org.opencdmp.commons.types.reference.DefinitionEntity;
import eu.eudat.commons.types.reference.FieldEntity; import org.opencdmp.commons.types.reference.FieldEntity;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.*; import org.opencdmp.data.*;
import eu.eudat.model.DmpBlueprint; import org.opencdmp.model.DmpBlueprint;
import eu.eudat.query.DmpBlueprintQuery; import org.opencdmp.query.DmpBlueprintQuery;
import eu.old.eudat.data.dao.entities.DMPDao; import eu.old.eudat.data.dao.entities.DMPDao;
import eu.old.eudat.data.entities.*; import eu.old.eudat.data.entities.*;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;
@ -86,7 +86,7 @@ public class DmpMigrationService {
List<DmpBlueprintEntity> dmpBlueprintEntities = this.queryFactory.query(DmpBlueprintQuery.class).ids(items.stream().filter(x-> x.getProfile() != null).map(x-> x.getProfile().getId()).distinct().collect(Collectors.toList())).collectAs(new BaseFieldSet().ensure(DmpBlueprint._definition).ensure(DmpBlueprint._id)); List<DmpBlueprintEntity> dmpBlueprintEntities = this.queryFactory.query(DmpBlueprintQuery.class).ids(items.stream().filter(x-> x.getProfile() != null).map(x-> x.getProfile().getId()).distinct().collect(Collectors.toList())).collectAs(new BaseFieldSet().ensure(DmpBlueprint._definition).ensure(DmpBlueprint._id));
Map<UUID, List<ReferenceTypeFieldEntity>> referenceTypeFieldsByDmpBlueprintId = new HashMap<>(); Map<UUID, List<ReferenceTypeFieldEntity>> referenceTypeFieldsByDmpBlueprintId = new HashMap<>();
for (DmpBlueprintEntity dmpBlueprintEntity : dmpBlueprintEntities) { for (DmpBlueprintEntity dmpBlueprintEntity : dmpBlueprintEntities) {
eu.eudat.commons.types.dmpblueprint.DefinitionEntity definition = this.xmlHandlingService.fromXml(eu.eudat.commons.types.dmpblueprint.DefinitionEntity.class, dmpBlueprintEntity.getDefinition()); org.opencdmp.commons.types.dmpblueprint.DefinitionEntity definition = this.xmlHandlingService.fromXml(org.opencdmp.commons.types.dmpblueprint.DefinitionEntity.class, dmpBlueprintEntity.getDefinition());
List<ReferenceTypeFieldEntity> referenceTypeFieldEntities = definition.getSections().stream().filter(x-> x.getFields() != null).map(SectionEntity::getFields).flatMap(List::stream).filter(x-> x.getCategory().equals(DmpBlueprintFieldCategory.ReferenceType)).map(x-> (ReferenceTypeFieldEntity)x) List<ReferenceTypeFieldEntity> referenceTypeFieldEntities = definition.getSections().stream().filter(x-> x.getFields() != null).map(SectionEntity::getFields).flatMap(List::stream).filter(x-> x.getCategory().equals(DmpBlueprintFieldCategory.ReferenceType)).map(x-> (ReferenceTypeFieldEntity)x)
.filter(x-> x.getReferenceTypeId().equals(ReferenceTypeIds.License) || x.getReferenceTypeId().equals(ReferenceTypeIds.Project) || x.getReferenceTypeId().equals(ReferenceTypeIds.Researcher) .filter(x-> x.getReferenceTypeId().equals(ReferenceTypeIds.License) || x.getReferenceTypeId().equals(ReferenceTypeIds.Project) || x.getReferenceTypeId().equals(ReferenceTypeIds.Researcher)
|| x.getReferenceTypeId().equals(ReferenceTypeIds.Grants) || x.getReferenceTypeId().equals(ReferenceTypeIds.Organizations) || x.getReferenceTypeId().equals(ReferenceTypeIds.Funder)) || x.getReferenceTypeId().equals(ReferenceTypeIds.Grants) || x.getReferenceTypeId().equals(ReferenceTypeIds.Organizations) || x.getReferenceTypeId().equals(ReferenceTypeIds.Funder))

View File

@ -1,8 +1,8 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.enums.DmpUserRole; import org.opencdmp.commons.enums.DmpUserRole;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.data.DmpUserEntity; import org.opencdmp.data.DmpUserEntity;
import eu.old.eudat.data.dao.entities.UserDmpDao; import eu.old.eudat.data.dao.entities.UserDmpDao;
import eu.old.eudat.data.entities.UserDMP; import eu.old.eudat.data.entities.UserDMP;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;

View File

@ -1,8 +1,8 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.commons.enums.ReferenceSourceType; import org.opencdmp.commons.enums.ReferenceSourceType;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.old.eudat.data.dao.entities.ExternalDatasetDao; import eu.old.eudat.data.dao.entities.ExternalDatasetDao;
import eu.old.eudat.data.entities.ExternalDataset; import eu.old.eudat.data.entities.ExternalDataset;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;

View File

@ -1,11 +1,11 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.commons.enums.ReferenceFieldDataType; import org.opencdmp.commons.enums.ReferenceFieldDataType;
import eu.eudat.commons.enums.ReferenceSourceType; import org.opencdmp.commons.enums.ReferenceSourceType;
import eu.eudat.commons.types.reference.DefinitionEntity; import org.opencdmp.commons.types.reference.DefinitionEntity;
import eu.eudat.commons.types.reference.FieldEntity; import org.opencdmp.commons.types.reference.FieldEntity;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.old.eudat.data.dao.entities.FunderDao; import eu.old.eudat.data.dao.entities.FunderDao;
import eu.old.eudat.data.entities.Funder; import eu.old.eudat.data.entities.Funder;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;

View File

@ -1,13 +1,13 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.commons.enums.ReferenceFieldDataType; import org.opencdmp.commons.enums.ReferenceFieldDataType;
import eu.eudat.commons.enums.ReferenceSourceType; import org.opencdmp.commons.enums.ReferenceSourceType;
import eu.eudat.commons.types.reference.DefinitionEntity; import org.opencdmp.commons.types.reference.DefinitionEntity;
import eu.eudat.commons.types.reference.FieldEntity; import org.opencdmp.commons.types.reference.FieldEntity;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.old.eudat.data.dao.entities.GrantDao; import eu.old.eudat.data.dao.entities.GrantDao;
import eu.old.eudat.data.entities.Grant; import eu.old.eudat.data.entities.Grant;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;

View File

@ -1,7 +1,7 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.JsonHandlingService; import org.opencdmp.commons.JsonHandlingService;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

View File

@ -1,13 +1,13 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.commons.enums.ReferenceFieldDataType; import org.opencdmp.commons.enums.ReferenceFieldDataType;
import eu.eudat.commons.enums.ReferenceSourceType; import org.opencdmp.commons.enums.ReferenceSourceType;
import eu.eudat.commons.types.reference.DefinitionEntity; import org.opencdmp.commons.types.reference.DefinitionEntity;
import eu.eudat.commons.types.reference.FieldEntity; import org.opencdmp.commons.types.reference.FieldEntity;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.old.eudat.data.dao.entities.OrganisationDao; import eu.old.eudat.data.dao.entities.OrganisationDao;
import eu.old.eudat.data.entities.Organisation; import eu.old.eudat.data.entities.Organisation;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;

View File

@ -1,13 +1,13 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.commons.enums.ReferenceFieldDataType; import org.opencdmp.commons.enums.ReferenceFieldDataType;
import eu.eudat.commons.enums.ReferenceSourceType; import org.opencdmp.commons.enums.ReferenceSourceType;
import eu.eudat.commons.types.reference.DefinitionEntity; import org.opencdmp.commons.types.reference.DefinitionEntity;
import eu.eudat.commons.types.reference.FieldEntity; import org.opencdmp.commons.types.reference.FieldEntity;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.old.eudat.data.dao.entities.ProjectDao; import eu.old.eudat.data.dao.entities.ProjectDao;
import eu.old.eudat.data.entities.Project; import eu.old.eudat.data.entities.Project;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;

View File

@ -1,13 +1,13 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.commons.enums.ReferenceFieldDataType; import org.opencdmp.commons.enums.ReferenceFieldDataType;
import eu.eudat.commons.enums.ReferenceSourceType; import org.opencdmp.commons.enums.ReferenceSourceType;
import eu.eudat.commons.types.reference.DefinitionEntity; import org.opencdmp.commons.types.reference.DefinitionEntity;
import eu.eudat.commons.types.reference.FieldEntity; import org.opencdmp.commons.types.reference.FieldEntity;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.old.eudat.data.dao.entities.RegistryDao; import eu.old.eudat.data.dao.entities.RegistryDao;
import eu.old.eudat.data.entities.Registry; import eu.old.eudat.data.entities.Registry;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;

View File

@ -1,13 +1,13 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.commons.enums.ReferenceFieldDataType; import org.opencdmp.commons.enums.ReferenceFieldDataType;
import eu.eudat.commons.enums.ReferenceSourceType; import org.opencdmp.commons.enums.ReferenceSourceType;
import eu.eudat.commons.types.reference.DefinitionEntity; import org.opencdmp.commons.types.reference.DefinitionEntity;
import eu.eudat.commons.types.reference.FieldEntity; import org.opencdmp.commons.types.reference.FieldEntity;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.old.eudat.data.dao.entities.ResearcherDao; import eu.old.eudat.data.dao.entities.ResearcherDao;
import eu.old.eudat.data.entities.Researcher; import eu.old.eudat.data.entities.Researcher;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;

View File

@ -1,13 +1,13 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.commons.enums.ReferenceFieldDataType; import org.opencdmp.commons.enums.ReferenceFieldDataType;
import eu.eudat.commons.enums.ReferenceSourceType; import org.opencdmp.commons.enums.ReferenceSourceType;
import eu.eudat.commons.types.reference.DefinitionEntity; import org.opencdmp.commons.types.reference.DefinitionEntity;
import eu.eudat.commons.types.reference.FieldEntity; import org.opencdmp.commons.types.reference.FieldEntity;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.old.eudat.data.dao.entities.ServiceDao; import eu.old.eudat.data.dao.entities.ServiceDao;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;
import gr.cite.tools.logging.LoggerService; import gr.cite.tools.logging.LoggerService;

View File

@ -1,15 +1,15 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.XmlHandlingService; import org.opencdmp.commons.XmlHandlingService;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.commons.enums.ReferenceFieldDataType; import org.opencdmp.commons.enums.ReferenceFieldDataType;
import eu.eudat.commons.enums.ReferenceSourceType; import org.opencdmp.commons.enums.ReferenceSourceType;
import eu.eudat.commons.enums.StorageType; import org.opencdmp.commons.enums.StorageType;
import eu.eudat.commons.types.reference.DefinitionEntity; import org.opencdmp.commons.types.reference.DefinitionEntity;
import eu.eudat.commons.types.reference.FieldEntity; import org.opencdmp.commons.types.reference.FieldEntity;
import eu.eudat.convention.ConventionService; import org.opencdmp.convention.ConventionService;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.eudat.data.StorageFileEntity; import org.opencdmp.data.StorageFileEntity;
import eu.old.eudat.data.dao.entities.FileUploadDao; import eu.old.eudat.data.dao.entities.FileUploadDao;
import eu.old.eudat.data.dao.entities.ProjectDao; import eu.old.eudat.data.dao.entities.ProjectDao;
import eu.old.eudat.data.entities.FileUpload; import eu.old.eudat.data.entities.FileUpload;

View File

@ -1,9 +1,9 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.data.DescriptionTagEntity; import org.opencdmp.data.DescriptionTagEntity;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.eudat.data.TagEntity; import org.opencdmp.data.TagEntity;
import eu.old.eudat.data.dao.entities.DatasetDao; import eu.old.eudat.data.dao.entities.DatasetDao;
import eu.old.eudat.data.entities.Dataset; import eu.old.eudat.data.entities.Dataset;
import eu.old.eudat.elastic.entities.Tag; import eu.old.eudat.elastic.entities.Tag;

View File

@ -1,7 +1,7 @@
package eu.old.eudat.migration; package eu.old.eudat.migration;
import eu.eudat.commons.enums.ContactInfoType; import org.opencdmp.commons.enums.ContactInfoType;
import eu.eudat.data.UserContactInfoEntity; import org.opencdmp.data.UserContactInfoEntity;
import eu.old.eudat.data.dao.entities.UserInfoDao; import eu.old.eudat.data.dao.entities.UserInfoDao;
import eu.old.eudat.data.entities.Credential; import eu.old.eudat.data.entities.Credential;
import eu.old.eudat.data.entities.UserInfo; import eu.old.eudat.data.entities.UserInfo;

View File

@ -2,15 +2,15 @@ package eu.old.eudat.migration;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import eu.eudat.commons.JsonHandlingService; import org.opencdmp.commons.JsonHandlingService;
import eu.eudat.commons.enums.IsActive; import org.opencdmp.commons.enums.IsActive;
import eu.eudat.commons.enums.ReferenceSourceType; import org.opencdmp.commons.enums.ReferenceSourceType;
import eu.eudat.commons.types.user.AdditionalInfoEntity; import org.opencdmp.commons.types.user.AdditionalInfoEntity;
import eu.eudat.data.ReferenceEntity; import org.opencdmp.data.ReferenceEntity;
import eu.eudat.data.UserEntity; import org.opencdmp.data.UserEntity;
import eu.eudat.model.User; import org.opencdmp.model.User;
import eu.eudat.query.ReferenceQuery; import org.opencdmp.query.ReferenceQuery;
import eu.eudat.query.UserQuery; import org.opencdmp.query.UserQuery;
import eu.old.eudat.data.dao.entities.UserInfoDao; import eu.old.eudat.data.dao.entities.UserInfoDao;
import eu.old.eudat.data.entities.UserInfo; import eu.old.eudat.data.entities.UserInfo;
import eu.old.eudat.logic.services.operations.DatabaseRepository; import eu.old.eudat.logic.services.operations.DatabaseRepository;

View File

@ -7,7 +7,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
@SpringBootApplication( @SpringBootApplication(
scanBasePackages = { scanBasePackages = {
"eu.eudat", "gr.cite.notification.*",
"gr.cite", "gr.cite",
"gr.cite.queueoutbox", "gr.cite.queueoutbox",
"gr.cite.queueinbox", "gr.cite.queueinbox",

View File

@ -12,14 +12,14 @@ permissions:
EditTenant: EditTenant:
roles: roles:
- Admin - Admin
clients: [ "opendmp-api-dev" ] clients: [ "opencdmp-api-dev" ]
allowAnonymous: false allowAnonymous: false
allowAuthenticated: false allowAuthenticated: false
DeleteTenant: DeleteTenant:
roles: roles:
- Admin - Admin
claims: [ ] claims: [ ]
clients: [ "opendmp-api-dev" ] clients: [ "opencdmp-api-dev" ]
allowAnonymous: false allowAnonymous: false
allowAuthenticated: false allowAuthenticated: false
AllowNoTenant: AllowNoTenant:
@ -39,21 +39,21 @@ permissions:
EditUser: EditUser:
roles: roles:
- TenantAdmin - TenantAdmin
clients: [ "opendmp-api-dev" ] clients: [ "opencdmp-api-dev" ]
allowAnonymous: false allowAnonymous: false
allowAuthenticated: false allowAuthenticated: false
DeleteUser: DeleteUser:
roles: roles:
- TenantAdmin - TenantAdmin
claims: [ ] claims: [ ]
clients: [ "opendmp-api-dev" ] clients: [ "opencdmp-api-dev" ]
allowAnonymous: false allowAnonymous: false
allowAuthenticated: false allowAuthenticated: false
# UserContactInfo # UserContactInfo
BrowseUserContactInfo: BrowseUserContactInfo:
roles: roles:
- TenantAdmin - TenantAdmin
clients: [ "opendmp-api-dev" ] clients: [ "opencdmp-api-dev" ]
allowAnonymous: true allowAnonymous: true
allowAuthenticated: false allowAuthenticated: false
EditUserContactInfo: EditUserContactInfo:
@ -66,7 +66,7 @@ permissions:
roles: roles:
- TenantAdmin - TenantAdmin
claims: [ ] claims: [ ]
clients: [ "opendmp-api-dev" ] clients: [ "opencdmp-api-dev" ]
allowAnonymous: false allowAnonymous: false
allowAuthenticated: false allowAuthenticated: false
#Notification #Notification
@ -99,13 +99,13 @@ permissions:
EditTenantConfiguration: EditTenantConfiguration:
roles: roles:
- TenantAdmin - TenantAdmin
clients: [ "opendmp-api-dev" ] clients: [ "opencdmp-api-dev" ]
allowAnonymous: false allowAnonymous: false
allowAuthenticated: false allowAuthenticated: false
DeleteTenantConfiguration: DeleteTenantConfiguration:
roles: roles:
- TenantAdmin - TenantAdmin
clients: [ "opendmp-api-dev" ] clients: [ "opencdmp-api-dev" ]
allowAnonymous: false allowAnonymous: false
allowAuthenticated: false allowAuthenticated: false
#User Notification Preference #User Notification Preference

View File

@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>gr.cite</groupId> <groupId>gr.cite</groupId>
<artifactId>notification-service-parent</artifactId> <artifactId>notification-service-parent</artifactId>
<name>OpenDMP Notification Parent</name> <name>Notification Parent</name>
<version>${revision}</version> <version>${revision}</version>
<packaging>pom</packaging> <packaging>pom</packaging>