Search in sources :

Example 1 with Move

use of org.eclipse.rdf4j.query.algebra.Move in project rdf4j by eclipse.

the class UpdateExprBuilder method visit.

@Override
public Move visit(ASTMove node, Object data) throws VisitorException {
    Move move = new Move();
    move.setSilent(node.isSilent());
    ASTGraphOrDefault sourceNode = (ASTGraphOrDefault) node.jjtGetChild(0);
    if (sourceNode.jjtGetNumChildren() > 0) {
        ValueConstant sourceGraph = (ValueConstant) sourceNode.jjtGetChild(0).jjtAccept(this, data);
        move.setSourceGraph(sourceGraph);
    }
    ASTGraphOrDefault destinationNode = (ASTGraphOrDefault) node.jjtGetChild(1);
    if (destinationNode.jjtGetNumChildren() > 0) {
        ValueConstant destinationGraph = (ValueConstant) destinationNode.jjtGetChild(0).jjtAccept(this, data);
        move.setDestinationGraph(destinationGraph);
    }
    return move;
}
Also used : ASTMove(org.eclipse.rdf4j.query.parser.sparql.ast.ASTMove) Move(org.eclipse.rdf4j.query.algebra.Move) ValueConstant(org.eclipse.rdf4j.query.algebra.ValueConstant) ASTGraphOrDefault(org.eclipse.rdf4j.query.parser.sparql.ast.ASTGraphOrDefault)

Aggregations

Move (org.eclipse.rdf4j.query.algebra.Move)1 ValueConstant (org.eclipse.rdf4j.query.algebra.ValueConstant)1 ASTGraphOrDefault (org.eclipse.rdf4j.query.parser.sparql.ast.ASTGraphOrDefault)1 ASTMove (org.eclipse.rdf4j.query.parser.sparql.ast.ASTMove)1