Merge pull request 'suite_1.0.6' (!9) from suite_1.0.6 into master

Reviewed-on: #9
This commit is contained in:
Fabio Sinibaldi 2022-11-14 16:47:05 +01:00
commit de73defa53
4 changed files with 16 additions and 8 deletions

View File

@ -2,6 +2,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for org.gcube.data-publishing.gFeed.oai-pmh # Changelog for org.gcube.data-publishing.gFeed.oai-pmh
## [v1.0.8]
Harvested Object profile update
## [v1.0.7] ## [v1.0.7]
- Pom updates - Pom updates

View File

@ -9,7 +9,7 @@
</parent> </parent>
<artifactId>oai-harvester</artifactId> <artifactId>oai-harvester</artifactId>
<name>oai-harvester</name> <name>oai-harvester</name>
<version>1.0.7</version> <version>1.0.8</version>
<scm> <scm>
<connection>scm:git:${gitBaseUrl}/gFeed</connection> <connection>scm:git:${gitBaseUrl}/gFeed</connection>

View File

@ -116,6 +116,8 @@ public class OAIClient {
} }
log.trace("Calling {} ",target.getUri());
Response resp=target.request("application/xml").get(); Response resp=target.request("application/xml").get();
@ -127,11 +129,13 @@ public class OAIClient {
//No errors, thus reset attempt counter //No errors, thus reset attempt counter
currentAttempt=1; currentAttempt=1;
toReturn.addAll(msg.getResponseRecords().getRecords()); if(msg.getResponseRecords().getRecords()!=null)
toReturn.addAll(msg.getResponseRecords().getRecords());
else log.info("NB {} didn't returned any record",msg.getRequest().getPath());
log.debug("Parsed "+toReturn.size()+" records so far."); log.debug("Parsed "+toReturn.size()+" records so far.");
Token t=msg.getResponseRecords().getResumptionToken(); Token t=msg.getResponseRecords().getResumptionToken();
log.debug("Obtained token : "+t); log.debug("Obtained token : "+t);
if(t!=null && t.getId()!=null && !t.getId().isEmpty()) { if(t!=null && t.getId()!=null && !t.getId().isEmpty()) {
@ -144,7 +148,7 @@ public class OAIClient {
isComplete=true; isComplete=true;
} }
}catch(Throwable t) { }catch(Throwable t) {
log.warn("Unexpected ERROR "+t.getMessage()); log.warn("Unexpected ERROR ",t);
log.debug("Current attempt number = "+currentAttempt," max attempt Number = "+MAX_ATTEMPTS+", attempts delay factor = "); log.debug("Current attempt number = "+currentAttempt," max attempt Number = "+MAX_ATTEMPTS+", attempts delay factor = ");
isComplete=currentAttempt>MAX_ATTEMPTS; isComplete=currentAttempt>MAX_ATTEMPTS;
try { try {

View File

@ -56,7 +56,7 @@
<mandatory>false</mandatory> <mandatory>false</mandatory>
<dataType>String</dataType> <dataType>String</dataType>
<maxOccurs>*</maxOccurs> <maxOccurs>*</maxOccurs>
<tagging create="true" separator=" ">onValue</tagging> <!-- <tagging create="true" separator=" ">onValue</tagging> -->
</metadatafield> </metadatafield>
<metadatafield categoryref="Harvested Object"> <metadatafield categoryref="Harvested Object">
<fieldName>relation</fieldName> <fieldName>relation</fieldName>
@ -81,7 +81,7 @@
<mandatory>false</mandatory> <mandatory>false</mandatory>
<dataType>String</dataType> <dataType>String</dataType>
<maxOccurs>*</maxOccurs> <maxOccurs>*</maxOccurs>
<tagging create="true" separator=" ">onValue</tagging> <!-- <tagging create="true" separator=" ">onValue</tagging> -->
</metadatafield> </metadatafield>
<metadatafield categoryref="Harvested Object"> <metadatafield categoryref="Harvested Object">
<fieldName>title</fieldName> <fieldName>title</fieldName>
@ -94,6 +94,6 @@
<mandatory>false</mandatory> <mandatory>false</mandatory>
<dataType>String</dataType> <dataType>String</dataType>
<maxOccurs>*</maxOccurs> <maxOccurs>*</maxOccurs>
<tagging create="true" separator=" ">onValue</tagging> <!-- <tagging create="true" separator=" ">onValue</tagging> -->
</metadatafield> </metadatafield>
</metadataformat> </metadataformat>