Package org.apache.jena.riot.thrift
Class ThriftConvert
- java.lang.Object
-
- org.apache.jena.riot.thrift.ThriftConvert
-
public class ThriftConvert extends java.lang.Object
Convert to and from Thrift wire objects. SeeStreamRDF2Thrift
andThrift2StreamRDF
for ways to convert as streams (they recycle intermediate objects).- See Also:
StreamRDF2Thrift
,Thrift2StreamRDF
-
-
Constructor Summary
Constructors Constructor Description ThriftConvert()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RDF_Term
convert(Node node, boolean allowValues)
static RDF_Term
convert(Node node, PrefixMap pmap, boolean allowValues)
static RDF_Triple
convert(Triple triple, boolean allowValues)
static RDF_Triple
convert(Triple triple, PrefixMap pmap, boolean allowValues)
static Quad
convert(RDF_Quad quad)
static Quad
convert(RDF_Quad rq, PrefixMap pmap)
static Node
convert(RDF_Term term)
static Node
convert(RDF_Term term, PrefixMap pmap)
static Triple
convert(RDF_Triple triple)
static Triple
convert(RDF_Triple rt, PrefixMap pmap)
static RDF_Quad
convert(Quad quad, boolean allowValues)
static RDF_Quad
convert(Quad quad, PrefixMap pmap, boolean allowValues)
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
toThrift(Node node, PrefixMap pmap, RDF_Term term, boolean allowValues)
static void
toThrift(Node node, RDF_Term term)
static void
toThrift(Node node, RDF_Term term, boolean allowValues)
static boolean
toThriftValue(Node node, RDF_Term term)
Attempt to encode a node by value (integer, decimal, double) into an RDF_term.
-
-
-
Method Detail
-
toThriftValue
public static boolean toThriftValue(Node node, RDF_Term term)
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
public static void toThrift(Node node, PrefixMap pmap, RDF_Term term, boolean allowValues)
-
convert
public static Triple convert(RDF_Triple triple)
-
convert
public static Triple convert(RDF_Triple rt, PrefixMap pmap)
-
convert
public static RDF_Triple convert(Triple triple, boolean allowValues)
-
convert
public static RDF_Triple convert(Triple triple, PrefixMap pmap, boolean allowValues)
-
termToBytes
public static byte[] termToBytes(RDF_Term term)
Serialize theRDF_Term
into a byte array.Where possible, to is better to serialize into a stream, directly using
term.write(TProtocol)
.
-
termFromBytes
public static RDF_Term termFromBytes(byte[] bytes)
Deserialize from a byte array into anRDF_Term
.Where possible, to is better to deserialize from a stream, directly using
term.read(TProtocol)
.
-
-