@Test public void testReplaceQueryPatternsWithNonEmptyResults() { final String expectedQueryPlan = "Projection\n" + " ProjectionElemList\n" + " ProjectionElem \"matchUri\"\n" + " ProjectionElem \"match\"\n" + " BindingSetAssignment ([[toUri=urn:subject4;to=\"POLYGON ((2.3294 48.8726, 2.2719 48.8643, 2.3370 48.8398, 2.3294 48.8726))\"^^<http: final ParsedQuery query = parseQuery(QUERY); final List<SearchQueryEvaluator> queries = new ArrayList<>(); new GeoRelationQuerySpecBuilder(new SearchIndexImpl()) .process(query.getTupleExpr(), EmptyBindingSet.getInstance(), queries); assertEquals(1, queries.size()); final GeoRelationQuerySpec querySpec = (GeoRelationQuerySpec) queries.get(0); final MapBindingSet bindingSet = new MapBindingSet(); bindingSet.addBinding("toUri", VF.createIRI("urn:subject4")); bindingSet.addBinding("to", VF.createLiteral( "POLYGON ((2.3294 48.8726, 2.2719 48.8643, 2.3370 48.8398, 2.3294 48.8726))", GEO.WKT_LITERAL)); BindingSetAssignment bsa = new BindingSetAssignment(); bsa.setBindingSets(Collections.singletonList(bindingSet)); querySpec.replaceQueryPatternsWithResults(bsa); assertEquals( expectedQueryPlan, querySpec.getParentQueryModelNode().getParentNode().toString()); }
@Override public QueryModelNode getParentQueryModelNode() { return filter; }
GeoRelationQuerySpec extends AbstractSearchQueryEvaluator { @Override public QueryModelNode getParentQueryModelNode() { return filter; } }
GeoRelationQuerySpec extends AbstractSearchQueryEvaluator { @Override public QueryModelNode getParentQueryModelNode() { return filter; }  }
GeoRelationQuerySpec extends AbstractSearchQueryEvaluator { @Override public QueryModelNode getParentQueryModelNode() { return filter; }  void setRelation(String relation); String getRelation(); void setFunctionParent(QueryModelNode functionParent); void setQueryGeometry(Literal shape); Literal getQueryGeometry(); void setFunctionValueVar(String varName); String getFunctionValueVar(); void setGeometryPattern(StatementPattern sp); String getSubjectVar(); Var getContextVar(); IRI getGeoProperty(); String getGeoVar(); void setFilter(Filter f); Filter getFilter(); @Override QueryModelNode getParentQueryModelNode(); @Override QueryModelNode removeQueryPatterns(); }
GeoRelationQuerySpec extends AbstractSearchQueryEvaluator { @Override public QueryModelNode getParentQueryModelNode() { return filter; }  void setRelation(String relation); String getRelation(); void setFunctionParent(QueryModelNode functionParent); void setQueryGeometry(Literal shape); Literal getQueryGeometry(); void setFunctionValueVar(String varName); String getFunctionValueVar(); void setGeometryPattern(StatementPattern sp); String getSubjectVar(); Var getContextVar(); IRI getGeoProperty(); String getGeoVar(); void setFilter(Filter f); Filter getFilter(); @Override QueryModelNode getParentQueryModelNode(); @Override QueryModelNode removeQueryPatterns();  }