use of org.apache.jena.sparql.algebra.op.OpJoin in project jena by apache.
the class TestClassify method classifyJ.
public static void classifyJ(String pattern, boolean expected) {
String qs1 = "PREFIX : <http://example/>\n";
String qs = qs1 + "SELECT * " + pattern;
Query query = QueryFactory.create(qs, Syntax.syntaxARQ);
Op op = Algebra.compile(query.getQueryPattern());
if (!(op instanceof OpJoin))
fail("Not a join: " + pattern);
boolean nonLinear = JoinClassifier.isLinear((OpJoin) op);
assertEquals("Join: " + pattern, expected, nonLinear);
}