use of org.apache.jena.riot.thrift.wire.RDF_Term in project jena by apache.
the class TestThriftTerm method rdfterm_01.
@Test
public void rdfterm_01() {
RDF_Term rt = TRDF.tANY;
Node n = ThriftConvert.convert(rt);
assertEquals(Node.ANY, n);
}
use of org.apache.jena.riot.thrift.wire.RDF_Term in project jena by apache.
the class TestThriftTerm method term_value_01.
@Test
public void term_value_01() {
RDF_Term rt = testTermValue("123");
assertTrue(rt.isSetValInteger());
assertEquals(123, rt.getValInteger());
}
use of org.apache.jena.riot.thrift.wire.RDF_Term in project jena by apache.
the class TestThriftTerm method term_bnode_01.
@Test
public void term_bnode_01() {
Node n = SSE.parseNode("_:blanknode");
RDF_Term rt = testTerm(n);
assertEquals(rt.getBnode().getLabel(), n.getBlankNodeLabel());
}
use of org.apache.jena.riot.thrift.wire.RDF_Term in project jena by apache.
the class TestThriftTerm method term_value_02.
@Test
public void term_value_02() {
RDF_Term rt = testTermValue("'123'^^xsd:integer");
assertTrue(rt.isSetValInteger());
assertEquals(123, rt.getValInteger());
}
use of org.apache.jena.riot.thrift.wire.RDF_Term in project jena by apache.
the class TestThriftTerm method term_value_12.
@Test
public void term_value_12() {
RDF_Term rt = testTermValue("50.0");
assertTrue(rt.isSetValDecimal());
assertEquals(500, rt.getValDecimal().getValue());
assertEquals(1, rt.getValDecimal().getScale());
}
Aggregations