new_model_for_communities #15

Merged
michele.artini merged 81 commits from new_model_for_communities into master 2023-10-24 08:12:26 +02:00
24 changed files with 60 additions and 60 deletions
Showing only changes of commit d9288c7657 - Show all commits

View File

@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import eu.dnetlib.openaire.community.db.CommunityService;
import eu.dnetlib.openaire.community.CommunityService;
import eu.dnetlib.openaire.exporter.exceptions.CommunityException;
import eu.dnetlib.openaire.exporter.exceptions.ResourceNotFoundException;
import eu.dnetlib.openaire.exporter.model.community.CommunityContentprovider;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db;
package eu.dnetlib.openaire.community;
import java.util.Arrays;
import java.util.LinkedHashSet;
@ -17,21 +17,21 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;
import eu.dnetlib.openaire.community.db.model.DbCommunity;
import eu.dnetlib.openaire.community.db.model.DbDatasource;
import eu.dnetlib.openaire.community.db.model.DbDatasourcePK;
import eu.dnetlib.openaire.community.db.model.DbOrganization;
import eu.dnetlib.openaire.community.db.model.DbProject;
import eu.dnetlib.openaire.community.db.model.DbProjectPK;
import eu.dnetlib.openaire.community.db.model.DbSubCommunity;
import eu.dnetlib.openaire.community.db.model.DbSupportOrg;
import eu.dnetlib.openaire.community.db.repository.DbCommunityRepository;
import eu.dnetlib.openaire.community.db.repository.DbDatasourceRepository;
import eu.dnetlib.openaire.community.db.repository.DbOrganizationRepository;
import eu.dnetlib.openaire.community.db.repository.DbProjectRepository;
import eu.dnetlib.openaire.community.db.repository.DbSubCommunityRepository;
import eu.dnetlib.openaire.community.db.repository.DbSupportOrgRepository;
import eu.dnetlib.openaire.community.db.utils.CommunityMappingUtils;
import eu.dnetlib.openaire.community.model.DbCommunity;
import eu.dnetlib.openaire.community.model.DbDatasource;
import eu.dnetlib.openaire.community.model.DbDatasourcePK;
import eu.dnetlib.openaire.community.model.DbOrganization;
import eu.dnetlib.openaire.community.model.DbProject;
import eu.dnetlib.openaire.community.model.DbProjectPK;
import eu.dnetlib.openaire.community.model.DbSubCommunity;
import eu.dnetlib.openaire.community.model.DbSupportOrg;
import eu.dnetlib.openaire.community.repository.DbCommunityRepository;
import eu.dnetlib.openaire.community.repository.DbDatasourceRepository;
import eu.dnetlib.openaire.community.repository.DbOrganizationRepository;
import eu.dnetlib.openaire.community.repository.DbProjectRepository;
import eu.dnetlib.openaire.community.repository.DbSubCommunityRepository;
import eu.dnetlib.openaire.community.repository.DbSupportOrgRepository;
import eu.dnetlib.openaire.community.utils.CommunityMappingUtils;
import eu.dnetlib.openaire.exporter.exceptions.CommunityException;
import eu.dnetlib.openaire.exporter.exceptions.ResourceNotFoundException;
import eu.dnetlib.openaire.exporter.model.community.CommunityContentprovider;

View File

@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.google.common.collect.Sets;
import eu.dnetlib.openaire.common.ISClient;
import eu.dnetlib.openaire.community.db.model.DbOrganization;
import eu.dnetlib.openaire.community.model.DbOrganization;
import eu.dnetlib.openaire.exporter.exceptions.CommunityException;
import eu.dnetlib.openaire.exporter.model.context.Context;

View File

