Search in sources :

Example 1 with ASTCopy

use of org.eclipse.rdf4j.query.parser.sparql.ast.ASTCopy in project rdf4j by eclipse.

the class UpdateExprBuilder method visit.

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

Aggregations

Copy (org.eclipse.rdf4j.query.algebra.Copy)1 ValueConstant (org.eclipse.rdf4j.query.algebra.ValueConstant)1 ASTCopy (org.eclipse.rdf4j.query.parser.sparql.ast.ASTCopy)1 ASTGraphOrDefault (org.eclipse.rdf4j.query.parser.sparql.ast.ASTGraphOrDefault)1