Alison; When you embed the SELECT statement in the SERVICE query, the
binding to ?g is not related to the binding to ?g outside of the
SERVICE statement. Try the following query.
SELECT distinct ?title ?abstract
WHERE
{ ?s :bio2rdfGeneID_h ?g .
FILTER regex(str(?s),"Hoxa10") . ##result = <http://
bio2rdf.org/geneid:3206>
SERVICE <http://atlas.bio2rdf.org/sparql>
{ ?g <http://bio2rdf.org/ns/bio2rdf#xArticle> ?o .
?o <http://purl.org/dc/elements/1.1/title> ?title .
?o <http://www.w3.org/2000/01/rdf-schema#comment> ?
abstract .
}
}
If it doesn't work, or takes too long to return, check to see what
your bindings for ?g are. If there are copious matching on the SPARQL
endpoint then add LIMIT statement to the end of the SELECT statement.
-- Scott
On Jul 8, 10:38 pm, alymay <[email protected]> wrote:
> Thanks for tthe feedback. I'm still having difficulty with this. The
> actual query is below. If I use the value <http://bio2rdf.org/geneid:
> 3206> directly in the the query to the service I get an almost instant
> result but when I try it using the variable from my local graph
> queryresult it seems to search for ever and would probably time out.
>
> SELECT distinct ?title ?abstract
> WHERE
> {
> ?s :bio2rdfGeneID_h ?g .
> FILTER regex(str(?s),"Hoxa10") . ##result = <http://bio2rdf.org/
> geneid:3206>
>
> SERVICE <http://atlas.bio2rdf.org/sparql> {
> SELECT ?title ?abstract WHERE
> {
> ?g <http://bio2rdf.org/ns/bio2rdf#xArticle> ?o .
> ?o <http://purl.org/dc/elements/1.1/title> ?title .
> ?o <http://www.w3.org/2000/01/rdf-schema#comment> ?
> abstract . }
> }
>
> }
>
> On Jul 6, 2:59 pm, alymay <[email protected]> wrote:
>
> > Hi is it possible to pass a SPARQL SELECT result to a remote graph
> > using SERVICE - something like this:
>
> > SELECT distinct ?remoteObject
> > WHERE {
> > ?someSubject :somePredicate ?someObject .
>
> > {
> > SERVICE <http://remoteService>
> > {
> > ?someObject ?remotePredicate ?remoteObject .
>
> > }
>
> > If so what is the correct syntax?
> > Thanks
> > Alison
--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en