You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Arthur Ryman <ry...@ca.ibm.com> on 2014/08/07 00:40:11 UTC

Configuring in-memory dataset

Is it possible to configure an in-memory dataset so that the unnamed graph 
is the union of all named graphs? I know how to do this for TDB but can't 
see how to do this for an in-memory dataset. Thx.

Regards, 
___________________________________________________________________________
Arthur Ryman, PhD

Chief Data Officer, Rational
Chief Architect, Portfolio & Strategy Management
Distinguished Engineer | Master Inventor | Academy of Technology

Toronto Lab | +1-905-413-3077 (office) | +1-416-939-5063 (mobile)



Re: Configuring in-memory dataset

Posted by Arthur Ryman <ry...@ca.ibm.com>.
Claude/Andy - Thx.

I had incorrectly assumed that TDB required the file system location. I 
set the union mode using
 
TDB.getContext().set(TDB.symUnionDefaultGraph, true); 

Then I used 

TDBFactory.createDataset();

to create an in-memory dataset as Claude suggested. It worked perfectly. 

Regards, 
___________________________________________________________________________
Arthur Ryman, PhD

Chief Data Officer, Rational
Chief Architect, Portfolio & Strategy Management
Distinguished Engineer | Master Inventor | Academy of Technology

Toronto Lab | +1-905-413-3077 (office) | +1-416-939-5063 (mobile)



Andy Seaborne <an...@apache.org> wrote on 08/07/2014 07:06:52 AM:

> From: Andy Seaborne <an...@apache.org>
> To: users@jena.apache.org, 
> Date: 08/07/2014 07:07 AM
> Subject: Re: Configuring in-memory dataset
> 
> On 07/08/14 06:53, Claude Warren wrote:
> > Simple solution is to use the TDB In memory version.
> > TDBFactory.createDataset();
> 
> Yes; behind the scenes, TDB uses "GraphView" which you can use directly 
> or via DatasetGraphViewGraphs which wraps an existing DatasetGraph in 
> the machinery.
> 
> TDB also, separately, handles union graph in SPARQL queries because it 
> can do a good job knowing the internal details of indexing.
> 
>    new DatasetGraphViewGraphs(...)
> 
>    GraphView.createNamedGraph(dsg, Quad.unionGraph) ;
> 
> An alternative approach to use GraphUnionRead which creates a Graph 
> which is a view of a collection of graphs as the union.
> 
> All unions are read only and dynamic (updating the associated named 
> graphs is visible in the union).
> 
>    Andy
> 
> >
> >
> >
> >
> > On Wed, Aug 6, 2014 at 11:40 PM, Arthur Ryman <ry...@ca.ibm.com> 
wrote:
> >
> >> Is it possible to configure an in-memory dataset so that the unnamed 
graph
> >> is the union of all named graphs? I know how to do this for TDB but 
can't
> >> see how to do this for an in-memory dataset. Thx.
> >>
> >> Regards,
> >> 
___________________________________________________________________________
> >> Arthur Ryman, PhD
> >>
> >> Chief Data Officer, Rational
> >> Chief Architect, Portfolio & Strategy Management
> >> Distinguished Engineer | Master Inventor | Academy of Technology
> >>
> >> Toronto Lab | +1-905-413-3077 (office) | +1-416-939-5063 (mobile)
> >>
> >>
> >>
> >
> >
> 


Re: Configuring in-memory dataset

Posted by Andy Seaborne <an...@apache.org>.
On 07/08/14 06:53, Claude Warren wrote:
> Simple solution is to use the TDB In memory version.
> TDBFactory.createDataset();

Yes; behind the scenes, TDB uses "GraphView" which you can use directly 
or via DatasetGraphViewGraphs which wraps an existing DatasetGraph in 
the machinery.

TDB also, separately, handles union graph in SPARQL queries because it 
can do a good job knowing the internal details of indexing.

	new DatasetGraphViewGraphs(...)

	GraphView.createNamedGraph(dsg, Quad.unionGraph) ;

An alternative approach to use GraphUnionRead which creates a Graph 
which is a view of a collection of graphs as the union.

All unions are read only and dynamic (updating the associated named 
graphs is visible in the union).

	Andy

>
>
>
>
> On Wed, Aug 6, 2014 at 11:40 PM, Arthur Ryman <ry...@ca.ibm.com> wrote:
>
>> Is it possible to configure an in-memory dataset so that the unnamed graph
>> is the union of all named graphs? I know how to do this for TDB but can't
>> see how to do this for an in-memory dataset. Thx.
>>
>> Regards,
>> ___________________________________________________________________________
>> Arthur Ryman, PhD
>>
>> Chief Data Officer, Rational
>> Chief Architect, Portfolio & Strategy Management
>> Distinguished Engineer | Master Inventor | Academy of Technology
>>
>> Toronto Lab | +1-905-413-3077 (office) | +1-416-939-5063 (mobile)
>>
>>
>>
>
>


Re: Configuring in-memory dataset

Posted by Claude Warren <cl...@xenei.com>.
Simple solution is to use the TDB In memory version.
TDBFactory.createDataset();




On Wed, Aug 6, 2014 at 11:40 PM, Arthur Ryman <ry...@ca.ibm.com> wrote:

> Is it possible to configure an in-memory dataset so that the unnamed graph
> is the union of all named graphs? I know how to do this for TDB but can't
> see how to do this for an in-memory dataset. Thx.
>
> Regards,
> ___________________________________________________________________________
> Arthur Ryman, PhD
>
> Chief Data Officer, Rational
> Chief Architect, Portfolio & Strategy Management
> Distinguished Engineer | Master Inventor | Academy of Technology
>
> Toronto Lab | +1-905-413-3077 (office) | +1-416-939-5063 (mobile)
>
>
>


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