String graph = request.getParameter("graph");
graph = graph==null || graph.trim().isEmpty()?null:graph;
QueryEndpoint queryEndpoint;
if(type.equals("jena-text")){
SparqlQueryFactory queryFactory = new JenaTextSparqlQueryFactory();
QueryExecutor queryExecutor = new RemoteQueryExecutor(url, graph);
queryEndpoint = new QueryEndpointImpl(queryFactory, queryExecutor);
}else if(type.equals("virtuoso")){
SparqlQueryFactory queryFactory = new VirtuosoSparqlQueryFactory();
QueryExecutor queryExecutor = new VirtuosoRemoteQueryExecutor(url, graph);;