use of org.apache.jena.riot.thrift.wire.RDF_Term in project jena by apache.
the class TestThriftTerm method term_literal_03.
@Test
public void term_literal_03() {
RDF_Term rt = testTerm("123");
assertFalse(rt.getLiteral().isSetDatatype());
assertTrue(rt.getLiteral().isSetDtPrefix());
assertEquals(rt.getLiteral().getDtPrefix().getPrefix(), "xsd");
assertEquals(rt.getLiteral().getDtPrefix().getLocalName(), "integer");
}
use of org.apache.jena.riot.thrift.wire.RDF_Term in project jena by apache.
the class TestThriftTerm method rdfterm_02.
@Test
public void rdfterm_02() {
RDF_Term rt = TRDF.tUNDEF;
Node n = ThriftConvert.convert(rt);
assertNull(n);
}
use of org.apache.jena.riot.thrift.wire.RDF_Term in project jena by apache.
the class TestThriftTerm method testTermBytes.
private void testTermBytes(Node node) {
RDF_Term rt = ThriftConvert.convert(node, false);
byte[] b = ThriftConvert.termToBytes(rt);
RDF_Term rt2 = ThriftConvert.termFromBytes(b);
Node node2 = ThriftConvert.convert(rt2);
assertEquals(node, node2);
}
use of org.apache.jena.riot.thrift.wire.RDF_Term in project jena by apache.
the class TestThriftTerm method term_value_13.
@Test
public void term_value_13() {
RDF_Term rt = testTermValue("50.05");
assertTrue(rt.isSetValDecimal());
assertEquals(5005, rt.getValDecimal().getValue());
assertEquals(2, rt.getValDecimal().getScale());
}
use of org.apache.jena.riot.thrift.wire.RDF_Term in project jena by apache.
the class TestThriftTerm method term_uri_02.
@Test
public void term_uri_02() {
RDF_Term rt = testTerm("<http://example/>");
assertTrue(rt.isSetPrefixName());
assertEquals(rt.getPrefixName().prefix, "");
assertEquals(rt.getPrefixName().localName, "");
}
Aggregations