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 Keen <ar...@gmail.com> on 2016/04/06 20:06:50 UTC
Fuseki2: Is it possible to set Default to UnionGraph when creating a dataset.
I create Fuseki 2 Datasets by passing {“dbType” : “mem”, “dbName” : “myDsName”} in the POST request. However this sets up a dataset with default graph as an individual graph and I would like the behavior of the default graph to be unionDefaultGraph.
I was wondering if it is possible to pass “unionDefaultGraph” : “true” as an additional parameter to cause the dataset’s default graph to be configured to be the unionGraph.
I have added the parameter to my code to test, and it has no effect on the created dataset, so either it is not allowed in the call, or I am using the wrong key, or?
Any help would be appreciated.
-Arthur
protected Response createInstance(Invocation.Builder request, String instanceName) {
//Fuseki-specific begin
List<NameValuePair> nvps = new ArrayList<>();
nvps.add(new BasicNameValuePair("dbType", "mem")); //instance.getInstanceType()));
nvps.add(new BasicNameValuePair("dbName", "/" + instanceName));
nvps.add(new BasicNameValuePair("unionDefaultGraph", "true"));
String entity = URLEncodedUtils.format(nvps, HTTP.DEF_CONTENT_CHARSET.name());
log.debug(entity);
return request.post(Entity.entity(entity, MediaType.APPLICATION_FORM_URLENCODED_TYPE));
// Fuseki-specific end
}
Re: Fuseki2: Is it possible to set Default to UnionGraph when creating a dataset.
Posted by Arthur Keen <ar...@gmail.com>.
Andy
Thanks for your help.
A
Sent from my iPhone
> On Apr 9, 2016, at 11:01 AM, Andy Seaborne <an...@apache.org> wrote:
>
>> On 06/04/16 19:06, Arthur Keen wrote:
>> I create Fuseki 2 Datasets by passing {“dbType” : “mem”, “dbName” : “myDsName”} in the POST request. However this sets up a dataset with default graph as an individual graph and I would like the behavior of the default graph to be unionDefaultGraph.
>>
>> I was wondering if it is possible to pass “unionDefaultGraph” : “true” as an additional parameter to cause the dataset’s default graph to be configured to be the unionGraph.
>>
>> I have added the parameter to my code to test, and it has no effect on the created dataset, so either it is not allowed in the call, or I am using the wrong key, or?
>>
>> Any help would be appreciated.
>>
>> -Arthur
>
> Hi Arthur,
>
> It's not possible at the moment.
>
> "Provide unionDefaultGraph for all graphs"
> https://issues.apache.org/jira/browse/JENA-1158
> + wiring into Fuseki.
>
> (I hope there isn't any documentation that promises it at the moment)
>
> For small amounts of data, using in-memory TDB + unionDefaultGraph in an assembler will work.
>
> Andy
>
>>
>> protected Response createInstance(Invocation.Builder request, String instanceName) {
>> //Fuseki-specific begin
>> List<NameValuePair> nvps = new ArrayList<>();
>> nvps.add(new BasicNameValuePair("dbType", "mem")); //instance.getInstanceType()));
>> nvps.add(new BasicNameValuePair("dbName", "/" + instanceName));
>> nvps.add(new BasicNameValuePair("unionDefaultGraph", "true"));
>> String entity = URLEncodedUtils.format(nvps, HTTP.DEF_CONTENT_CHARSET.name());
>> log.debug(entity);
>> return request.post(Entity.entity(entity, MediaType.APPLICATION_FORM_URLENCODED_TYPE));
>> // Fuseki-specific end
>> }
>
Re: Fuseki2: Is it possible to set Default to UnionGraph when
creating a dataset.
Posted by Andy Seaborne <an...@apache.org>.
On 06/04/16 19:06, Arthur Keen wrote:
> I create Fuseki 2 Datasets by passing {“dbType” : “mem”, “dbName” : “myDsName”} in the POST request. However this sets up a dataset with default graph as an individual graph and I would like the behavior of the default graph to be unionDefaultGraph.
>
> I was wondering if it is possible to pass “unionDefaultGraph” : “true” as an additional parameter to cause the dataset’s default graph to be configured to be the unionGraph.
>
> I have added the parameter to my code to test, and it has no effect on the created dataset, so either it is not allowed in the call, or I am using the wrong key, or?
>
> Any help would be appreciated.
>
> -Arthur
Hi Arthur,
It's not possible at the moment.
"Provide unionDefaultGraph for all graphs"
https://issues.apache.org/jira/browse/JENA-1158
+ wiring into Fuseki.
(I hope there isn't any documentation that promises it at the moment)
For small amounts of data, using in-memory TDB + unionDefaultGraph in an
assembler will work.
Andy
>
> protected Response createInstance(Invocation.Builder request, String instanceName) {
> //Fuseki-specific begin
> List<NameValuePair> nvps = new ArrayList<>();
> nvps.add(new BasicNameValuePair("dbType", "mem")); //instance.getInstanceType()));
> nvps.add(new BasicNameValuePair("dbName", "/" + instanceName));
> nvps.add(new BasicNameValuePair("unionDefaultGraph", "true"));
> String entity = URLEncodedUtils.format(nvps, HTTP.DEF_CONTENT_CHARSET.name());
> log.debug(entity);
> return request.post(Entity.entity(entity, MediaType.APPLICATION_FORM_URLENCODED_TYPE));
> // Fuseki-specific end
> }
>
>