Skip to content
Snippets Groups Projects
Commit 9d839df2 authored by mbrodhu's avatar mbrodhu
Browse files

solved false and no verb param

parent 82399c44
No related branches found
No related tags found
No related merge requests found
......@@ -97,43 +97,6 @@ public class OAIPMHUtilities {
return auth.getProjectInfo(projectID).getName();
}
public static List<String> urisFromSparqlResponse(InputStream in) {
List<String> urilist = new ArrayList<String>();
String theString;
try {
theString = IOUtils.toString(in, "UTF-8");
System.out.println(theString);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
XMLStreamReader r = XMLInputFactory.newInstance()
.createXMLStreamReader(in);
while (r.hasNext()) {
if ((r.next() == XMLStreamConstants.START_ELEMENT)) {
System.out.println(r.getLocalName());
}
/*
if ((r.next() == XMLStreamConstants.START_ELEMENT) && (r.getLocalName().equals("uri"))) {
// if (r.getLocalName().equals("uri")) {
String uri = r.getElementText();
// log.debug("uri: " + uri);
urilist.add(uri);
// }
}*/
}
} catch (XMLStreamException e) {
log.error("error parsing sparql-result-stream", e);
}
System.out.println("urilistSize: " + urilist.size());
return urilist;
}
/**
* <p>
* Producing the list of all metadata formats.
......@@ -257,9 +220,10 @@ public class OAIPMHUtilities {
cursorCollector.put(scrollID, cursor);
} else {
resTokenForResponse.setCursor(BigInteger.valueOf(searchResponseSize));
cursorCollector.put(scrollID, searchResponseSize);
cursorCollector.put(scrollID, searchResponseSize);
cursor = 0;
System.out.println("CURSOR: " + cursor);
resTokenForResponse.setCursor(BigInteger.valueOf((long) cursor));
}
// Set resumption token string if cursor is less then complete list size: More objects can be
......
......@@ -48,8 +48,7 @@ public abstract class RecordListDelivererAbstract implements RecordListDeliverer
boolean restokDCExisting = RecordListDelivererDC.cursorCollector != null
&& RecordListDelivererDC.cursorCollector.containsKey(request.getResumptionToken());
if (!restokDCExisting && !restokIDIOMExisting) {
System.out.println("BLA");
if (!restokDCExisting && !restokIDIOMExisting) {
result.setError(TGConstants.OAI_BAD_RESUMPTION_TOKEN, "The value of the "
+ request.getResumptionToken() + " argument is invalid or expired.");
}
......
......@@ -272,10 +272,12 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract {
completeListSize, resumptionToken, cursorCollector, scrollID, this.searchResponseSize, i);
System.out.println(completeListSize);
System.out.println(resumptionToken);
System.out.println(cursorCollector);
//System.out.println(cursorCollector);
System.out.println(scrollID);
System.out.println(this.searchResponseSize);
System.out.println(i);
//System.out.println(this.searchResponseSize);
//System.out.println(i);
System.out.println(resTokenForResponse.getCursor());
if (resTokenForResponse != null) {
recordList.setResumptionToken(resTokenForResponse);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment