You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Claude Warren <cl...@xenei.com> on 2014/06/30 12:04:39 UTC

additional method in dataset

I would like to see a method added to dataset as follows:

/**
Returns the union of the dataset.

Returns the union of all named models in the dataset as a single model.

If the default model is not one of the named models it is also included and
is not
the union model, it must also be included.
*/
Model getUnionModel();

I am hoping we can add this in 2.12.1 as there are other changes in the
interfaces as well.

Thoughts?

Claude

-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Re: additional method in dataset

Posted by Claude Warren <cl...@xenei.com>.
GraphUnionRead is close.  I have a specific case where I am not updating a
"default graph" so I am only concerned with reading the combined model.  I
will contribute the code for the default implementation.

However, I do have a requirement that when the base graphs are updated the
listeners on the combined model graph be notified.  So I had to implement
that.  It seems to me that the Union Graph implementation should announce
the changes to the base graphs to the listeners of the union graph.

Claude





On Mon, Jun 30, 2014 at 11:43 AM, Andy Seaborne <an...@apache.org> wrote:

> On 30/06/14 11:04, Claude Warren wrote:
>
>> I would like to see a method added to dataset as follows:
>>
>> /**
>> Returns the union of the dataset.
>>
>> Returns the union of all named models in the dataset as a single model.
>>
>> If the default model is not one of the named models it is also included
>> and
>> is not
>> the union model, it must also be included.
>>
>
> That contract is not the one that TDB offers.  The union default graph is
> just the named graphs.  If there is a non-empty concrete default graph, it
> disappears as far as query is concerned.
>
> TDB supports getGraph("urn:x-arq.urn:x-arq:UnionGraph)
>
>
>  */
>> Model getUnionModel();
>>
>> I am hoping we can add this in 2.12.1 as there are other changes in the
>> interfaces as well.
>>
>> Thoughts?
>>
>
> Claude,
>
> Did GraphUnionRead work for you? DatasetGraphViewGraphs?
>
> Would you like to prototype that?  The DatasetGraph hierarchy is a bit
> more complicated and we also need to get consistent, expected behaviour
> across API and SPARQL use.
>
>         Andy
>
>
>
>


-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Re: additional method in dataset

Posted by Andy Seaborne <an...@apache.org>.
On 30/06/14 11:04, Claude Warren wrote:
> I would like to see a method added to dataset as follows:
>
> /**
> Returns the union of the dataset.
>
> Returns the union of all named models in the dataset as a single model.
>
> If the default model is not one of the named models it is also included and
> is not
> the union model, it must also be included.

That contract is not the one that TDB offers.  The union default graph 
is just the named graphs.  If there is a non-empty concrete default 
graph, it disappears as far as query is concerned.

TDB supports getGraph("urn:x-arq.urn:x-arq:UnionGraph)

> */
> Model getUnionModel();
>
> I am hoping we can add this in 2.12.1 as there are other changes in the
> interfaces as well.
>
> Thoughts?

Claude,

Did GraphUnionRead work for you? DatasetGraphViewGraphs?

Would you like to prototype that?  The DatasetGraph hierarchy is a bit 
more complicated and we also need to get consistent, expected behaviour 
across API and SPARQL use.

	Andy