Fixed compile issues

This commit is contained in:
George Kalampokis 2020-10-07 14:22:37 +03:00
parent d856255405
commit 7a3b4a18ca
20 changed files with 29 additions and 29 deletions

View File

@ -38,7 +38,7 @@ public class DataRepositoryManager {
public List<DataRepositoryModel> getDataRepositories(String query, String type, Principal principal) throws HugeResultSet, NoURLFound {
ExternalUrlCriteria externalUrlCriteria = new ExternalUrlCriteria(query);
List<Map<String, Object>> remoteRepos = this.apiContext.getOperationsContext().getRemoteFetcher().getRepositories(externalUrlCriteria, type);
List<Map<String, String>> remoteRepos = this.apiContext.getOperationsContext().getRemoteFetcher().getRepositories(externalUrlCriteria, type);
DataRepositoryCriteria criteria = new DataRepositoryCriteria();
if (!query.isEmpty()) criteria.setLike(query);

View File

@ -57,7 +57,7 @@ public class ExternalDatasetManager {
// Fetch external Datasets from external sources.
ExternalUrlCriteria externalUrlCriteria = new ExternalUrlCriteria(query);
List<Map<String, Object>> remoteRepos = remoteFetcher.getDatasets(externalUrlCriteria, type);
List<Map<String, String>> remoteRepos = remoteFetcher.getDatasets(externalUrlCriteria, type);
// Parse items from external sources to listing models.
ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

View File

@ -42,7 +42,7 @@ public class FunderManager {
QueryableList<eu.eudat.data.entities.Funder> authItems = apiContext.getOperationsContext().getDatabaseRepository().getFunderDao().getAuthenticated(items, userInfo);
List<Funder> funders = authItems.select(item -> new eu.eudat.models.data.funder.Funder().fromDataModel(item));
ExternalUrlCriteria externalUrlCriteria = new ExternalUrlCriteria(funderCriteria.getCriteria().getLike());
List<Map<String, Object>> remoteRepos = remoteFetcher.getFunders(externalUrlCriteria);
List<Map<String, String>> remoteRepos = remoteFetcher.getFunders(externalUrlCriteria);
FundersExternalSourcesModel fundersExternalSourcesModel = new FundersExternalSourcesModel().fromExternalItem(remoteRepos);
for (ExternalSourcesItemModel externalListingItem : fundersExternalSourcesModel) {
eu.eudat.models.data.funder.Funder funder = apiContext.getOperationsContext().getBuilderFactory().getBuilder(FunderBuilder.class)

View File

@ -126,7 +126,7 @@ public class GrantManager {
QueryableList<eu.eudat.data.entities.Grant> authItems = apiContext.getOperationsContext().getDatabaseRepository().getGrantDao().getAuthenticated(items, userInfo);
List<eu.eudat.models.data.grant.Grant> grants = authItems.select(item -> new Grant().fromDataModel(item));
List<Map<String, Object>> remoteRepos = remoteFetcher.getGrants(externalUrlCriteria);
List<Map<String, String>> remoteRepos = remoteFetcher.getGrants(externalUrlCriteria);
GrantsExternalSourcesModel grantsExternalSourcesModel = new GrantsExternalSourcesModel().fromExternalItem(remoteRepos);
for (ExternalSourcesItemModel externalListingItem : grantsExternalSourcesModel) {

View File

@ -33,7 +33,7 @@ public class LicenseManager {
public List<LicenseModel> getLicenses(String query, String type) throws HugeResultSet, NoURLFound {
ExternalUrlCriteria externalUrlCriteria = new ExternalUrlCriteria(query);
List<Map<String, Object>> remoteRepos = this.apiContext.getOperationsContext().getRemoteFetcher().getlicenses(externalUrlCriteria, type);
List<Map<String, String>> remoteRepos = this.apiContext.getOperationsContext().getRemoteFetcher().getlicenses(externalUrlCriteria, type);
DataRepositoryCriteria criteria = new DataRepositoryCriteria();
if (!query.isEmpty()) criteria.setLike(query);

View File

@ -68,7 +68,7 @@ public class OrganisationsManager {
public List<Organisation> getCriteriaWithExternal(String query, String type) throws HugeResultSet, NoURLFound {
ExternalUrlCriteria externalUrlCriteria = new ExternalUrlCriteria(query);
List<Map<String, Object>> remoteRepos = apiContext.getOperationsContext().getRemoteFetcher().getOrganisations(externalUrlCriteria, type);
List<Map<String, String>> remoteRepos = apiContext.getOperationsContext().getRemoteFetcher().getOrganisations(externalUrlCriteria, type);
OrganisationsExternalSourcesModel organisationsExternalSourcesModel = new OrganisationsExternalSourcesModel().fromExternalItem(remoteRepos);
List<Organisation> organisations = new LinkedList<>();
for (ExternalSourcesItemModel externalListingItem : organisationsExternalSourcesModel) {

View File

@ -41,7 +41,7 @@ public class ProjectManager {
QueryableList<eu.eudat.data.entities.Project> authItems = apiContext.getOperationsContext().getDatabaseRepository().getProjectDao().getAuthenticated(items, userInfo);
List<Project> projects = authItems.select(item -> new Project().fromDataModel(item));
ExternalUrlCriteria externalUrlCriteria = new ExternalUrlCriteria(projectCriteria.getCriteria().getLike());
List<Map<String, Object>> remoteRepos = remoteFetcher.getProjects(externalUrlCriteria);
List<Map<String, String>> remoteRepos = remoteFetcher.getProjects(externalUrlCriteria);
ProjectsExternalSourcesModel projectsExternalSourcesModel = new ProjectsExternalSourcesModel().fromExternalItem(remoteRepos);
for (ExternalSourcesItemModel externalListingItem : projectsExternalSourcesModel) {
eu.eudat.models.data.project.Project project = apiContext.getOperationsContext().getBuilderFactory().getBuilder(ProjectBuilder.class)

View File

@ -39,7 +39,7 @@ public class RegistryManager {
public List<RegistryModel> getRegistries(String query, String type, Principal principal) throws HugeResultSet, NoURLFound {
ExternalUrlCriteria externalUrlCriteria = new ExternalUrlCriteria(query);
List<Map<String, Object>> remoteRepos = this.apiContext.getOperationsContext().getRemoteFetcher().getRegistries(externalUrlCriteria, type);
List<Map<String, String>> remoteRepos = this.apiContext.getOperationsContext().getRemoteFetcher().getRegistries(externalUrlCriteria, type);
RegistryCriteria criteria = new RegistryCriteria();
if (!query.isEmpty()) criteria.setLike(query);

View File

@ -57,7 +57,7 @@ public class ResearcherManager {
item.setTag(keyToSourceMap.get(item.getKey()));
}
ExternalUrlCriteria externalUrlCriteria = new ExternalUrlCriteria(researcherCriteriaRequest.getCriteria().getName());
List<Map<String, Object>> remoteRepos = remoteFetcher.getResearchers(externalUrlCriteria,null);
List<Map<String, String>> remoteRepos = remoteFetcher.getResearchers(externalUrlCriteria,null);
ResearchersExternalSourcesModel researchersExternalSourcesModel = new ResearchersExternalSourcesModel().fromExternalItem(remoteRepos);
for (ExternalSourcesItemModel externalListingItem : researchersExternalSourcesModel) {
eu.eudat.models.data.dmp.Researcher researcher = apiContext.getOperationsContext().getBuilderFactory().getBuilder(ResearcherBuilder.class)

View File

@ -36,7 +36,7 @@ public class ServiceManager {
public List<ServiceModel> getServices(String query, String type, Principal principal) throws HugeResultSet, NoURLFound {
ExternalUrlCriteria externalUrlCriteria = new ExternalUrlCriteria(query);
List<Map<String, Object>> remoteRepos = this.apiContext.getOperationsContext().getRemoteFetcher().getServices(externalUrlCriteria, type);
List<Map<String, String>> remoteRepos = this.apiContext.getOperationsContext().getRemoteFetcher().getServices(externalUrlCriteria, type);
ServiceCriteria criteria = new ServiceCriteria();
if (!query.isEmpty()) criteria.setLike(query);

View File

@ -6,8 +6,8 @@ import java.util.Map;
public class ExternalDatasetSourcesModel extends ExternalListingItem<ExternalDatasetSourcesModel> {
@Override
public ExternalDatasetSourcesModel fromExternalItem(List<Map<String, Object>> values) {
for (Map<String, Object> item : values) {
public ExternalDatasetSourcesModel fromExternalItem(List<Map<String, String>> values) {
for (Map<String, String> item : values) {
ExternalSourcesItemModel model = new ExternalSourcesItemModel();
model.setId((String)item.get("pid"));
model.setUri((String)item.get("uri"));

View File

@ -5,5 +5,5 @@ import java.util.Map;
public interface ExternalItem<T> {
T fromExternalItem(List<Map<String, Object>> values);
T fromExternalItem(List<Map<String, String>> values);
}

View File

@ -6,8 +6,8 @@ import java.util.Map;
public class FundersExternalSourcesModel extends ExternalListingItem<FundersExternalSourcesModel> {
@Override
public FundersExternalSourcesModel fromExternalItem(List<Map<String, Object>> values) {
for (Map<String, Object> item : values) {
public FundersExternalSourcesModel fromExternalItem(List<Map<String, String>> values) {
for (Map<String, String> item : values) {
ExternalSourcesItemModel model = new ExternalSourcesItemModel();
model.setRemoteId((String)item.get("pid"));
model.setUri((String)item.get("uri"));

View File

@ -6,8 +6,8 @@ import java.util.Map;
public class GrantsExternalSourcesModel extends ExternalListingItem<GrantsExternalSourcesModel> {
@Override
public GrantsExternalSourcesModel fromExternalItem(List<Map<String, Object>> values) {
for (Map<String, Object> item : values) {
public GrantsExternalSourcesModel fromExternalItem(List<Map<String, String>> values) {
for (Map<String, String> item : values) {
ExternalSourcesItemModel model = new ExternalSourcesItemModel();
model.setRemoteId((String)item.get("pid"));
model.setUri((String)item.get("uri"));

View File

@ -6,8 +6,8 @@ import java.util.Map;
public class LicensesExternalSourcesModel extends ExternalListingItem<LicensesExternalSourcesModel> {
@Override
public LicensesExternalSourcesModel fromExternalItem(List<Map<String, Object>> values) {
for (Map<String, Object> item : values) {
public LicensesExternalSourcesModel fromExternalItem(List<Map<String, String>> values) {
for (Map<String, String> item : values) {
ExternalSourcesItemModel model = new ExternalSourcesItemModel();
model.setId((String)item.get("id"));
model.setUri((String)item.get("uri"));

View File

@ -8,8 +8,8 @@ import java.util.Map;
@Component
public class OrganisationsExternalSourcesModel extends ExternalListingItem<OrganisationsExternalSourcesModel> {
@Override
public OrganisationsExternalSourcesModel fromExternalItem(List<Map<String, Object>> values) {
for (Map<String, Object> item : values) {
public OrganisationsExternalSourcesModel fromExternalItem(List<Map<String, String>> values) {
for (Map<String, String> item : values) {
ExternalSourcesItemModel model = new ExternalSourcesItemModel();
model.setRemoteId((String)item.get("pid"));
model.setUri((String)item.get("uri"));

View File

@ -14,8 +14,8 @@ public class ProjectsExternalSourcesModel extends ExternalListingItem<ProjectsEx
private static final ObjectMapper mapper = new ObjectMapper();
@Override
public ProjectsExternalSourcesModel fromExternalItem(List<Map<String, Object>> values) {
for (Map<String, Object> item : values) {
public ProjectsExternalSourcesModel fromExternalItem(List<Map<String, String>> values) {
for (Map<String, String> item : values) {
ExternalSourcesItemModel model = new ExternalSourcesItemModel();
try {
JsonNode node = mapper.readTree(mapper.writeValueAsBytes(item));

View File

@ -6,8 +6,8 @@ import java.util.Map;
public class RegistriesExternalSourcesModel extends ExternalListingItem<RegistriesExternalSourcesModel> {
@Override
public RegistriesExternalSourcesModel fromExternalItem(List<Map<String, Object>> values) {
for (Map<String, Object> item : values) {
public RegistriesExternalSourcesModel fromExternalItem(List<Map<String, String>> values) {
for (Map<String, String> item : values) {
ExternalSourcesItemModel model = new ExternalSourcesItemModel();
model.setId((String)item.get("pid"));
model.setUri((String)item.get("uri"));

View File

@ -6,8 +6,8 @@ import java.util.Map;
public class ServiceExternalSourcesModel extends ExternalListingItem<ServiceExternalSourcesModel> {
@Override
public ServiceExternalSourcesModel fromExternalItem(List<Map<String, Object>> values) {
for (Map<String, Object> item : values) {
public ServiceExternalSourcesModel fromExternalItem(List<Map<String, String>> values) {
for (Map<String, String> item : values) {
ExternalSourcesItemModel model = new ExternalSourcesItemModel();
model.setId((String)item.get("pid"));
model.setUri((String)item.get("label"));

View File

@ -9,8 +9,8 @@ import java.util.Map;
public class TagExternalSourcesModel extends ExternalListingItem<TagExternalSourcesModel> {
@Override
public TagExternalSourcesModel fromExternalItem(List<Map<String, Object>> values) {
for (Map<String, Object> item : values) {
public TagExternalSourcesModel fromExternalItem(List<Map<String, String>> values) {
for (Map<String, String> item : values) {
ExternalSourcesItemModel model = new ExternalSourcesItemModel();
model.setId((String)item.get("pid"));
model.setUri((String)item.get("label"));