Thanks for the clarification. I had made a combined version to start
testing and hopefully it's a close approximation of the intended
deliverables.
[ Ying - how's your testing going? ]
A few things about the pull requests so far:
0/ More tests in TestQuery in Fuseki:
For example, this should show up:
1/ QueryEngineHttp.execConstructDataset is not implemented.
2/ SPARQL_Query:
This line
if ( ! rdfMediaType.getType().equals("*") ) {
means that only "Accept: *" will trigger dataset results.
then in ResponseDataset
MediaType i = ConNeg.chooseContentType(request, DEF.quadsOffer,
DEF.acceptNQuads) ;
will always choose TriG because the accept is "*" ("output=" works but
that is overriding content negotiation).
There is no way to ask for a specific syntax (n-quads, trig, JSON-LD)
using "Accept:"
e.g. "Accept: application/n-quads"
3/ ResponseDataset is copy of ResponseModel yet the only differences
(after reformatting) are different data values and
< RDFDataMgr.write(out, dataset, lang) ;
---
> RDFDataMgr.write(out, model, lang) ;
It is not good to have copied code because it makes maintenance harder.
(2) and (3) can be addressed by
A/ SPARQL_Query:
For CONSTRUCT, always work in datasets; execConstructDataset().
No need for mention of Models. if it's a triples CONSTRUCT, treating as
a dataset will simply put the results in to the default graph.
QueryExecutionBase::execConstructQuads
Following on from that, treating datasets as a natural extension of
models. There is no need to test for extended syntax. If it's strict
SPARQL 1.1, a dataset will just have only a default graph.
B/ Content negotiate for a combined DEF.rdfOffer+DEF.quadsOffer (I don't
underatand DEF.pureRdfOffer -- N-triples is a standard).
C/ If it's a triple format (test the Lang),
RDFDataMgr.write(out, dataset.getDefaultModel(), lang) ;
otherwise:
RDFDataMgr.write(out, dataset, lang) ;
Andy