final BasicIndexQueryEvaluator evaluator = Endpoint.createQueryEvaluator(directory);
// evaluate context for SPARQL query processing...
Endpoint.registerHandler("/sparql/" + keyType, new SPARQLHandler(new SPARQLExecutionImplementation(evaluator, directory)));
final RDF3XCreator creator = new RDF3XCreator();
// register context for evaluating subgraphs...
Endpoint.registerHandler("/sparql/subgraph/" + keyType, new SPARQLHandler(new SubgraphExecutionImplementation(evaluator, directory, creator)));
// register context for determining histograms...
Endpoint.registerHandler("/sparql/histogram/" + keyType, new SPARQLHandler(new HistogramExecutionImplementation(evaluator, creator)));