Safe iteration
This commit is contained in:
parent
a9aad3724d
commit
977623247c
|
@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
# Changelog for org.gcube.data-publishing.gFeed.oai-pmh
|
||||
|
||||
## [1.0.5-SNAPSHOT] - 2020-12-15
|
||||
Do not stop on single repository error
|
||||
|
||||
## [1.0.4] - 2020-12-15
|
||||
- Dependency management
|
||||
- Naming Convention
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</parent>
|
||||
<artifactId>oai-harvester</artifactId>
|
||||
<name>oai-harvester</name>
|
||||
<version>1.0.4</version>
|
||||
<version>1.0.5-SNAPSHOT</version>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:${gitBaseUrl}/gFeed</connection>
|
||||
|
|
|
@ -27,12 +27,16 @@ public class OAICollector implements DataCollector<OAIRecord> {
|
|||
AccessPoint point=epr.profile().accessPoints().asCollection().iterator().next();
|
||||
String baseUrl=point.address();
|
||||
log.debug("Address is "+baseUrl);
|
||||
OAIClient client = new OAIClient(baseUrl);
|
||||
point.properties().iterator().forEachRemaining((Property p)->{
|
||||
if(p.name().equals("set"))
|
||||
client.getSpecifiedSets().add(p.value());
|
||||
});
|
||||
toReturn.addAll(client.getAll(OAIClient.DC_METADATA_PREFIX));
|
||||
try {
|
||||
OAIClient client = new OAIClient(baseUrl);
|
||||
point.properties().iterator().forEachRemaining((Property p)->{
|
||||
if(p.name().equals("set"))
|
||||
client.getSpecifiedSets().add(p.value());
|
||||
});
|
||||
toReturn.addAll(client.getAll(OAIClient.DC_METADATA_PREFIX));
|
||||
}catch(Throwable t) {
|
||||
log.warn("Unable to use repository "+epr.id()+" NAME : "+epr.profile().name(),t);
|
||||
}
|
||||
}
|
||||
|
||||
return toReturn;
|
||||
|
|
Loading…
Reference in New Issue