Hi Andy,

We are using the general dataset.
Our use case is simply that we are taking quads in from clients, which may or 
may not include a default graph.
We use the union model for several things, but one example is SHACL validation. 
So we always need to remember to include the default graph into the union model.
Currently, I've subclassed the DatasetImpl to override the unionModel() method; 
but it sounds like we may be an edge case.

Thanks,
-Adam
________________________________________
From: Andy Seaborne <a...@apache.org>
Sent: Saturday, April 14, 2018 5:01 PM
To: dev@jena.apache.org
Subject: Re: Dataset.getUnionModel()

Hi Adam,

Yes, the union model is the graph union of the named graphs and does not
include the default graph. This choice is intentional and is driven by
the SPARQL side of things.

It's a useful way to have manageability of the data by using the SPARQL
Graph Store Protocol to PUT and POST graphs that together make the
default graph to be queried. This matches the behaviour some other
triple stores.

Which kind of dataset are you using?

For the general dataset that can include any models, a graph can be
added twice so the default graph can be added as named graph as well and
so included in the union.

What is your application usage that naturally wanted the default model
to be included?

     Andy

On 14/04/18 21:00, Adam Jacobs wrote:
> Dataset.getUnionModel() excludes the default graph.
> Would it be appropriate to include the default graph in this method, or to 
> add an additional unioning method to the Dataset interface which includes the 
> default graph?
> It seems like an oversight, but maybe there was a reason for excluding it?
>

Reply via email to