* @exception OAIInternalServerError signals an http status code 500 problem
*/
public Map listSets(String resumptionToken)
throws OAIInternalServerError, BadResumptionTokenException {
if (setQuery == null) {
throw new BadResumptionTokenException();
} else {
purge(); // clean out old resumptionTokens
Map listSetsMap = new HashMap();
ArrayList sets = new ArrayList();
/**********************************************************************
* parse your resumptionToken and look it up in the resumptionResults,
* if necessary
**********************************************************************/
StringTokenizer tokenizer = new StringTokenizer(resumptionToken, "!");
String resumptionId;
int oldCount;
int numRows;
try {
resumptionId = tokenizer.nextToken();
oldCount = Integer.parseInt(tokenizer.nextToken());
numRows = Integer.parseInt(tokenizer.nextToken());
} catch (NoSuchElementException e) {
throw new BadResumptionTokenException();
}
try {
/* Get some more records from your database */
ResultSet rs = (ResultSet)resumptionResults.get(resumptionId);
if (rs == null) {
throw new BadResumptionTokenException();
}
if (rs.getRow() != oldCount) {
// System.out.println("JDBCOAICatalog.listIdentifiers: reuse of old resumptionToken?");
rs.absolute(oldCount);