removed unused method

This commit is contained in:
Antonis Lempesis 2022-06-30 11:35:15 +00:00
parent f4516845dd
commit 504efc4244
3 changed files with 0 additions and 39 deletions

View File

@ -225,13 +225,6 @@ public class RepositoryController {
return repositoryService.getUrlsOfUserRepos(((OIDCAuthenticationToken) SecurityContextHolder.getContext().getAuthentication()).getUserInfo().getEmail(), page, size);
}
@RequestMapping(value = "/getDatasourceVocabularies/{mode}", method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public List<String> getDatasourceVocabularies(@PathVariable("mode") String mode) {
return repositoryService.getDatasourceVocabularies(mode);
}
@RequestMapping(value = "/getCompatibilityClasses/{mode}", method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody

View File

@ -82,8 +82,6 @@ public interface RepositoryService {
String page,
String size);
List<String> getDatasourceVocabularies(String mode);
Map<String, String> getCompatibilityClasses(String mode);
Map<String, String> getDatasourceClasses(String mode);

View File

@ -399,9 +399,6 @@ public class RepositoryServiceImpl implements RepositoryService {
List<AggregationDetails> aggregationHistory = new ArrayList<>(Converter.getAggregationHistoryFromJson(aggregationInfo));
return aggregationHistory;
// return aggregationHistory.size() == 0 ? aggregationHistory : aggregationHistory.stream()
// .sorted(Comparator.comparing(AggregationDetails::getDate).reversed())
// .collect(Collectors.toList());
}
@Override
@ -756,33 +753,6 @@ public class RepositoryServiceImpl implements RepositoryService {
return Arrays.asList(restTemplate.postForObject(uriComponents.toUri(), requestFilter, String[].class));
}
@Override
public List<String> getDatasourceVocabularies(String mode) {
List<String> resultSet = new ArrayList<>();
for (Map.Entry<String, String> entry : this.getVocabulary("dnet:datasource_typologies").getAsMap().entrySet()) {
if (mode.equalsIgnoreCase("aggregator")) {
if (entry.getKey().contains("aggregator"))
resultSet.add(entry.getValue());
} else if (mode.equalsIgnoreCase("journal")) {
if (entry.getKey().contains("journal"))
resultSet.add(entry.getValue());
} else if (mode.equalsIgnoreCase("opendoar")) {
if (entry.getKey().contains("pubsrepository"))
resultSet.add(entry.getValue());
} else if (mode.equalsIgnoreCase("re3data")) {
if (entry.getKey().contains("datarepository"))
resultSet.add(entry.getValue());
} else if (mode.equalsIgnoreCase("cris")) {
if (entry.getKey().contains("crissystem"))
resultSet.add(entry.getValue());
}
}
return resultSet;
}
private Vocabulary getVocabulary(String vocName) {
if (!vocabularyMap.containsKey(vocName)) {