On 16/10/15 17:31, Enrico Daga (enridaga) wrote:
...
However, Jena does not seem to support some of the RDF serializations
for streaming, namely XML and JSON formats, resulting in a
org.apache.jena.riot.RiotException: No serialization for language
Lang:rdf/null, for example. Is this right or I am mistaking/missing
something? I would really like this same code to support all
available serialisation formats!
I just added Lang:rdf/null support (i.e. /dev/null) - obviously things
do not round trip through rdf/null
RDF/XML, JSON-LD formats don't stream. These need to be written
non-streaming.
JSON-LD is not a streaming format:
1/ The processor Jena used jsonld-java simply does not work that way.
2/ @context must be calculated before writing.
RDF/XML is not a streaming form: the namespace declarations for
properties need to be found or generated before writing triples. It
would be possible to add an RDF/XML writer that put namespaces on each
rdf:Description element. The output will be large.
RDF/JSON streams.
As does Trix.
Andy