@Override public List<OrderElem> visit(ASTOrderClause node, Object data) throws VisitorException { int childCount = node.jjtGetNumChildren(); List<OrderElem> elements = new ArrayList<OrderElem>(childCount); for (int i = 0; i < childCount; i++) { elements.add((OrderElem)node.jjtGetChild(i).jjtAccept(this, null)); } return elements; }
@Override public List<ValueExpr> visit(ASTObjectList node, Object data) throws VisitorException { int childCount = node.jjtGetNumChildren(); List<ValueExpr> result = new ArrayList<ValueExpr>(childCount); for (int i = 0; i < childCount; i++) { result.add((ValueExpr)node.jjtGetChild(i).jjtAccept(this, null)); } return result; }
@Override public Lang visit(ASTLang node, Object data) throws VisitorException { ValueExpr arg = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, null); return new Lang(arg); }
@Override public Object visit(ASTStr node, Object data) throws VisitorException { ValueExpr arg = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, null); return new Str(arg); }
@Override public IsURI visit(ASTIsIRI node, Object data) throws VisitorException { ValueExpr arg = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, null); return new IsURI(arg); }
@Override public IsBNode visit(ASTIsBlank node, Object data) throws VisitorException { ValueExpr arg = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, null); return new IsBNode(arg); }
@Override public IsNumeric visit(ASTIsNumeric node, Object data) throws VisitorException { ValueExpr arg = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, null); return new IsNumeric(arg); }
@Override public Sample visit(ASTSample node, Object data) throws VisitorException { ValueExpr ve = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, data); return new Sample(ve, node.isDistinct()); }
@Override public Object visit(ASTMin node, Object data) throws VisitorException { ValueExpr ve = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, data); return new Min(ve, node.isDistinct()); }
@Override public Object visit(ASTSum node, Object data) throws VisitorException { ValueExpr ve = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, data); return new Sum(ve, node.isDistinct()); }
@Override public Object visit(ASTCount node, Object data) throws VisitorException { ValueExpr ve = null; if (node.jjtGetNumChildren() > 0) { ve = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, data); } return new Count(ve, node.isDistinct()); }
@Override public IRIFunction visit(ASTIRIFunc node, Object data) throws VisitorException { ValueExpr expr = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, null); IRIFunction fn = new IRIFunction(expr); fn.setBaseURI(node.getBaseURI()); return fn; }
@Override public Create visit(ASTCreate node, Object data) throws VisitorException { ValueConstant graph = (ValueConstant)node.jjtGetChild(0).jjtAccept(this, data); Create create = new Create(graph); create.setSilent(node.isSilent()); return create; }
@Override public Coalesce visit(ASTCoalesce node, Object data) throws VisitorException { Coalesce coalesce = new Coalesce(); int noOfArgs = node.jjtGetNumChildren(); for (int i = 0; i < noOfArgs; i++) { ValueExpr arg = (ValueExpr)node.jjtGetChild(i).jjtAccept(this, data); coalesce.addArgument(arg); } return coalesce; }
@Override public Object visit(ASTBNodeFunc node, Object data) throws VisitorException { BNodeGenerator generator = new BNodeGenerator(); if (node.jjtGetNumChildren() > 0) { ValueExpr nodeIdExpr = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, null); generator.setNodeIdExpr(nodeIdExpr); } return generator; }
@Override public PropertySetElem visit(ASTPathOneInPropertySet node, Object data) throws VisitorException { PropertySetElem result = new PropertySetElem(); result.setInverse(node.isInverse()); ValueConstant predicate = (ValueConstant)node.jjtGetChild(0).jjtAccept(this, data); result.setPredicate(predicate); return result; }