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
}



Reply via email to