From: Kai K. <ku...@on...> - 2010-09-30 13:14:43
|
It works! Thx, Kai Am 30.09.2010 12:55, schrieb Blom, J.J.C. (Jaap): > Hello Kai, > > For the first part (From named) you are correct, you should use a second NamedGraphSet which is a subset of the original. There is a way to specify multiple default graphs, but I haven't tried it so don't know if it works. You'll need another NamedGraphSet (next to the one with all the data) which contains the named graphs that you want as default graphs. Then you create the NamedGraphDataSet with the NamedGraphDataSet(NamedGraphSet, Graph). As parameters for that you should use the orignal NamedGraphSet and the default graphs NamedGraphSet as Jena graph (default.asJenaGraph(null)). I haven't tried this, so I'm not sure it will work but I think it should (according to the documentation). > > With kind regards, > Jaap Blom > > > > > -----Original Message----- > From: Kai Kühn [mailto:ku...@on...] > Sent: donderdag 30 september 2010 12:09 > To: Blom, J.J.C. (Jaap) > Cc: ng4...@li... > Subject: Re: [namedgraphs] Problem with ASK queries > > > Hello Jaap, > > Thank you. That helps. But that means I have to put the FROM NAMED graphs manually from the query to the NamedGraphDataset, right? And what about FROM statements? I can only specify one default graph via API but I can write many FROM statements. > > Best, > Kai > > Am 29.09.2010 12:48, schrieb Blom, J.J.C. (Jaap): >> Hello Kai, >> >> Recently I dived into this situation and if I recalled correctly this is correct. NG4J per default disregards the default graph in the query. I can only assume this is because of the assumption that because you send it to a dataset the graphs that are needed are already there. >> >> The good news is that it is possible to instruct NG4J to treat one graph as the default graph. You can do that by using the de.fuberlin.wiwiss.ng4j.sparql.NamedGraphDataset.NamedGraphDataset(NamedGraphSet, Node) constructor. >> >> >> With kind regards, >> Jaap Blom >> >> >> -----Original Message----- >> From: Kai Kühn [mailto:ku...@on...] >> Sent: woensdag 29 september 2010 11:19 >> To: ng4...@li... >> Subject: [namedgraphs] Problem with ASK queries >> >> hi all, >> >> I have a problem with SPARQL/ASK queries. I insert a triple (s,p,o) into graph A. Then I do the following query : >> >> ASK FROM<B> WHERE { s p o. } >> >> It returns true although the triple is in graph A not B. Same hold for: >> >> ASK FROM NAMED<B> WHERE { s p o. } >> >> Can anyone reproduce this? Is it a bug? >> >> Best, >> Kai >> >> -- >> Kai Kühn >> Halo Team >> ontoprise GmbH - know how to use Know-how >> - - - >> Halo Extension - Want to get involved? >> http://smwforum.ontoprise.com/development >> - - - >> An der RaumFabrik 29; 76227 Karlsruhe; Germany >> Tel.: +49 721 509809-48; Fax: +49 721 509809-11 >> email: ku...@on..., www: http://www.ontoprise.com Registered >> Office: Karlsruhe, Germany, HRB 109540 Managing Directors: Prof. Dr. >> Jürgen Angele, Hans-Peter Schnurr >> - - - >> >> >> >> ---------------------------------------------------------------------- >> -------- Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and accelerate >> your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> ng4j-namedgraphs mailing list >> ng4...@li... >> https://lists.sourceforge.net/lists/listinfo/ng4j-namedgraphs >> >> http://www.croon.nl/disclaimer >> http://www.croon.nl/inkoopvoorwaarden >> Kamer van Koophandel Rotterdam nr. / Chamber of Commerce Rotterdam >> no.: 24002312 > > -- > Kai Kühn > Halo Team > ontoprise GmbH - know how to use Know-how > - - - > Halo Extension - Want to get involved? http://smwforum.ontoprise.com/development > - - - > An der RaumFabrik 29; 76227 Karlsruhe; Germany > Tel.: +49 721 509809-48; Fax: +49 721 509809-11 > email: ku...@on..., www: http://www.ontoprise.com Registered Office: Karlsruhe, Germany, HRB 109540 Managing Directors: Prof. Dr. Jürgen Angele, Hans-Peter Schnurr > - - - > > > > http://www.croon.nl/disclaimer > http://www.croon.nl/inkoopvoorwaarden > Kamer van Koophandel Rotterdam nr. / Chamber of Commerce Rotterdam no.: 24002312 -- Kai Kühn Halo Team ontoprise GmbH – know how to use Know-how - - - Halo Extension - Want to get involved? http://smwforum.ontoprise.com/development - - - An der RaumFabrik 29; 76227 Karlsruhe; Germany Tel.: +49 721 509809-48; Fax: +49 721 509809-11 email: ku...@on..., www: http://www.ontoprise.com Registered Office: Karlsruhe, Germany, HRB 109540 Managing Directors: Prof. Dr. Jürgen Angele, Hans-Peter Schnurr - - - |