Trying to execute a query using rdf4j console against a sparql endpoint to find the path between 2 nodes using property wildcards but no luck. The first query gives an error as
Malformed query: Not a valid (absolute) IRI:
The second query crashes the console. Should I try to use the query using a different way to query the endpoint as this maybe an rdf4j issue or is the query itself wrong?
PREFIX xy: <http://mainuri/>
select
*
where
{
<http://uriOfInstanceOfData> ((<>|!<>)|^(<>|!<>))* ?x .
?x ?p ?o .
?o ((<>|!<>)|^(<>|!<>))* <http://uriOfInstanceOfData>.
}
AND
PREFIX xy: <http://mainuri/>
select
*
where
{
<http://uriOfInstanceOfData> (xy:|!xy:)* ?x .
?x ?p ?o .
?o (xy:|!xy:)* <http://uriOfInstanceOfData>.
}