diff --git a/oaipmh-core/TODO b/oaipmh-core/TODO index e9522f96b227bbc80f58d6354670951dba07070e..64694748e162ea7b995cdbabf68ef0fce490a794 100644 --- a/oaipmh-core/TODO +++ b/oaipmh-core/TODO @@ -1,22 +1,22 @@ 1. change identifier from 123.0 to textgrid:123.0 in all/the getRecord requests, must be equal to the identifiers we get with the getIdentifiers() method - DONE 2. implement sets (for the prootype :) - DONE 3. implement resumption tokens (later) - +DONE 4. remove "yo" in class RecordDeliverer :-) +DONE 5. DONE :D 6. Fetch earliestTimestamp from ElasticSearch? +DONE diff --git a/oaipmh-core/pom.xml b/oaipmh-core/pom.xml index c8fe00a7ce1fda101842621187c343b12d3b1e1d..cb3f98efe0c4f9207842e1c81c8748818f6e0e00 100644 --- a/oaipmh-core/pom.xml +++ b/oaipmh-core/pom.xml @@ -4,7 +4,7 @@ <parent> <artifactId>oaipmh</artifactId> <groupId>info.textgrid.middleware</groupId> - <version>2.5.3-SNAPSHOT</version> + <version>2.5.4-SNAPSHOT</version> </parent> <groupId>info.textgrid.middleware</groupId> <artifactId>oaipmh-core</artifactId> diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDeliverer.java b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDeliverer.java index e384d2fbe5329e30ddf40f8dd5bdea37b12ad628..d1e9a73d9d665e0e4ca6153e841f5e01aaeb9b0c 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDeliverer.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDeliverer.java @@ -109,7 +109,7 @@ public class RecordListDeliverer { private static Map<String, Integer> cursorCollector = new Hashtable<String, Integer >(); - long searchResponseSize = 10; + private long searchResponseSize; BigInteger valueToAdd = BigInteger.valueOf(searchResponseSize); ResumptionTokenType resTokenForResponse = new ResumptionTokenType(); @@ -284,7 +284,7 @@ public class RecordListDeliverer { }else { System.out.println("NO RESTOKEN FOUND"); resTokenForResponse.setCursor(BigInteger.valueOf((int)searchResponseSize)); - cursorCollector.put(scrollResp.getScrollId(), (int)searchResponseSize + 90); + cursorCollector.put(scrollResp.getScrollId(), (int)searchResponseSize); System.out.println(cursorCollector.get(scrollResp.getScrollId())); //System.out.println("withOUTtoken" + cursorCollector.get(resumptionToken) + (int)searchResponseSize); } @@ -754,6 +754,14 @@ public class RecordListDeliverer { public void setIdentifierField(String identifierField) { this.identifierField = identifierField; } + + public long getSearchResponseSize() { + return searchResponseSize; + } + + public void setIdentifierField(long searchResponseSize) { + this.searchResponseSize = searchResponseSize; + } diff --git a/oaipmh-webapp/pom.xml b/oaipmh-webapp/pom.xml index 2d8d62d122bf5a8a61beef06c68f838a382ed25e..a7866a8cb38256060e62315437b00b42067da421 100644 --- a/oaipmh-webapp/pom.xml +++ b/oaipmh-webapp/pom.xml @@ -4,7 +4,7 @@ <parent> <artifactId>oaipmh</artifactId> <groupId>info.textgrid.middleware</groupId> - <version>2.5.3-SNAPSHOT</version> + <version>2.5.4-SNAPSHOT</version> </parent> <groupId>info.textgrid.middleware</groupId> <artifactId>oaipmh-webapp</artifactId> diff --git a/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml b/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml index f4f077d05e68c9312db271e50801c810b88db53c..98d3c61a3bcfa8af6639d4c9e352b2b0c8255b14 100644 --- a/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml +++ b/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml @@ -109,6 +109,7 @@ <property name="types" value="${typeList}" /> <property name="modifiedField" value="${modifiedField}" /> <property name="identifierField" value="${identifierField}" /> + <property name="searchResponseSize" value="${cursorSize}" /> </bean> <bean id="Record" class="info.textgrid.middleware.RecordDeliverer"> diff --git a/pom.xml b/pom.xml index 1513b8293f44b591321c717d8085d624131ff84c..c03e0d2978d13da913fd5ed55928e945315c4722 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>info.textgrid.middleware</groupId> <artifactId>oaipmh</artifactId> - <version>2.5.3-SNAPSHOT</version> + <version>2.5.4-SNAPSHOT</version> <packaging>pom</packaging> <name>DARIAHDE :: OAI-PMH DataProvider</name> <properties>