@ -25,9 +25,9 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Lists;
import eu.dnetlib.openaire.community.db.CommunityService;
import eu.dnetlib.openaire.community.db.model.DbOrganization;
import eu.dnetlib.openaire.community.db.repository.DbOrganizationRepository;
import eu.dnetlib.openaire.community.CommunityService;
import eu.dnetlib.openaire.community.model.DbOrganization;
import eu.dnetlib.openaire.community.repository.DbOrganizationRepository;
import eu.dnetlib.openaire.exporter.exceptions.CommunityException;
import eu.dnetlib.openaire.exporter.model.community.CommunityClaimType;
import eu.dnetlib.openaire.exporter.model.community.CommunityContentprovider;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.model;
package eu.dnetlib.openaire.community.model;
import java.io.Serializable;
import java.time.LocalDateTime;
@ -23,8 +23,8 @@ import com.vladmihalcea.hibernate.type.array.StringArrayType;
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
import com.vladmihalcea.hibernate.type.json.JsonStringType;
import eu.dnetlib.openaire.community.db.utils.CommunityClaimTypeConverter;
import eu.dnetlib.openaire.community.db.utils.CommunityMembershipTypeConverter;
import eu.dnetlib.openaire.community.utils.CommunityClaimTypeConverter;
import eu.dnetlib.openaire.community.utils.CommunityMembershipTypeConverter;
import eu.dnetlib.openaire.exporter.model.community.CommunityClaimType;
import eu.dnetlib.openaire.exporter.model.community.CommunityMembershipType;
import eu.dnetlib.openaire.exporter.model.community.CommunityStatus;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.model;
package eu.dnetlib.openaire.community.model;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.model;
package eu.dnetlib.openaire.community.model;
import java.io.Serializable;
import java.util.Objects;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.model;
package eu.dnetlib.openaire.community.model;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.model;
package eu.dnetlib.openaire.community.model;
import java.io.Serializable;
import java.util.Objects;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.model;
package eu.dnetlib.openaire.community.model;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.model;
package eu.dnetlib.openaire.community.model;
import java.io.Serializable;
import java.util.Objects;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.model;
package eu.dnetlib.openaire.community.model;
import java.io.Serializable;
import java.util.LinkedHashMap;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.model;
package eu.dnetlib.openaire.community.model;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.model;
package eu.dnetlib.openaire.community.model;
import java.io.Serializable;
import java.util.Objects;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.repository;
package eu.dnetlib.openaire.community.repository;
import java.util.List;
@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import eu.dnetlib.openaire.community.db.model.DbCommunity;
import eu.dnetlib.openaire.community.model.DbCommunity;
@ConditionalOnProperty(value = "openaire.exporter.enable.community", havingValue = "true")
public interface DbCommunityRepository extends JpaRepository<DbCommunity, String> {

View File

@ -1,12 +1,12 @@
package eu.dnetlib.openaire.community.db.repository;
package eu.dnetlib.openaire.community.repository;
import java.util.List;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.data.jpa.repository.JpaRepository;
import eu.dnetlib.openaire.community.db.model.DbDatasource;
import eu.dnetlib.openaire.community.db.model.DbDatasourcePK;
import eu.dnetlib.openaire.community.model.DbDatasource;
import eu.dnetlib.openaire.community.model.DbDatasourcePK;
@ConditionalOnProperty(value = "openaire.exporter.enable.community", havingValue = "true")
public interface DbDatasourceRepository extends JpaRepository<DbDatasource, DbDatasourcePK> {

View File

@ -1,12 +1,12 @@
package eu.dnetlib.openaire.community.db.repository;
package eu.dnetlib.openaire.community.repository;
import java.util.List;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.data.jpa.repository.JpaRepository;
import eu.dnetlib.openaire.community.db.model.DbOrganization;
import eu.dnetlib.openaire.community.db.model.DbOrganizationPK;
import eu.dnetlib.openaire.community.model.DbOrganization;
import eu.dnetlib.openaire.community.model.DbOrganizationPK;
@ConditionalOnProperty(value = "openaire.exporter.enable.community", havingValue = "true")
public interface DbOrganizationRepository extends JpaRepository<DbOrganization, DbOrganizationPK> {

View File

@ -1,12 +1,12 @@
package eu.dnetlib.openaire.community.db.repository;
package eu.dnetlib.openaire.community.repository;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.repository.JpaRepository;
import eu.dnetlib.openaire.community.db.model.DbProject;
import eu.dnetlib.openaire.community.db.model.DbProjectPK;
import eu.dnetlib.openaire.community.model.DbProject;
import eu.dnetlib.openaire.community.model.DbProjectPK;
@ConditionalOnProperty(value = "openaire.exporter.enable.community", havingValue = "true")
public interface DbProjectRepository extends JpaRepository<DbProject, DbProjectPK> {

View File

@ -1,11 +1,11 @@
package eu.dnetlib.openaire.community.db.repository;
package eu.dnetlib.openaire.community.repository;
import java.util.List;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.data.jpa.repository.JpaRepository;
import eu.dnetlib.openaire.community.db.model.DbSubCommunity;
import eu.dnetlib.openaire.community.model.DbSubCommunity;
@ConditionalOnProperty(value = "openaire.exporter.enable.community", havingValue = "true")
public interface DbSubCommunityRepository extends JpaRepository<DbSubCommunity, String> {

View File

@ -1,12 +1,12 @@
package eu.dnetlib.openaire.community.db.repository;
package eu.dnetlib.openaire.community.repository;
import java.util.List;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.data.jpa.repository.JpaRepository;
import eu.dnetlib.openaire.community.db.model.DbSupportOrg;
import eu.dnetlib.openaire.community.db.model.DbSupportOrgPK;
import eu.dnetlib.openaire.community.model.DbSupportOrg;
import eu.dnetlib.openaire.community.model.DbSupportOrgPK;
@ConditionalOnProperty(value = "openaire.exporter.enable.community", havingValue = "true")
public interface DbSupportOrgRepository extends JpaRepository<DbSupportOrg, DbSupportOrgPK> {

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.utils;
package eu.dnetlib.openaire.community.utils;
import javax.persistence.AttributeConverter;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.utils;
package eu.dnetlib.openaire.community.utils;
import java.time.LocalDateTime;
import java.util.Arrays;
@ -7,11 +7,11 @@ import java.util.List;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import eu.dnetlib.openaire.community.db.model.DbCommunity;
import eu.dnetlib.openaire.community.db.model.DbDatasource;
import eu.dnetlib.openaire.community.db.model.DbProject;
import eu.dnetlib.openaire.community.db.model.DbSubCommunity;
import eu.dnetlib.openaire.community.db.model.DbSupportOrg;
import eu.dnetlib.openaire.community.model.DbCommunity;
import eu.dnetlib.openaire.community.model.DbDatasource;
import eu.dnetlib.openaire.community.model.DbProject;
import eu.dnetlib.openaire.community.model.DbSubCommunity;
import eu.dnetlib.openaire.community.model.DbSupportOrg;
import eu.dnetlib.openaire.exporter.model.community.CommunityContentprovider;
import eu.dnetlib.openaire.exporter.model.community.CommunityDetails;
import eu.dnetlib.openaire.exporter.model.community.CommunityOrganization;

View File

@ -1,4 +1,4 @@
package eu.dnetlib.openaire.community.db.utils;
package eu.dnetlib.openaire.community.utils;
import javax.persistence.AttributeConverter;

View File

@ -12,9 +12,9 @@ import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import eu.dnetlib.openaire.community.db.CommunityService;
import eu.dnetlib.openaire.community.db.model.DbOrganization;
import eu.dnetlib.openaire.community.db.repository.DbOrganizationRepository;
import eu.dnetlib.openaire.community.CommunityService;
import eu.dnetlib.openaire.community.model.DbOrganization;
import eu.dnetlib.openaire.community.repository.DbOrganizationRepository;
@ExtendWith(MockitoExtension.class)
class CommunityImporterServiceTest {