BalduinLandolt commented on issue #2083: URL: https://github.com/apache/jena/issues/2083#issuecomment-1867813102
> Could I ask what the code is trying to achieve by converting a triple to a quad if the intended output is Turtle (triples only)? Not really, sorry... we're dealing with some rather gnarly legacy code, and in this part of the code base there were tons of abstractions and wrappers, because historically this was designed to work both with a Jena or an RDF4J model underneath. But RDF4J had been removed long ago, so the abstractions had become rather pointless. When I inlined all that was going on, I ended up with something similar to the sample code I pasted above - and that's when it became obvious that the implementation does not make sense. We ended up removing some of the redundant abstractions, calling functionality on the Jena models directly, and that had already fixed our problem (as @mpro7 had pointed out). In the real code base, the function would also take in an RDFLanguage as a param; and then it would be used to transform a stram of RDF statements from one language to another - but that doesn't make `inner.quad(jena.sparql.core.Quad.create(jena.sparql.core.Quad.defaultGraphIRI, triple))` more sensible, of course. In any case, our issue is fixed, no need to worry about that. But my example proves that the behaviour from Jena 4.8 to 4.9 has changed somewhat (and arguable a TTL-Parser should probably not return TRIG, even if it gets quads for triples), so if you want to investigate that, I hope my example helps. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
