Java Code Examples for org.apache.jena.sparql.engine.http.QueryEngineHTTP#addParam()

The following examples show how to use org.apache.jena.sparql.engine.http.QueryEngineHTTP#addParam() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SPARQL.java    From chatbot with Apache License 2.0 5 votes vote down vote up
public QueryExecution executeQuery(String queryString) {
    logger.info("SPARQL Query is:\n" + queryString);
    Query query = QueryFactory.create(queryString);
    QueryEngineHTTP queryEngine = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(ENDPOINT, query);
    queryEngine.addParam("timeout", String.valueOf(Constants.API_TIMEOUT));
    return queryEngine;
}
 
Example 2
Source File: KnowledgeCardCreator.java    From NLIWOD with GNU Affero General Public License v3.0 4 votes vote down vote up
private QueryExecution executeQuery(String queryString) {
	Query query = QueryFactory.create(queryString);
	QueryEngineHTTP queryEngine = (QueryEngineHTTP) QueryExecutionFactory.sparqlService(ENDPOINT, query);
	queryEngine.addParam("timeout", String.valueOf(API_TIMEOUT));
	return queryEngine;
}