Package org.apache.jena.riot.thrift
Class ThriftConvert
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).- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RDF_Termstatic RDF_Termstatic RDF_Triplestatic RDF_Triplestatic Quadstatic Quadstatic Nodestatic Nodestatic Tripleconvert(RDF_Triple triple) static Tripleconvert(RDF_Triple rt, PrefixMap pmap) static RDF_Quadstatic RDF_Quadstatic RDF_TermtermFromBytes(byte[] bytes) Deserialize from a byte array into anRDF_Term.static voidtermFromBytes(RDF_Term term, byte[] bytes) Deserialize from a byte array into anRDF_Term.static byte[]termToBytes(RDF_Term term) Serialize theRDF_Terminto a byte array.static voidstatic voidstatic voidstatic booleantoThriftValue(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
-
convert
-
convert
-
convert
-
termToBytes
Serialize theRDF_Terminto 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).
-