java.lang.Object
org.apache.jena.riot.protobuf.ProtobufConvert
Convert to and from Protobuf wire objects.
See StreamRDF2Protobuf
and Protobuf2StreamRDF
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, PB_RDF.RDF_Quad rq, PrefixMap pmap) static org.apache.jena.graph.Node
convert
(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, PB_RDF.RDF_Term term) Build aNode
from anPB_RDF.RDF_Term
.static org.apache.jena.graph.Node
convert
(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, PB_RDF.RDF_Term term, PrefixMap pmap) Build aNode
from anPB_RDF.RDF_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, PB_RDF.RDF_Triple triple) static org.apache.jena.graph.Triple
convert
(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, PB_RDF.RDF_Triple rt, PrefixMap pmap) static PB_RDF.RDF_Term
convert
(org.apache.jena.graph.Node node, boolean allowValues) static PB_RDF.RDF_Term
static PB_RDF.RDF_Triple
convert
(org.apache.jena.graph.Triple triple, boolean allowValues) static PB_RDF.RDF_Triple
static Quad
convert
(PB_RDF.RDF_Quad quad) static Quad
convert
(PB_RDF.RDF_Quad rq, PrefixMap pmap) static org.apache.jena.graph.Node
convert
(PB_RDF.RDF_Term term) Build aNode
from anPB_RDF.RDF_Term
.static org.apache.jena.graph.Node
convert
(PB_RDF.RDF_Term term, PrefixMap pmap) Build aNode
from anPB_RDF.RDF_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
(PB_RDF.RDF_Triple triple) static org.apache.jena.graph.Triple
convert
(PB_RDF.RDF_Triple rt, PrefixMap pmap) static PB_RDF.RDF_Quad
static PB_RDF.RDF_Quad
static PB_RDF.RDF_Term
toProtobuf
(org.apache.jena.graph.Node node, PB_RDF.RDF_Term.Builder term) Encode aNode
into anPB_RDF.RDF_Term
, using values (integer, decimal, double) if possible.static PB_RDF.RDF_Term
toProtobuf
(org.apache.jena.graph.Node node, PB_RDF.RDF_Term.Builder term, boolean allowValues) Encode aNode
into anPB_RDF.RDF_Term
.static PB_RDF.RDF_Term
toProtobuf
(org.apache.jena.graph.Node node, PrefixMap pmap, PB_RDF.RDF_Term.Builder termBuilder, boolean allowValues) Encode aNode
into anPB_RDF.RDF_Term
-
Constructor Details
-
ProtobufConvert
public ProtobufConvert()
-
-
Method Details
-
convert
Build aNode
from anPB_RDF.RDF_Term
. -
convert
public static org.apache.jena.graph.Node convert(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, PB_RDF.RDF_Term term) Build aNode
from anPB_RDF.RDF_Term
. -
convert
Build aNode
from anPB_RDF.RDF_Term
using a prefix map which must agree with the map used to create theRDF_Term
in the first place. -
convert
public static org.apache.jena.graph.Node convert(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, PB_RDF.RDF_Term term, PrefixMap pmap) Build aNode
from anPB_RDF.RDF_Term
using a prefix map which must agree with the map used to create theRDF_Term
in the first place. -
convert
-
convert
public static org.apache.jena.graph.Triple convert(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, PB_RDF.RDF_Triple triple) -
convert
-
convert
public static org.apache.jena.graph.Triple convert(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, PB_RDF.RDF_Triple rt, PrefixMap pmap) -
convert
-
convert
public static Quad convert(org.apache.jena.atlas.lib.Cache<String, org.apache.jena.graph.Node> uriCache, PB_RDF.RDF_Quad rq, PrefixMap pmap) -
toProtobuf
public static PB_RDF.RDF_Term toProtobuf(org.apache.jena.graph.Node node, PB_RDF.RDF_Term.Builder term) Encode aNode
into anPB_RDF.RDF_Term
, using values (integer, decimal, double) if possible. -
toProtobuf
public static PB_RDF.RDF_Term toProtobuf(org.apache.jena.graph.Node node, PB_RDF.RDF_Term.Builder term, boolean allowValues) Encode aNode
into anPB_RDF.RDF_Term
. Control whether to use values (integer, decimal, double) if possible. -
toProtobuf
public static PB_RDF.RDF_Term toProtobuf(org.apache.jena.graph.Node node, PrefixMap pmap, PB_RDF.RDF_Term.Builder termBuilder, boolean allowValues) Encode aNode
into anPB_RDF.RDF_Term
-
convert
-
convert
public static PB_RDF.RDF_Term convert(org.apache.jena.graph.Node node, PrefixMap pmap, boolean allowValues) -
convert
-
convert
public static PB_RDF.RDF_Triple convert(org.apache.jena.graph.Triple triple, PrefixMap pmap, boolean allowValues) -
convert
-
convert
-
convert
-