public Var visit(ASTReifiedStat node, Object data)
throws VisitorException
{
assert node.getID() != null : "ID variable not set";
Var subjVar = (Var)node.getSubject().jjtAccept(this, null);
Var predVar = (Var)node.getPredicate().jjtAccept(this, null);
Var objVar = (Var)node.getObject().jjtAccept(this, null);
Var idVar = (Var)node.getID().jjtAccept(this, null);
Var contextVar = graphPattern.getContextVar();
StatementPattern.Scope spScope = graphPattern.getStatementPatternScope();
Var rdfType = new Var("_rdfType", RDF.TYPE);
Var rdfStatement = new Var("_rdfStatement", RDF.STATEMENT);
Var rdfSubject = new Var("_rdfSubject", RDF.SUBJECT);
Var rdfPredicate = new Var("_rdfPredicate", RDF.PREDICATE);
Var rdfObject = new Var("_rdfObject", RDF.OBJECT);
graphPattern.addRequiredTE(new StatementPattern(spScope, idVar, rdfType, rdfStatement, contextVar));
graphPattern.addRequiredTE(new StatementPattern(spScope, idVar, rdfSubject, subjVar, contextVar));
graphPattern.addRequiredTE(new StatementPattern(spScope, idVar, rdfPredicate, predVar, contextVar));
graphPattern.addRequiredTE(new StatementPattern(spScope, idVar, rdfObject, objVar, contextVar));