/** * Execute the operation * * @return Model The resulting model * @throws QueryExceptionHTTP */ public InputStream exec() throws QueryExceptionHTTP { // Select the appropriate HttpClient to use HttpClientContext hcc = HttpClientContext.adapt(getContext()); RequestConfig.Builder builder = RequestConfig.copy(hcc.getRequestConfig()); contextualizeCompressionSettings(builder); contextualizeTimeoutSettings(builder); hcc.setRequestConfig(builder.build()); try { if (usesPOST()) return execPost(); return execGet(); } catch (QueryExceptionHTTP httpEx) { log.trace("Exception in exec", httpEx); throw httpEx; } catch (JenaException jEx) { log.trace("JenaException in exec", jEx); throw jEx; } }