return search(searchword, null);
}
@Override
public Document search(String searchword, String checklist) throws Exception {
HttpClientService client = null;
try {
client = new HttpClientService();
URIBuilder uri = new URIBuilder(getTriplestoreBaseURL() + "/taxon-search/" + Utils.urlEncode(searchword));
if (given(checklist)) {
uri.addParameter("checklist", checklist);
}
Document response = client.contentAsDocument(new HttpGet(uri.getURI()));
return response;
} finally {
if (client != null) client.close();
}
}