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 Quadstatic Nodestatic Nodestatic Tripleconvert(org.apache.jena.atlas.lib.Cache<String, Node> uriCache, RDF_Triple rt, PrefixMap pmap) static 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
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_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).
-