AskBuilder extends AbstractQueryBuilder<AskBuilder> implements DatasetClause<AskBuilder>, WhereClause<AskBuilder>, SolutionModifierClause<AskBuilder> { @Override public Node list(Object... objs) { return getWhereHandler().list(objs); } AskBuilder(); @Override HandlerBlock getHandlerBlock(); @Override DatasetHandler getDatasetHandler(); @Override AskBuilder clone(); @Override AskBuilder fromNamed(String graphName); @Override AskBuilder fromNamed(Collection<String> graphNames); @Override AskBuilder from(String graphName); @Override AskBuilder from(Collection<String> graphName); @Override AskBuilder addWhere(TriplePath t); @Override AskBuilder addWhere(Triple t); @Override AskBuilder addWhere(FrontsTriple t); @Override AskBuilder addWhere(Object s, Object p, Object o); @Override AskBuilder addWhereValueVar(Object var); @Override AskBuilder addWhereValueVar(Object var, Object... values); @Override AskBuilder addWhereValueVars(Map<?,K> dataTable); @Override AskBuilder addWhereValueRow(Object... values); @Override AskBuilder addWhereValueRow(Collection<?> values); @Override List<Var> getWhereValuesVars(); @Override Map<Var, List<Node>> getWhereValuesMap(); @Override AskBuilder clearWhereValues(); @Override AskBuilder addOptional(TriplePath t); @Override AskBuilder addOptional(Triple t); @Override AskBuilder addOptional(AbstractQueryBuilder<?> t); @Override AskBuilder addOptional(FrontsTriple t); @Override AskBuilder addOptional(Object s, Object p, Object o); @Override AskBuilder addFilter(Expr expr); @Override AskBuilder addFilter(String s); @Override AskBuilder addSubQuery(AbstractQueryBuilder<?> subQuery); @Override AskBuilder addUnion(AbstractQueryBuilder<?> subQuery); @Override AskBuilder addGraph(Object graph, AbstractQueryBuilder<?> subQuery); @Override AskBuilder addGraph(Object graph, FrontsTriple triple); @Override AskBuilder addGraph(Object graph, Object subject, Object predicate, Object object); @Override AskBuilder addGraph(Object graph, Triple triple); @Override AskBuilder addGraph(Object graph, TriplePath triplePath); @Override AskBuilder addBind(Expr expression, Object var); @Override AskBuilder addBind(String expression, Object var); @Override AskBuilder addOrderBy(Expr orderBy); @Override AskBuilder addOrderBy(Object orderBy); @Override AskBuilder addOrderBy(SortCondition orderBy); @Override AskBuilder addOrderBy(Expr orderBy, Order order); @Override AskBuilder addOrderBy(Object orderBy, Order order); @Override AskBuilder addGroupBy(Object groupBy); @Override AskBuilder addGroupBy(Expr groupBy); @Override AskBuilder addGroupBy(Object var, Expr expr); @Override AskBuilder addGroupBy(Object var, String expr); @Override AskBuilder addHaving(String having); @Override AskBuilder addHaving(Expr expression); @Override AskBuilder addHaving(Object var); @Override AskBuilder setLimit(int limit); @Override AskBuilder setOffset(int offset); @Override SolutionModifierHandler getSolutionModifierHandler(); @Override Node list(Object... objs); @Override AskBuilder addMinus( AbstractQueryBuilder<?> t );  }
@Test public void testList() { builder .addWhere( builder.list( "<one>", "?two", "'three'"), "<foo>", "<bar>"); Query query = builder.build(); Node one = NodeFactory.createURI("one"); Node two = Var.alloc("two").asNode(); Node three = NodeFactory.createLiteral( "three"); Node foo = NodeFactory.createURI("foo"); Node bar = NodeFactory.createURI("bar"); ElementPathBlock epb = new ElementPathBlock(); Node firstObject = NodeFactory.createBlankNode(); Node secondObject = NodeFactory.createBlankNode(); Node thirdObject = NodeFactory.createBlankNode(); epb.addTriplePath( new TriplePath( new Triple( firstObject, RDF.first.asNode(), one))); epb.addTriplePath( new TriplePath( new Triple( firstObject, RDF.rest.asNode(), secondObject))); epb.addTriplePath( new TriplePath( new Triple( secondObject, RDF.first.asNode(), two))); epb.addTriplePath( new TriplePath( new Triple( secondObject, RDF.rest.asNode(), thirdObject))); epb.addTriplePath( new TriplePath( new Triple( thirdObject, RDF.first.asNode(), three))); epb.addTriplePath( new TriplePath( new Triple( thirdObject, RDF.rest.asNode(), RDF.nil.asNode()))); epb.addTriplePath( new TriplePath( new Triple( firstObject, foo, bar))); WhereValidator visitor = new WhereValidator( epb ); query.getQueryPattern().visit( visitor ); assertTrue( visitor.matching ); }