Search in sources :

Example 1 with SfDisjointPF

use of org.apache.jena.geosparql.geo.topological.property_functions.simple_features.SfDisjointPF 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);
}
Also used : Graph(org.apache.jena.graph.Graph) QueryRewriteIndex(org.apache.jena.geosparql.implementation.index.QueryRewriteIndex) Node(org.apache.jena.graph.Node) SfDisjointPF(org.apache.jena.geosparql.geo.topological.property_functions.simple_features.SfDisjointPF) Test(org.junit.Test)

Example 2 with SfDisjointPF

use of org.apache.jena.geosparql.geo.topological.property_functions.simple_features.SfDisjointPF in project jena by apache.

the class GenericPropertyFunctionTest method testQueryRewrite_feature_feature_disjoint.

/**
 * Test of queryRewrite method, of class GenericPropertyFunction.
 */
@Test
public void testQueryRewrite_feature_feature_disjoint() {
    Graph graph = model.getGraph();
    Node subject = FEATURE_A.asNode();
    Node predicate = Geo.SF_DISJOINT_NODE;
    Node object = FEATURE_D.asNode();
    GenericPropertyFunction instance = new SfDisjointPF();
    QueryRewriteIndex queryRewriteIndex = QueryRewriteIndex.createDefault();
    Boolean expResult = true;
    Boolean result = instance.queryRewrite(graph, subject, predicate, object, queryRewriteIndex);
    assertEquals(expResult, result);
}
Also used : Graph(org.apache.jena.graph.Graph) QueryRewriteIndex(org.apache.jena.geosparql.implementation.index.QueryRewriteIndex) Node(org.apache.jena.graph.Node) SfDisjointPF(org.apache.jena.geosparql.geo.topological.property_functions.simple_features.SfDisjointPF) Test(org.junit.Test)

Aggregations

SfDisjointPF (org.apache.jena.geosparql.geo.topological.property_functions.simple_features.SfDisjointPF)2 QueryRewriteIndex (org.apache.jena.geosparql.implementation.index.QueryRewriteIndex)2 Graph (org.apache.jena.graph.Graph)2 Node (org.apache.jena.graph.Node)2 Test (org.junit.Test)2