use of org.eclipse.rdf4j.query.parser.sparql.ast.ASTClear in project rdf4j by eclipse.
the class UpdateExprBuilder method visit.
@Override
public Clear visit(ASTClear node, Object data) throws VisitorException {
Clear clear = new Clear();
clear.setSilent(node.isSilent());
ASTGraphRefAll graphRef = node.jjtGetChild(ASTGraphRefAll.class);
if (graphRef.jjtGetNumChildren() > 0) {
ValueConstant graph = (ValueConstant) graphRef.jjtGetChild(0).jjtAccept(this, data);
clear.setGraph(graph);
} else {
if (graphRef.isDefault()) {
clear.setScope(Scope.DEFAULT_CONTEXTS);
} else if (graphRef.isNamed()) {
clear.setScope(Scope.NAMED_CONTEXTS);
}
}
return clear;
}
Aggregations