request.setExtraRequestData(SRWDatabase.makeExtraRequestDataType(extraData.toString()));
return request;
}
public static Object sruToObj(String sruRequest) throws IOException {
CGIParser parser=new CGIParser(sruRequest, "UTF-8");
if(parser.getParameter("query")!=null)
return sruSearchToObj(parser);
if(parser.getParameter("scanClause")!=null)
return sruScanToObj(parser);
throw new IllegalArgumentException("SRU requests must contain either a 'query' or 'scanTerm' parameter");
}