mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 18:14:26 +00:00
DS-764 applying patch from Jira
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@6460 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -567,6 +567,7 @@ public class DSpaceOAICatalog extends AbstractCatalog
|
|||||||
true, true, true, includeAll); // Need items, containers + withdrawals
|
true, true, true, includeAll); // Need items, containers + withdrawals
|
||||||
|
|
||||||
// Build list of XML records from item info objects
|
// Build list of XML records from item info objects
|
||||||
|
int ignore = 0;
|
||||||
for (HarvestedItemInfo itemInfo : itemInfos)
|
for (HarvestedItemInfo itemInfo : itemInfos)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -583,6 +584,7 @@ public class DSpaceOAICatalog extends AbstractCatalog
|
|||||||
* range don't have the requested metadata format available.
|
* range don't have the requested metadata format available.
|
||||||
* I'll just log it for now.
|
* I'll just log it for now.
|
||||||
*/
|
*/
|
||||||
|
ignore++;
|
||||||
if (log.isDebugEnabled())
|
if (log.isDebugEnabled())
|
||||||
{
|
{
|
||||||
log.debug(LogManager.getHeader(context, "oai_warning",
|
log.debug(LogManager.getHeader(context, "oai_warning",
|
||||||
@@ -595,11 +597,11 @@ public class DSpaceOAICatalog extends AbstractCatalog
|
|||||||
// Put results in form needed to return
|
// Put results in form needed to return
|
||||||
results.put("records", records.iterator());
|
results.put("records", records.iterator());
|
||||||
|
|
||||||
log.info(LogManager.getHeader(context, "oai_harvest", "results=" + records.size()));
|
log.info(LogManager.getHeader(context, "oai_harvest", "results=" + records.size() + ", ignore=" + ignore));
|
||||||
|
|
||||||
// If we have MAX_RECORDS records, we need to provide a resumption
|
// If we have MAX_RECORDS records, we need to provide a resumption
|
||||||
// token
|
// token
|
||||||
if (records.size() >= MAX_RECORDS)
|
if ((records.size() + ignore) >= MAX_RECORDS)
|
||||||
{
|
{
|
||||||
String resumptionToken = makeResumptionToken(from, until, set,
|
String resumptionToken = makeResumptionToken(from, until, set,
|
||||||
metadataPrefix, offset + MAX_RECORDS);
|
metadataPrefix, offset + MAX_RECORDS);
|
||||||
|
Reference in New Issue
Block a user