this.indexScanCreator.createEmptyIndexScanSubmittingQueryResultWithOneEmptyBindingsAndConnectWithRoot(new OperatorIDTuple(firstBind,0), graphConstraint);
return firstBind;
} else if(!getItem(objectNode).isVariable()){
final LinkedList<TriplePattern> temp = new LinkedList<TriplePattern>();
final Item[] items = {subject, getItem(node.jjtGetChild(0)), object};
temp.add(new TriplePattern(items));
final Bind firstBind = new Bind(subject);
firstBind.addProjectionElement(subject, objectNode);
// TODO consider graphConstraint!
this.indexScanCreator.createEmptyIndexScanSubmittingQueryResultWithOneEmptyBindingsAndConnectWithRoot(new OperatorIDTuple(firstBind,0), graphConstraint);
return firstBind;
} else {
final Union union = new Union();
final Variable intermediatePredicate = this.getVariable(subject.toString(),object.toString(),"intermediatePredicate");
final Variable intermediateObject = this.getVariable(subject.toString(),object.toString(),"intermediateObject");
final Item[] items = {subject, intermediatePredicate, intermediateObject};
LinkedList<TriplePattern> temp = new LinkedList<TriplePattern>();
TriplePattern tp = new TriplePattern(items);
temp.add(tp);
this.indexScanCreator.createIndexScanAndConnectWithRoot(new OperatorIDTuple(union,0), temp, graphConstraint);
items[0] = intermediateObject;
items[1] = intermediatePredicate;
items[2] = subject;
temp = new LinkedList<TriplePattern>();
tp = new TriplePattern(items.clone());
temp.add(tp);
this.indexScanCreator.createIndexScanAndConnectWithRoot(new OperatorIDTuple(union,1), temp, graphConstraint);
final Projection projection = new Projection();
projection.addProjectionElement(subject);