use of org.apache.jena.geosparql.implementation.index.QueryRewriteIndex in project jena by apache.
the class GenericPropertyFunctionTest method testQueryRewrite_geometry_geometry_disabled.
/**
* Test of queryRewrite method, of class GenericPropertyFunction.
*/
@Test
public void testQueryRewrite_geometry_geometry_disabled() {
GeoSPARQLConfig.setup(IndexOption.MEMORY, Boolean.FALSE);
Graph graph = model.getGraph();
Node subject = GEOMETRY_A.asNode();
Node predicate = Geo.SF_CONTAINS_NODE;
Node object = FEATURE_B.asNode();
GenericPropertyFunction instance = new SfContainsPF();
QueryRewriteIndex queryRewriteIndex = QueryRewriteIndex.createDefault();
Boolean expResult = false;
Boolean result = instance.queryRewrite(graph, subject, predicate, object, queryRewriteIndex);
GeoSPARQLConfig.setup(IndexOption.MEMORY, Boolean.TRUE);
assertEquals(expResult, result);
}
use of org.apache.jena.geosparql.implementation.index.QueryRewriteIndex in project jena by apache.
the class GenericPropertyFunctionTest method testQueryRewrite_geometry_geometry_false.
/**
* Test of queryRewrite method, of class GenericPropertyFunction.
*/
@Test
public void testQueryRewrite_geometry_geometry_false() {
Graph graph = model.getGraph();
Node subject = GEOMETRY_A.asNode();
Node predicate = Geo.SF_CONTAINS_NODE;
Node object = GEOMETRY_D.asNode();
GenericPropertyFunction instance = new SfContainsPF();
QueryRewriteIndex queryRewriteIndex = QueryRewriteIndex.createDefault();
Boolean expResult = false;
Boolean result = instance.queryRewrite(graph, subject, predicate, object, queryRewriteIndex);
assertEquals(expResult, result);
}
use of org.apache.jena.geosparql.implementation.index.QueryRewriteIndex in project jena by apache.
the class GenericPropertyFunctionTest method testQueryRewrite_feature_geometry_false.
/**
* Test of queryRewrite method, of class GenericPropertyFunction.
*/
@Test
public void testQueryRewrite_feature_geometry_false() {
Graph graph = model.getGraph();
Node subject = FEATURE_A.asNode();
Node predicate = Geo.SF_CONTAINS_NODE;
Node object = GEOMETRY_D.asNode();
GenericPropertyFunction instance = new SfContainsPF();
QueryRewriteIndex queryRewriteIndex = QueryRewriteIndex.createDefault();
Boolean expResult = false;
Boolean result = instance.queryRewrite(graph, subject, predicate, object, queryRewriteIndex);
assertEquals(expResult, result);
}
use of org.apache.jena.geosparql.implementation.index.QueryRewriteIndex in project jena by apache.
the class GenericPropertyFunctionTest method testQueryRewrite_feature_feature_disjoint_false.
/**
* Test of queryRewrite method, of class GenericPropertyFunction.
*/
@Test
public void testQueryRewrite_feature_feature_disjoint_false() {
Graph graph = model.getGraph();
Node subject = FEATURE_A.asNode();
Node predicate = Geo.SF_DISJOINT_NODE;
Node object = FEATURE_B.asNode();
GenericPropertyFunction instance = new SfDisjointPF();
QueryRewriteIndex queryRewriteIndex = QueryRewriteIndex.createDefault();
Boolean expResult = false;
Boolean result = instance.queryRewrite(graph, subject, predicate, object, queryRewriteIndex);
assertEquals(expResult, result);
}
use of org.apache.jena.geosparql.implementation.index.QueryRewriteIndex in project jena by apache.
the class GenericPropertyFunctionTest method testQueryRewrite_feature_feature.
/**
* Test of queryRewrite method, of class GenericPropertyFunction.
*/
@Test
public void testQueryRewrite_feature_feature() {
Graph graph = model.getGraph();
Node subject = FEATURE_A.asNode();
Node predicate = Geo.SF_CONTAINS_NODE;
Node object = FEATURE_B.asNode();
GenericPropertyFunction instance = new SfContainsPF();
QueryRewriteIndex queryRewriteIndex = QueryRewriteIndex.createDefault();
Boolean expResult = true;
Boolean result = instance.queryRewrite(graph, subject, predicate, object, queryRewriteIndex);
assertEquals(expResult, result);
}
Aggregations