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 Quadconvert(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, RDF_Quad rq, PrefixMap pmap) static org.apache.jena.graph.NodeBuild aNodefrom anRDF_Term.static org.apache.jena.graph.Nodeconvert(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, RDF_Term term, PrefixMap pmap) Build aNodefrom anRDF_Termusing a prefix map which must agree with the map used to create theRDF_Termin the first place.static org.apache.jena.graph.Tripleconvert(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, RDF_Triple rt, PrefixMap pmap) static RDF_Termconvert(org.apache.jena.graph.Node node, boolean allowValues) static RDF_Termstatic RDF_Tripleconvert(org.apache.jena.graph.Triple triple, boolean allowValues) static RDF_Triplestatic Quadstatic Quadstatic org.apache.jena.graph.NodeBuild aNodefrom anRDF_Term.static org.apache.jena.graph.NodeBuild aNodefrom anRDF_Term.static org.apache.jena.graph.Tripleconvert(RDF_Triple triple) static org.apache.jena.graph.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 voidEncode aNodeinto anRDF_Termstatic voidEncode aNodeinto anRDF_Term, using values (integer, decimal, double) if possible.static voidEncode aNodeinto anRDF_Term.static booleantoThriftValue(org.apache.jena.graph.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
Encode aNodeinto anRDF_Term, using values (integer, decimal, double) if possible. -
toThrift
Encode aNodeinto anRDF_Term. Control whether to use values (integer, decimal, double) if possible. -
toThrift
public static void toThrift(org.apache.jena.graph.Node node, PrefixMap pmap, RDF_Term term, boolean allowValues) Encode aNodeinto anRDF_Term -
convert
Build aNodefrom anRDF_Term. -
convert
public static org.apache.jena.graph.Node convert(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, RDF_Term term) Build aNodefrom anRDF_Term. -
convert
Build aNodefrom anRDF_Term. -
convert
public static org.apache.jena.graph.Node convert(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, RDF_Term term, PrefixMap pmap) Build aNodefrom anRDF_Termusing a prefix map which must agree with the map used to create theRDF_Termin the first place. -
convert
-
convert
-
convert
-
convert
-
convert
public static org.apache.jena.graph.Triple convert(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, RDF_Triple rt, PrefixMap pmap) -
convert
-
convert
public static RDF_Triple convert(org.apache.jena.graph.Triple triple, PrefixMap pmap, boolean allowValues) -
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).
-