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
-
Method Summary
Modifier and TypeMethodDescriptionstatic Quad
convert
(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, RDF_Quad rq, PrefixMap pmap) static org.apache.jena.graph.Node
Build aNode
from anRDF_Term
.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 aNode
from anRDF_Term
using a prefix map which must agree with the map used to create theRDF_Term
in the first place.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) static RDF_Term
convert
(org.apache.jena.graph.Node node, boolean allowValues) static RDF_Term
static RDF_Triple
convert
(org.apache.jena.graph.Triple triple, boolean allowValues) static RDF_Triple
static Quad
static Quad
static org.apache.jena.graph.Node
Build aNode
from anRDF_Term
.static org.apache.jena.graph.Node
Build aNode
from anRDF_Term
.static org.apache.jena.graph.Triple
convert
(RDF_Triple triple) static org.apache.jena.graph.Triple
convert
(RDF_Triple rt, PrefixMap pmap) static RDF_Quad
static RDF_Quad
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
Encode aNode
into anRDF_Term
static void
Encode aNode
into anRDF_Term
, using values (integer, decimal, double) if possible.static void
Encode aNode
into anRDF_Term
.static boolean
toThriftValue
(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 aNode
into anRDF_Term
, using values (integer, decimal, double) if possible. -
toThrift
Encode aNode
into 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 aNode
into anRDF_Term
-
convert
Build aNode
from 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 aNode
from anRDF_Term
. -
convert
Build aNode
from 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 aNode
from anRDF_Term
using a prefix map which must agree with the map used to create theRDF_Term
in 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_Term
into 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)
.
-