diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/IdentifierListDelivererIDIOM.java b/oaipmh-core/src/main/java/info/textgrid/middleware/IdentifierListDelivererIDIOM.java index e7256c8341fba2fa54acf7119f4d008330205d3f..31a108a8749c40d2dda5a357ef8d20ad964384d5 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/IdentifierListDelivererIDIOM.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/IdentifierListDelivererIDIOM.java @@ -130,6 +130,7 @@ public class IdentifierListDelivererIDIOM extends IdentifierListDelivererAbstrac identifierList.getHeader() .add(idiomRecord.getRecordById(textgridURI.replace(".0", "")).getRecord().getHeader()); } + /* * for (String artefactURI : artefactURIs) { RecordDelivererIDIOM idiomRecord = new * RecordDelivererIDIOM(true, false); identifierList.getHeader() @@ -139,6 +140,9 @@ public class IdentifierListDelivererIDIOM extends IdentifierListDelivererAbstrac // Check the need for a resumption token! ResumptionTokenType resTokenForResponse = OAIPMHUtilities.getResumptionToken(completeListSize, resumptionToken, cursorCollector, scrollID, this.idiomResponseSize, i); + + log.info("ResumptionToken from Utils: " + resTokenForResponse); + if (resTokenForResponse != null) { identifierList.setResumptionToken(resTokenForResponse); } diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java b/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java index 59eeeb5da5299193ead8e27b223fb9ed37e00bb0..517465913b2d33527b5264793434736ed045eb7b 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java @@ -382,8 +382,8 @@ public class OAIPMHImpl implements OAIPMHProducer { } else { // We have got an invalid resumptionToken here! ErrorHandler e = new ErrorHandler(); - e.setError(OAIPMHConstants.OAI_BAD_RESUMPTION_TOKEN, "The value of the " - + request.getResumptionToken() + " argument is invalid or expired."); + e.setError(OAIPMHConstants.OAI_BAD_RESUMPTION_TOKEN, + "The value of the resumptionToken is invalid or expired."); oaipmhRoot.getError().add(e.getError()); return oaipmhRoot; } @@ -572,8 +572,8 @@ public class OAIPMHImpl implements OAIPMHProducer { } else { // We have got an invalid resumptionToken here! ErrorHandler e = new ErrorHandler(); - e.setError(OAIPMHConstants.OAI_BAD_RESUMPTION_TOKEN, "The value of the " - + request.getResumptionToken() + " argument is invalid or expired."); + e.setError(OAIPMHConstants.OAI_BAD_RESUMPTION_TOKEN, + "The value of the resumptionToken is invalid or expired."); oaipmhRoot.getError().add(e.getError()); return oaipmhRoot; } diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHUtilities.java b/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHUtilities.java index 36cc24935844f7221b7d2f4559b9b2564450f04a..1c77bfd913405ba519403965fc93b3692df7b1f2 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHUtilities.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHUtilities.java @@ -295,6 +295,8 @@ public class OAIPMHUtilities { cursorCollector.put(scrollID, searchResponseSize); cursor = searchResponseSize; resTokenForResponse.setCursor(BigInteger.valueOf((long) cursor)); + + log.info("New ResumptionToken created from scroll ID: " + cursorCollector.get(scrollID)); } // Set resumption token string if cursor is less then complete list size: More objects can be diff --git a/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java b/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java index 823ed8fe73cf0c8b136a3854a42c4f577c924f3b..7c0d873b0d7c709c8f06ae7a5438f998dda29652 100644 --- a/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java +++ b/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java @@ -30,7 +30,7 @@ import org.junit.Test; * * @author Stefan E. Funk, SUB Göttingen */ -@Ignore +//@Ignore public class OaiPmhTextgridOnlineTests { // TODO Configure config files for all the different OAI-PMH service instances!