Search in sources :

Example 1 with OpJoin

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);
}
Also used : Query(org.apache.jena.query.Query) OpJoin(org.apache.jena.sparql.algebra.op.OpJoin)

Aggregations

Query (org.apache.jena.query.Query)1 OpJoin (org.apache.jena.sparql.algebra.op.OpJoin)1