java.lang.Object
org.apache.jena.riot.thrift.ThriftConvert
Convert to and from Thrift wire objects.
See
StreamRDF2Thrift
and Thrift2StreamRDF
for ways to convert as streams (they recycle intermediate objects).
Many operations have available with a cache. The cache is used for creating URis from strings. It interns the node leading to significant savings of space, especially in the property position.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Quad
static Node
static Node
static Triple
convert
(org.apache.jena.atlas.lib.Cache<String, Node> uriCache, RDF_Triple rt, PrefixMap pmap) static RDF_Term
static RDF_Term
static RDF_Triple
static RDF_Triple
static Quad
static Quad
static Node
static Node
static Triple
convert
(RDF_Triple triple) static Triple
convert
(RDF_Triple rt, PrefixMap pmap) static RDF_Quad
static RDF_Quad
static RDF_Term
termFromBytes
(byte[] bytes) Deserialize from a byte array into anRDF_Term
.static void
termFromBytes
(RDF_Term term, byte[] bytes) Deserialize from a byte array into anRDF_Term
.static byte[]
termToBytes
(RDF_Term term) Serialize theRDF_Term
into a byte array.static void
static void
static void
static boolean
toThriftValue
(Node node, RDF_Term term) Attempt to encode a node by value (integer, decimal, double) into an RDF_term.
-
Constructor Details
-
ThriftConvert
public ThriftConvert()
-
-
Method Details
-
toThriftValue
Attempt to encode a node by value (integer, decimal, double) into an RDF_term.- Parameters:
node
-term
-- Returns:
- true if the term was set, else false.
-
toThrift
-
toThrift
-
toThrift
-
convert
-
convert
-
convert
-
convert
-
convert
-
convert
-
convert
-
convert
-
convert
public static Triple convert(org.apache.jena.atlas.lib.Cache<String, Node> uriCache, RDF_Triple rt, PrefixMap pmap) -
convert
-
convert
-
convert
-
convert
-
convert
-
convert
-
convert
-
termToBytes
Serialize theRDF_Term
into a byte array.Where possible, to is better to serialize into a stream, directly using
term.write(TProtocol)
. -
termFromBytes
Deserialize from a byte array into anRDF_Term
.Where possible, to is better to deserialize from a stream, directly using
term.read(TProtocol)
. -
termFromBytes
Deserialize from a byte array into anRDF_Term
.Where possible, to is better to deserialize from a stream, directly using
term.read(TProtocol)
.
-