Claude,

Adding to the interface is easy ... implementing it is a bit more tricky. In addition, the interaction between API and SPARQL queries needs working on to give consistent behaviour.

The DatasetGraph stack of classes isn't a stack - it's a tree, with different subcases for different implementation styles.

TDB is a triples+quads store and executes off the quad form of the SPARQL algebra.

        Andy

On 29/06/14 12:02, Claude Warren wrote:
I think I would like to see a method on the Dataset that returns the union
model (e.g. dataset.getUnionModel().  It seems like this would be a trivial
implementation for TDB and that code exists for the in memory versions.

It would mean that other packages that implement Dataset would have the
opportunity to make more efficient calls like TDB would do.

Do you suppose we can do this in 2.12.1 ?

Claude


On Sun, Jun 29, 2014 at 11:32 AM, Andy Seaborne <[email protected]> wrote:

On 29/06/14 10:54, Claude Warren wrote:

Is there a way to get a model that is the union of all the models in the
dataset that works across all implementations of Dataset?


Hi Claude,

GraphUnionRead should do it.  Being very general, it is not as efficient
(it has to do a 'distinct' on each graph.find which either is a not big
deal for small graphs and a significant amount of memory on large graphs
close to the limits).

For datasets, there are two ways:

1/ DatasetGraphViewGraphs

which should do it.  I haven't pushed it more visibly because it may be
better to make changes to the DatasetGraph hierarchy (Jena3 - or at least a
significant bump to 2.X).


2/ DynamicDatasets
(older code - actually designed for a slightly different usage but
happenes to handle this case)

Both relatively untested.

With all of these, if you use it over TDB, it will not use TDB's internal
handling of union graphs which is much better.

3/ Invert the problem - use TDB-in-memory!

         Andy







Reply via email to