use of org.apache.jena.sparql.expr.E_Equals in project jena by apache.
the class ExprFactoryTest method eqTest.
@Test
public void eqTest() {
Expr e = factory.eq(factory.none(), factory.none());
assertTrue(e instanceof E_Equals);
}
use of org.apache.jena.sparql.expr.E_Equals in project jena by apache.
the class WhereHandlerTest method testAddFilterWithNamespace.
@Test
public void testAddFilterWithNamespace() throws ParseException {
query.setPrefix("afn", "http://jena.apache.org/ARQ/function#");
handler.addFilter("afn:namespace(?one) = 'foo'");
handler.build();
ExprFactory fact = new ExprFactory();
E_Function func = new E_Function("http://jena.apache.org/ARQ/function#namespace", fact.asList("?one"));
E_Equals expr = fact.eq(func, "foo");
WhereValidator visitor = new WhereValidator(new ElementFilter(expr));
handler.getQueryPattern().visit(visitor);
assertTrue(visitor.matching);
}
Aggregations