Hi Hugh,

Thanks for the tips. I finally took some time to do this but I followed the
lazy approach (with the minimum changes) for now :)

This is what I did

select distinct P as PRED from DB.DBA.RDF_QUAD where S = _S and
*G in ( select RGGM_MEMBER_IID FROM DB.DBA.RDF_GRAPH_GROUP_MEMBER where
RGGM_GROUP_IID = _G UNION select _G ) *
order by id_to_iri (P))

Please mark a new bug I found trying this. If I reverse the select queries
I get a SQL syntax error here
select _G UNION
Maybe you expect a from clause before the UNION keyword but this should not
be necessary

Best,
Dimitris



On Fri, Dec 14, 2012 at 12:34 AM, Hugh Williams <hwilli...@openlinksw.com>wrote:

> Hi Dimitris,
>
> The way it can be done is to use theVirtuoso sparql_to_sql_text() function
> (http://docs.openlinksw.com/virtuoso/fn_sparql_to_sql_text.html) to
> determine the SQL query the query including the graph group is translated
> to ie  sparql_to_sql_text ('select * from <group> { ?s ?p ?o }'), then look
> at the IN condition on 'G' and copy that in the dbpedia/description.vsp in
> the place of equality of G.  Although note there is no guarantee the
> procedure which returns graph Ids would not be changed in the future as it
> is an internal call.  Another approach is to write the queries using sparql
> and use 'define output:valmode "LONG" '  in order to get same data types in
> the result set, see
> http://docs.openlinksw.com/virtuoso/rdfsparql.html#rdfsqlfromsparql .
>
>   Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software, Inc.      //              http://www.openlinksw.com/
> Weblog   -- http://www.openlinksw.com/blogs/
> LinkedIn -- http://www.linkedin.com/company/openlink-software/
> Twitter  -- http://twitter.com/OpenLink
> Google+  -- http://plus.google.com/100570109519069333827/
> Facebook -- http://www.facebook.com/OpenLinkSoftware
> Universal Data Access, Integration, and Management Technology Providers
>
> On 11 Dec 2012, at 17:24, Dimitris Kontokostas wrote:
>
> Hi Hugh,
>
> I hardcoded the gragh with the most triples for now (live.nl.dbpedia.org)
> to have something to show, so it is not fixed yet.
>
> Any suggestions?
>
> Best,
> Dimitris
>
>
> On Tue, Dec 11, 2012 at 7:28 PM, Hugh Williams 
> <hwilli...@openlinksw.com>wrote:
>
>> Hi Dimitris,
>>
>> Have your resolved or worked around this issue as I not the link in [2]
>> is returning a HTML description of the resource and not an empty page as
>> indicated ?
>>
>>   Best Regards
>> Hugh Williams
>> Professional Services
>> OpenLink Software, Inc.      //              http://www.openlinksw.com/
>> Weblog   -- http://www.openlinksw.com/blogs/
>> LinkedIn -- http://www.linkedin.com/company/openlink-software/
>> Twitter  -- http://twitter.com/OpenLink
>> Google+  -- http://plus.google.com/100570109519069333827/
>> Facebook -- http://www.facebook.com/OpenLinkSoftware
>> Universal Data Access, Integration, and Management Technology Providers
>>
>> On 6 Dec 2012, at 16:28, Dimitris Kontokostas wrote:
>>
>> Hi,
>>
>> I am trying to adapt the DBpedia plugin to work with graph groups in
>> http://live.nl.dbpedia.org
>> Right now I have the "http://nl.dbpedia.org"; as a group graph that
>> contains
>> the "http://live.nl.dbpedia.org"; and "http://static.nl.dbpedia.org";
>>
>> The problem is that the description page is rendered using SQL from
>> RDF_QUAD limiting to specific gragh [1], the "http://nl.dbpedia.org";
>> which does not exists in that table. resulting in empty html pages [2] but
>> not empty data pages [3].
>>
>> Although I could adapt the queries for this case I would like to use the
>> same code for both static & live dbpedia's
>> Is it possible to generate a dynamic "IN" clause and depending on the
>> settings to fill it with 1 or more graphs?
>>
>> I am not sure how to do this in VSP but I imagine it something like "...
>> AND G IN ( list of graphs)..." instead of G = _G
>>
>> The second case would be to convert SQL to SPARQL but I am not sure on
>> the performance impact it would have
>>
>> Best,
>> Dimitris
>>
>>
>> [1]
>> http://dbpedia.hg.sourceforge.net/hgweb/dbpedia/dbpedia_vad/file/e24f14cdfbf5/dbpedia/vsp/description.vsp#l272
>> [2] http://live.nl.dbpedia.org/page/Linux
>> [3]
>> http://live.nl.dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fnl.dbpedia.org&query=DESCRIBE+%3Chttp://nl.dbpedia.org/resource/Linux%3E&output=text/html
>>
>> --
>> Dimitris Kontokostas
>> Department of Computer Science, University of Leipzig
>> Research Group: http://aksw.org
>> Homepage:http://aksw.org/DimitrisKontokostas
>> ------------------------------------------------------------------------------
>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
>> Remotely access PCs and mobile devices and provide instant support
>> Improve your efficiency, and focus on delivering more value-add services
>> Discover what IT Professionals Know. Rescue delivers
>>
>> http://p.sf.net/sfu/logmein_12329d2d_______________________________________________
>> Virtuoso-users mailing list
>> Virtuoso-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>
>>
>>
>
>
> --
> Dimitris Kontokostas
> Department of Computer Science, University of Leipzig
> Research Group: http://aksw.org
> Homepage:http://aksw.org/DimitrisKontokostas
>
>
>


-- 
Dimitris Kontokostas
Department of Computer Science, University of Leipzig
Research Group: http://aksw.org
Homepage:http://aksw.org/DimitrisKontokostas
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to