use of org.apache.jena.sparql.expr.NodeValue in project jena by apache.
the class TestNodeFunctions method testLang5.
@Test(expected = ExprTypeException.class)
public void testLang5() {
NodeValue nv = NodeValue.makeNode(NodeFactory.createURI("http://example/"));
NodeValue r = NodeFunctions.lang(nv);
}
use of org.apache.jena.sparql.expr.NodeValue in project jena by apache.
the class TestNodeFunctions method testLangMatches8.
@Test
public void testLangMatches8() {
// The language tag of a plain literal is ""
// A language tag is not allowed to be the empty string (by RFC 3066)
NodeValue nv = NodeValue.makeString("");
NodeValue pat = NodeValue.makeString("*");
NodeValue r = NodeFunctions.langMatches(nv, pat);
assertEquals(NodeValue.FALSE, r);
}
use of org.apache.jena.sparql.expr.NodeValue in project jena by apache.
the class TestNodeFunctions method testDatatype5.
@Test(expected = ExprTypeException.class)
public void testDatatype5() {
NodeValue nv = NodeValue.makeNode(NodeFactory.createURI("http://example"));
NodeValue r = NodeFunctions.datatype(nv);
}
use of org.apache.jena.sparql.expr.NodeValue in project jena by apache.
the class TestNodeFunctions method testDatatype3.
@Test
public void testDatatype3() {
NodeValue nv = NodeValue.makeString("abc");
NodeValue r = NodeFunctions.datatype(nv);
NodeValue e = NodeValue.makeNode(XSD.xstring.asNode());
assertEquals(e, r);
}
use of org.apache.jena.sparql.expr.NodeValue in project jena by apache.
the class TestNodeFunctions method testIsBlank3.
@Test
public void testIsBlank3() {
NodeValue nv = NodeValue.makeNode(NodeFactory.createURI("http://example/"));
NodeValue r = NodeFunctions.isBlank(nv);
assertEquals(NodeValue.FALSE, r);
}
Aggregations