Package org.apache.jena.riot.thrift
Class ThriftConvert
- java.lang.Object
-
- org.apache.jena.riot.thrift.ThriftConvert
-
public class ThriftConvert extends java.lang.ObjectConvert to and from Thrift wire objects. SeeStreamRDF2ThriftandThrift2StreamRDFfor 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_Termconvert(Node node, boolean allowValues)static RDF_Termconvert(Node node, PrefixMap pmap, boolean allowValues)static RDF_Tripleconvert(Triple triple, boolean allowValues)static RDF_Tripleconvert(Triple triple, PrefixMap pmap, boolean allowValues)static Quadconvert(RDF_Quad quad)static Quadconvert(RDF_Quad rq, PrefixMap pmap)static Nodeconvert(RDF_Term term)static Nodeconvert(RDF_Term term, PrefixMap pmap)static Tripleconvert(RDF_Triple triple)static Tripleconvert(RDF_Triple rt, PrefixMap pmap)static RDF_Quadconvert(Quad quad, boolean allowValues)static RDF_Quadconvert(Quad quad, PrefixMap pmap, boolean allowValues)static 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 voidtoThrift(Node node, PrefixMap pmap, RDF_Term term, boolean allowValues)static voidtoThrift(Node node, RDF_Term term)static voidtoThrift(Node node, RDF_Term term, boolean allowValues)static booleantoThriftValue(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_Terminto 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).
-
-