On 21/05/13 04:49, Lewis John Mcgibbney wrote:
Hi,
Having come back to this tonight, I think I am slightly closer :0)
I *think* the code I am after is located in jena-arq around here [0]
Specifically, I found the ResultSetFormatter [1], this beast looks exactly
like what I am after.
Lewis

[0]
http://svn.apache.org/repos/asf/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/
[1]
http://jena.apache.org/documentation/javadoc/arq/index.html?com/hp/hpl/jena/query/ResultSetFormatter.html

Hi Lewis,

If you're going a DESCRIBE query, you get make a Model - not a stream of triples. Models are sets and suppress duplicates.

There is QueryExecution.execDescribeTriples but IIRC it returns a stream of triples after model formation.

execConstructTriples() does stream and you can see duplicates.

The ResultSetFormatter works on SELECT queries and does streaming.

The results from Fuseki for DESCRIBE are a model (RDF graph) and do have duplicates suppressed. They are also neatly formatted if that's the format you asked for which requires whole-result access so no streaming.

From Fuseki, SELECT results are streaming and will be so if used with Jena's client API for SPARQL operations.

Streaming is good - until there's an encoding problem mid-stream or the query execution times out. HTTP requires the status code be sent before the results.

        Andy



On Mon, May 20, 2013 at 1:11 PM, Lewis John Mcgibbney <
[email protected]> wrote:

Hi All,
Say I submit a DESCRIBE query (via Fuseki for instance) and my query
matches one subject which has many resources, all of which is returned as a
stream, I would like to locate the code within Jena that actually
represents this stream.
My reasoning behind this is that I wish to manipulate the data stream (of
possible) and extract specific parts of data, using them as input to drive
web services deployed in Axis2.
I do not know the Jena codebase intimately therefore I thought it best to
write here in an attempt to get the info from one of you guys!
Thank you very much in advance for anyone able to help me out.
Best
Lewis

--
*Lewis*





Reply via email to