/** * See EXISTS above. * * @see NotExistsNode */ @Override final public NotExistsNode visit(final ASTNotExistsFunc node, Object data) throws VisitorException { final VarNode anonvar = context.createAnonVar("-exists-"); /* * Use a new (empty) graph pattern to prevent the accept of the child * from being attached into the parent's graph pattern context. */ final GroupGraphPattern parentGP = graphPattern; graphPattern = scopedGroupGraphPattern(node); @SuppressWarnings("unchecked") final GraphPatternGroup<IGroupMemberNode> innerGraphPattern = (GraphPatternGroup<IGroupMemberNode>) node .jjtGetChild(0).jjtAccept(this/* visitor */, null); final NotExistsNode fn = new NotExistsNode(anonvar, innerGraphPattern); // Restore the parent's context. graphPattern = parentGP; return fn; }
/** * See EXISTS above. * * @see NotExistsNode */ @Override final public NotExistsNode visit(final ASTNotExistsFunc node, Object data) throws VisitorException { final VarNode anonvar = context.createAnonVar("-exists-"); /* * Use a new (empty) graph pattern to prevent the accept of the child * from being attached into the parent's graph pattern context. */ final GroupGraphPattern parentGP = graphPattern; graphPattern = scopedGroupGraphPattern(node); @SuppressWarnings("unchecked") final GraphPatternGroup<IGroupMemberNode> innerGraphPattern = (GraphPatternGroup<IGroupMemberNode>) node .jjtGetChild(0).jjtAccept(this/* visitor */, null); final NotExistsNode fn = new NotExistsNode(anonvar, innerGraphPattern); // Restore the parent's context. graphPattern = parentGP; return fn; }
/** * Note: EXISTS is basically an ASK subquery. * * @see ExistsNode */ @Override final public ExistsNode visit(final ASTExistsFunc node, Object data) throws VisitorException { final VarNode anonvar = context.createAnonVar("-exists-"); /* * Use a new (empty) graph pattern to prevent the accept of the child * from being attached into the parent's graph pattern context. */ final GroupGraphPattern parentGP = graphPattern; graphPattern = scopedGroupGraphPattern(node); @SuppressWarnings("unchecked") final GraphPatternGroup<IGroupMemberNode> innerGraphPattern = (GraphPatternGroup<IGroupMemberNode>) node .jjtGetChild(0).jjtAccept(this/* visitor */, null); final ExistsNode fn = new ExistsNode(anonvar, innerGraphPattern); // Restore the parent's context. graphPattern = parentGP; return fn; }
/** * Note: EXISTS is basically an ASK subquery. * * @see ExistsNode */ @Override final public ExistsNode visit(final ASTExistsFunc node, Object data) throws VisitorException { final VarNode anonvar = context.createAnonVar("-exists-"); /* * Use a new (empty) graph pattern to prevent the accept of the child * from being attached into the parent's graph pattern context. */ final GroupGraphPattern parentGP = graphPattern; graphPattern = scopedGroupGraphPattern(node); @SuppressWarnings("unchecked") final GraphPatternGroup<IGroupMemberNode> innerGraphPattern = (GraphPatternGroup<IGroupMemberNode>) node .jjtGetChild(0).jjtAccept(this/* visitor */, null); final ExistsNode fn = new ExistsNode(anonvar, innerGraphPattern); // Restore the parent's context. graphPattern = parentGP; return fn; }