Java Code Examples for org.eclipse.rdf4j.query.algebra.StatementPattern#Scope

The following examples show how to use org.eclipse.rdf4j.query.algebra.StatementPattern#Scope . 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: QueryModelBuilder.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Override
public Object visit(ASTBasicPathExprTail tailNode, Object data) throws VisitorException {
	List<Var> subjVars = (List<Var>) data;
	Var predVar = (Var) tailNode.getEdge().jjtAccept(this, null);
	List<Var> objVars = (List<Var>) tailNode.getNode().jjtAccept(this, null);

	Var contextVar = graphPattern.getContextVar();
	StatementPattern.Scope spScope = graphPattern.getStatementPatternScope();

	for (Var subjVar : subjVars) {
		for (Var objVar : objVars) {
			StatementPattern sp = new StatementPattern(spScope, subjVar, predVar, objVar, contextVar);
			graphPattern.addRequiredTE(sp);
		}
	}

	// Process next tail segment
	ASTPathExprTail nextTailNode = tailNode.getNextTail();
	if (nextTailNode != null) {
		List<Var> joinVars = nextTailNode.isBranch() ? subjVars : objVars;
		nextTailNode.jjtAccept(this, joinVars);
	}

	return null;
}
 
Example 2
Source File: GroupBuilder.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public GroupBuilder<T, E> setScope(StatementPattern.Scope theScope) {
	mScope = theScope;

	for (StatementPattern aPattern : mGroup.getPatterns()) {
		aPattern.setScope(mScope);
	}

	return this;
}
 
Example 3
Source File: GraphPattern.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public void setStatementPatternScope(StatementPattern.Scope spScope) {
	this.spScope = spScope;
}
 
Example 4
Source File: GraphPattern.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public StatementPattern.Scope getStatementPatternScope() {
	return spScope;
}
 
Example 5
Source File: GraphPattern.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public void setStatementPatternScope(StatementPattern.Scope spScope) {
	this.spScope = spScope;
}
 
Example 6
Source File: GraphPattern.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public StatementPattern.Scope getStatementPatternScope() {
	return spScope;
}