Perhaps you could say more about the representation you want to use? ResultSetFormatter does feature methods that (to my understanding) do stream using Jena serialization:
https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/query/ResultSetFormatter.html#output-java.io.OutputStream-org.apache.jena.query.ResultSet-org.apache.jena.sparql.resultset.ResultsFormat- --- A. Soroka The University of Virginia Library > On Oct 14, 2015, at 6:39 PM, Enrico Daga (enridaga) <[email protected]> > wrote: > > Hi, > > in my use case I need to stream a ResultSet obtained from a query to a remote > endpoint converted into an RDF output format. > I know Jena provides a ResultSetFormatter.toModel facility for that, however > I have the following constraints: > - I want to use a different representation/vocabulary and not the one > provided by Jena, and > - I don't want to load the data in memory. In other words I don't want to > create a Model and fill it with the ResultSet, but streaming out the triples > while I iterate on it, to control memory consumption. > - I still want to benefit by the Jena serializers > > I have seen the StreamRDF interface, but I am not very clear about how to use > it effectively. > What could be a correct approach in this scenario? > > Thank you, > > Enrico > > ā > Enrico Daga (enridaga) > http://www.enridaga.net <http://www.enridaga.net/> > Il budda eā nel parco. > > > > >
