I have tested this query
SELECT *
WHERE {
SERVICE <http://194.119.214.82:8891/sparql> {
GRAPH <http://localhost:8891/open-data-trapani> {
?that <http://any23.org/tmp-musei/Nome> ?label2 .
?that <http://any23.org/tmp-musei/Latitudine> ?lat2 .
?that <http://any23.org/tmp-musei/Longitudine> ?long2 .
} .
FILTER bif:st_intersects(bif:st_point(xsd:float(?lat1),
xsd:float(?long1)), bif:st_point(xsd:float(?lat2), xsd:float(?long2)),
0.08) .
} .
}
and believe you can ignore the function factory warnings - they are
created unnecessarily in an optimization step ahead of the actual
service call. I have verified that the correct SPARQL string gets sent
to AG.
I do not have any further ideas right now - maybe try to narrow it down
starting with a simpler example such as above.
Holger
On 1/8/2015 20:51, [email protected] wrote:
Hi Scott, David,
@Scott, when you say to put the functions in the spin in a file I'm
not sure how, these functions are Virtuoso Geospatial functions, not
mine, so I should just use in the context of Virtuoso endpoint I'm
calling via "SERVICE". As far as I know I was aware that when using
SERVICE keyword in SPARQL the federated query ask the endpoint to
implement the functions called (this time bif: ....).
Regarding the prefix I have defined it into TBC inside the namespace tab.
@David, re brackets I know its strange, when I used that functions
inside virtuoso endpoint I never put <> but just call the function,
e.g. bif:st_intersects . But when I tried inside TBC SPARQL tab I saw
that only using the brackets its working, and I can confirm that
removing the brackets and using the full URI returns the below error:
java.lang.reflect.InvocationTargetException
at org.topbraidcomposer.sparql.view.SPARQLView$12.run(SPARQLView.java:498)
at org.topbraidcomposer.core.util.ThreadUtil$1$1.run(ThreadUtil.java:64)
at java.lang.Thread.run(Thread.java:745)
Caused by: HttpException: 500
While calling the functions like this:
*FILTER* bif:st_intersects(bif:st_point(xsd:float(?lat1),
xsd:float(?long1)), bif:st_point(xsd:float(?lat2), xsd:float(?long2)),
0.008) .
Work perfectly under TBC SPARQL window.
The strange and not clear thing is that its not working under TBC
spin:rule with inference tool. And to me it looks not directly related
to the prefix thing because even under SPARQL window I get the
warnings, but the results come out anyway.
Any idea?
Thanks
Antonino
Il giorno mercoledì 7 gennaio 2015 21:44:31 UTC+1, Scott Henninger ha
scritto:
On 1/7/2015 2:30 PM, David Price wrote:
On 7 Jan 2015, at 20:22, Scott Henninger
<[email protected] <javascript:>> wrote:
David, Antonino; The prefix syntax is correct as defined, i.e.
*PREFIX* bif: <http://www.openlinksw.com/schemas/bif#
<http://www.openlinksw.com/schemas/bif#>>
Yep - that’s defining the prefix. However, using a prefix (e.g.
FILTER <bif:st_intersects>) is where angle brackets should not be
used.
Yes that's correct - the prefix defines a resource (node)
already. I.e. given the above prefix definition, the following
are the same URI:
bif:st_intersects
<http://www.openlinksw.com/schemas/bif#st_intersects>
<http://www.openlinksw.com/schemas/bif#st_intersects>
...however, the original statement was "the rule I execute is
working under TBC Sparql tab". Now that David points this out,
I'm not sure how that is possible (?) The "no registered function
factory" warning should occur and not results will be found.
-- Scott
On 1/7/2015 2:06 PM, David Price wrote:
Only use angle brackets for full URIs, not when using prefixes.
Cheers,
David
UK +44 7788 561308
US +1 336 283 0606
On 7 Jan 2015, at 14:31, [email protected] <javascript:>
wrote:
Hi all,
I'm enjoying experimenting SPIN rules as federated queries to
Linked Data cloud and local Virtuoso stored datasets. The
queries I'm trying to implement in SPIN are CONSTRUCT with
bif: geospatial functions usage.
I have tried this in TBC FE 4.6 but I get a strange behaviour:
the rule I execute is working under TBC Sparql tab (even if
raising "- URI <bif:st_point> has no registered function
factory" warnings) producing the expected inference outcome.
If I try to execute the same as a spin:rule attached to a
class with Run Inference I get no results, also Im unable to
add the row *PREFIX* bif:
<http://www.openlinksw.com/schemas/bif#
<http://www.openlinksw.com/schemas/bif#>> to the rule, this
is being deleted after clicking enter.
Query is like:
CONSTRUCT {
?this owl:sameAs ?that .
}
WHERE {
?this foaf:name ?label1 .
?this geo:lat ?lat1 .
?this geo:long ?long1 .
SERVICE <http://194.119.214.82:8891/sparql
<http://194.119.214.82:8891/sparql>> {
GRAPH <http://localhost:8891/open-data-trapani
<http://localhost:8891/open-data-trapani>> {
?that <http://any23.org/tmp-musei/Nome
<http://any23.org/tmp-musei/Nome>> ?label2 .
?that <http://any23.org/tmp-musei/Latitudine
<http://any23.org/tmp-musei/Latitudine>> ?lat2 .
?that <http://any23.org/tmp-musei/Longitudine
<http://any23.org/tmp-musei/Longitudine>> ?long2 .
} .
FILTER
<bif:st_intersects>(<bif:st_point>(xsd:float(?lat1),
xsd:float(?long1)), <bif:st_point>(xsd:float(?lat2),
xsd:float(?long2)), 0.08) .
} .
}**
* Any suggestion?
*
*
*
*Thanks*
*
*
*Antonino Lo Bue*
*CNR-ICAR Palermo*
--
You received this message because you are subscribed to the
Google Group "TopBraid Suite Users", the topics of which
include Enterprise Vocabulary Network (EVN), Reference Data
Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid
Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected] <javascript:>
---
You received this message because you are subscribed to the
Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to [email protected]
<javascript:>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the
Google Group "TopBraid Suite Users", the topics of which
include Enterprise Vocabulary Network (EVN), Reference Data
Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid
Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected] <javascript:>
---
You received this message because you are subscribed to the
Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to [email protected]
<javascript:>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the
Google Group "TopBraid Suite Users", the topics of which include
Enterprise Vocabulary Network (EVN), Reference Data Manager
(RDM), TopBraid Composer, TopBraid Live, TopBraid Insight,
SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to [email protected]
<javascript:>
---
You received this message because you are subscribed to the
Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to [email protected]
<javascript:>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the
Google Group "TopBraid Suite Users", the topics of which include
Enterprise Vocabulary Network (EVN), Reference Data Manager
(RDM), TopBraid Composer, TopBraid Live, TopBraid Insight,
SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to [email protected]
<javascript:>
---
You received this message because you are subscribed to the
Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected] <javascript:>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise
Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid
Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web
Pages and SPIN.
To post to this group, send email to [email protected]
---
You received this message because you are subscribed to the Google
Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Group "TopBraid
Suite Users", the topics of which include Enterprise Vocabulary Network (EVN),
Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight,
SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to [email protected]
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.