use of de.geeksfactory.opacclient.searchfields.SearchQuery in project opacclient by opacapp.
the class IOpac method search.
@Override
public SearchRequestResult search(List<SearchQuery> queries) throws IOException, OpacErrorException {
if (!initialised) {
start();
}
List<NameValuePair> params = new ArrayList<>();
int index = 0;
start();
for (SearchQuery query : queries) {
index = addParameters(query, params, index);
}
params.add(new BasicNameValuePair("Anzahl", "10"));
params.add(new BasicNameValuePair("pshStart", "Suchen"));
if (index == 0) {
throw new OpacErrorException(stringProvider.getString(StringProvider.NO_CRITERIA_INPUT));
}
String html = httpPost(opac_url + "/cgi-bin/di.exe", new UrlEncodedFormEntity(params, "iso-8859-1"), getDefaultEncoding());
return parse_search(html, 1);
}
Aggregations