Discussion:
Create Dataset with unionDefaultGraph on
Jindřich Mynarz
2016-03-25 18:47:52 UTC
Permalink
Hi,

is it possible to create a Dataset
(via org.apache.jena.query.DatasetFactory) so that the default graph is the
union of all named graphs, similarly to using tdb:unionDefaultGraph in TDB?

Thanks,

Jindřich
--
Jindřich Mynarz
http://mynarz.net/#jindrich
Andy Seaborne
2016-03-27 11:16:53 UTC
Permalink
Post by Jindřich Mynarz
Hi,
is it possible to create a Dataset
(via org.apache.jena.query.DatasetFactory) so that the default graph is the
union of all named graphs, similarly to using tdb:unionDefaultGraph in TDB?
Thanks,
Jindřich
Not directly at the moment. It depends on the storage or a rewrite of
the dataset currently.

See
https://issues.apache.org/jira/browse/JENA-1074

(and JENA-642)


TIM (Transaction in Memory) already support the union named graph
<urn:x-arq:unionDefaultGraph>


Dataset ds0 = DatasetFactory.create() ;
...
DatasetDescription desc = new DatasetDescription();
ds0.listNames().forEachRemaining(desc::addNamedGraphURI) ;

Dataset ds = DynamicDatasets.dynamicDataset(desc, ds0, true) ;

// Use ds
ds.getDefaultModel() ;


TIM (Transaction in Memory) already supports the union named graph
<urn:x-arq:unionDefaultGraph>


Dataset ds = DatasetFactory.createTxnMem() ;
Model um = ds.getNamedModel(Quad.unionGraph.getURI()) ;

Andy

Loading...