fixed re3data lastCollectionDate

This commit is contained in:
Konstantinos Spyrou 2022-08-05 13:24:32 +00:00
parent c7b7d37ae3
commit 2afd3ef412
1 changed files with 12 additions and 1 deletions

View File

@ -900,8 +900,19 @@ public class RepositoryServiceImpl implements RepositoryService {
Map<String, String> dates = new HashMap<>();
if (mode.equals("repository")) {
dates.put("opendoar", converter.toString(getRepositoryInterface("openaire____::opendoar").get(0).getLastCollectionDate()));
dates.put("re3data", converter.toString(getRepositoryInterface("openaire____::re3data").get(1).getLastCollectionDate()));
dates.put("fairsharing", converter.toString(getRepositoryInterface("openaire____::fairsharing").get(0).getLastCollectionDate()));
// create re3data last collection date
// dates.put("re3data", converter.toString(getRepositoryInterface("openaire____::re3data").get(1).getLastCollectionDate()));
List<RepositoryInterface> re3interfaces = getRepositoryInterface("openaire____::re3data");
String re3Date = null;
for (RepositoryInterface interf : re3interfaces) {
if (interf.getLastCollectionDate() != null) {
re3Date = converter.toString(interf.getLastCollectionDate());
break;
}
}
dates.put("re3data", re3Date);
return dates;
}
else if (mode.equals("cris"))