merge fix

This commit is contained in:
Efstratios Giannopoulos 2024-02-28 18:51:16 +02:00
parent ef50193175
commit 1a8180c64e
2 changed files with 6 additions and 6 deletions

View File

@ -741,7 +741,7 @@ public class DatasetMigrationService {
}
if (this.conventionService.isNullOrEmpty(data.getReference())) {
if (referenceTypeDefinition.getSources().stream().filter(x-> x.getType().equals(ReferenceTypeSourceType.API)).map(x-> (ExternalFetcherApiSourceConfigurationEntity)x).anyMatch(x-> x.getUrl().toLowerCase(Locale.ROOT).contains("eestore.paas2.uninett.no"))){
if (referenceTypeDefinition.getSources().stream().filter(x-> x.getType().equals(ExternalFetcherSourceType.API)).map(x-> (ExternalFetcherApiSourceConfigurationEntity)x).anyMatch(x-> x.getUrl().toLowerCase(Locale.ROOT).contains("eestore.paas2.uninett.no"))){
if (data.getLabel().equalsIgnoreCase("Attribution 4.0 International")){
data.setReference("CC-BY-4.0");
} else if (data.getLabel().equalsIgnoreCase("Attribution-NonCommercial 4.0 International")){

View File

@ -537,7 +537,7 @@ public class DescriptionTemplateXmlMigrationService {
apiEntity.setQueries(new ArrayList<>());
apiEntity.getQueries().add(this.buildQueryConfigEntity(parsedUrl));
apiEntity.setType(ReferenceTypeSourceType.API);
apiEntity.setType(ExternalFetcherSourceType.API);
apiEntity.setKey(source);
apiEntity.setLabel(source);
apiEntity.setOrdinal(ordinal);
@ -603,15 +603,15 @@ public class DescriptionTemplateXmlMigrationService {
return data;
}
private ReferenceTypeExternalApiHTTPMethodType toReferenceTypeExternalApiHTTPMethodType(String method){
private ExternalFetcherApiHTTPMethodType toReferenceTypeExternalApiHTTPMethodType(String method){
if (this.conventionService.isNullOrEmpty(method)) {
logger.error("Migrate DescriptionTemplate autocomplete method not set use default GET");
return ReferenceTypeExternalApiHTTPMethodType.GET;
return ExternalFetcherApiHTTPMethodType.GET;
} else if (method.toLowerCase(Locale.ROOT).trim().equals("get")) {
return ReferenceTypeExternalApiHTTPMethodType.GET;
return ExternalFetcherApiHTTPMethodType.GET;
} else if (method.toLowerCase(Locale.ROOT).trim().equals("post")) {
return ReferenceTypeExternalApiHTTPMethodType.POST;
return ExternalFetcherApiHTTPMethodType.POST;
} else {
logger.error("Migrate DescriptionTemplate autocomplete method is invalid " + method);
throw new MyApplicationException("Migrate DescriptionTemplate autocomplete method is invalid " + method);