use of org.apache.jena.sparql.expr.NodeValue in project jena by apache.
the class IsValidPFTest method testApplyPredicate_true.
/**
* Test of applyPredicate method, of class IsValidPF.
*/
@Test
public void testApplyPredicate_true() {
GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http://www.opengis.net/def/crs/EPSG/0/27700> LINESTRING(0 0, 1 1)", WKTDatatype.URI);
IsValidPF instance = new IsValidPF();
NodeValue expResult = NodeValue.makeNodeBoolean(true);
NodeValue result = instance.applyPredicate(geometryWrapper);
assertEquals(expResult, result);
}
use of org.apache.jena.sparql.expr.NodeValue in project jena by apache.
the class CoordinateDimensionPFTest method testApplyPredicate_2_Dimension.
/**
* Test of applyPredicate method, of class CoordinateDimensionPF.
*/
@Test
public void testApplyPredicate_2_Dimension() {
GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http://www.opengis.net/def/crs/EPSG/0/27700> POINT(90 60)", WKTDatatype.URI);
CoordinateDimensionPF instance = new CoordinateDimensionPF();
NodeValue expResult = NodeValue.makeNodeInteger(2);
NodeValue result = instance.applyPredicate(geometryWrapper);
assertEquals(expResult, result);
}
use of org.apache.jena.sparql.expr.NodeValue in project jena by apache.
the class IsEmptyPFTest method testApplyPredicate_true.
/**
* Test of applyPredicate method, of class IsEmptyPF.
*/
@Test
public void testApplyPredicate_true() {
GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http://www.opengis.net/def/crs/EPSG/0/27700> POINT EMPTY", WKTDatatype.URI);
IsEmptyPF instance = new IsEmptyPF();
NodeValue expResult = NodeValue.makeNodeBoolean(true);
NodeValue result = instance.applyPredicate(geometryWrapper);
assertEquals(expResult, result);
}
use of org.apache.jena.sparql.expr.NodeValue in project jena by apache.
the class IsValidFFTest method testExec_false.
/**
* Test of exec method, of class IsValidFF.
*/
@Test
public void testExec_false() {
NodeValue geometryLiteral = NodeValue.makeNode("<http://www.opengis.net/def/crs/EPSG/0/27700> LINESTRING(0 0, 0 0, 0 0)", WKTDatatype.INSTANCE);
IsValidFF instance = new IsValidFF();
NodeValue expResult = NodeValue.makeNodeBoolean(false);
NodeValue result = instance.exec(geometryLiteral);
assertEquals(expResult, result);
}
use of org.apache.jena.sparql.expr.NodeValue in project jena by apache.
the class IsValidFFTest method testExec_true.
/**
* Test of exec method, of class IsValidFF.
*/
@Test
public void testExec_true() {
NodeValue geometryLiteral = NodeValue.makeNode("<http://www.opengis.net/def/crs/EPSG/0/27700> LINESTRING(0 0, 1 1)", WKTDatatype.INSTANCE);
IsValidFF instance = new IsValidFF();
NodeValue expResult = NodeValue.makeNodeBoolean(true);
NodeValue result = instance.exec(geometryLiteral);
assertEquals(expResult, result);
}
Aggregations