From: Peter L. <pet...@in...> - 2015-06-14 18:57:14
|
I have a simple Virtuoso/PL stored procedure in which I want to bind a variable (URI) into the SPARQL cursor. BTW the purpose is to generate a graph_group procedurally from a graph that expresses the group as owl:imports. create procedure create_graph_group (in graphGroup varchar in *aggregateGraph *varchar ) { DB.DBA.RDF_GRAPH_GROUP_DROP(graphGroup , 1); DB.DBA.RDF_GRAPH_GROUP_CREATE (graphGroup , 1); for (SPARQL SELECT distinct ?graph WHERE { ?graphGroup a owl:Ontology . ?graphGroup owl:imports* ?graph . FILTER(?graphGroup = *?:**aggregateGraph* ) } ) do { DB.DBA.RDF_GRAPH_GROUP_INS (graphGroup , graph); } return aggregateGraph ; }; The questions I have are: 1. Is the above syntax correct for a bound variable in a SPARQL cursor: *?:**aggregateGraph* 2. In this context I need to bind an URI, not a string. How can I force a PL variable to be of datatype SPARQL URI/IRI? Many thanks *Peter J. Lawrence* *inova8* *Providing answers for users' information questions* *Mobile:* +1 330 631 3772 | *Phone:* +1 330 342 0582 | *UK Cell*:+44 795 563 2824 |*Skype:* PeterJLawrence *Email:* pet...@in... | *Web:* www.inova8.com *LinkedIn: **http://www.linkedin.com/in/peterjohnlawrence <http://www.linkedin.com/in/peterjohnlawrence>* |