fixed getting accessSets and accessFormats

This commit is contained in:
Konstantinos Spyrou 2022-09-07 13:29:04 +00:00
parent 0590efba9a
commit 3c41f3206a
3 changed files with 6 additions and 4 deletions

View File

@ -32,7 +32,7 @@ public class RepositoryInterface extends ApiDetails {
if (apiParams != null) {
map = apiParams.stream()
.filter(Objects::nonNull)
.filter(k -> k.getParam() == null && k.getValue() == null)
.filter(k -> k.getParam() != null && k.getValue() != null)
.collect(Collectors.toMap(ApiParamDetails::getParam, ApiParamDetails::getValue));
return map.get("set");
}
@ -48,7 +48,7 @@ public class RepositoryInterface extends ApiDetails {
if (apiParams != null) {
map = apiParams.stream()
.filter(Objects::nonNull)
.filter(k -> k.getParam() == null && k.getValue() == null)
.filter(k -> k.getParam() != null && k.getValue() != null)
.collect(Collectors.toMap(ApiParamDetails::getParam, ApiParamDetails::getValue));
return map.get("format");
}

View File

@ -707,7 +707,9 @@ public class RepositoryServiceImpl implements RepositoryService {
job.setOfficialName(repo.getOfficialname());
job.setRepoType(repo.getEoscDatasourceType());
job.setUserEmail(userEmail);
job.setValidationSet((iFace.getAccessSet().isEmpty() ? "none" : iFace.getAccessSet()));
String accessSet = iFace.getAccessSet();
job.setValidationSet((accessSet.isEmpty() ? "none" : accessSet));
job.setRecords(-1);
job.setRegistration(!updateExisting);
job.setUpdateExisting(updateExisting);

View File

@ -87,7 +87,7 @@ public class HttpUtils {
private JsonElement getResponseEntityAsJsonElement(ResponseEntity<String> responseEntity) {
if (responseEntity != null && responseEntity.getBody() != null) {
logger.info(responseEntity.getBody());
logger.debug(responseEntity.getBody());
try {
return new JsonParser().parse(responseEntity.getBody());
} catch (Exception e) {