Java Code Examples for org.apache.jena.query.ARQ#getContext()

The following examples show how to use org.apache.jena.query.ARQ#getContext() . 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: ContextUtils.java    From sparql-generate with Apache License 2.0 5 votes vote down vote up
private Builder() {
	this.context = new Context(ARQ.getContext());
	this.commons = new Commons();

	// update functionregistry
	FunctionRegistry registry = (FunctionRegistry) context.get(ARQConstants.registryFunctions);
	SPARQLExtFunctionRegistry newRegistry = new SPARQLExtFunctionRegistry(registry, context);
	context.set(ARQConstants.registryFunctions, newRegistry);

	// update iteratorregistry
	IteratorFunctionRegistry iteratorRegistry = (IteratorFunctionRegistry) context
			.get(SPARQLExt.REGISTRY_ITERATORS);
	IteratorFunctionRegistry newIteratorRegistry = new IteratorFunctionRegistry(iteratorRegistry, context);
	context.set(SPARQLExt.REGISTRY_ITERATORS, newIteratorRegistry);

	// default streammanager
	context.set(SysRIOT.sysStreamManager, SPARQLExtStreamManager.makeStreamManager());

	// set variable parts
	context.set(DATASET, DatasetFactory.create());

	// default prefix manager
	context.set(PREFIX_MANAGER, PrefixMapping.Standard);

	// default number of results and blank nodes
	context.set(SIZE, 0);
	// context.set(LIST_NODES, new HashMap<>());

	context.set(COMMONS, commons);
}
 
Example 2
Source File: QueryIterTripleStarPatternTest.java    From RDFstarTools with Apache License 2.0 4 votes vote down vote up
protected ExecutionContext createTestExecCxt()
{
	final DatasetGraph dsg = DatasetGraphFactory.create( createTestGraph() );
	final Context context = ARQ.getContext();
	return new ExecutionContext( context, dsg.getDefaultGraph(), dsg, QC.getFactory(context) );
}
 
Example 3
Source File: IteratorFunctionRegistry.java    From sparql-generate with Apache License 2.0 4 votes vote down vote up
public synchronized static IteratorFunctionRegistry standardRegistry() {
	IteratorFunctionRegistry reg = new IteratorFunctionRegistry(ARQ.getContext());
	return reg;
}
 
Example 4
Source File: IteratorFunctionRegistry.java    From sparql-generate with Apache License 2.0 4 votes vote down vote up
public IteratorFunctionRegistry() {
	this(ARQ.getContext());
}