Hi Robin,

negated property paths are currently not supported by the SPIN RDF syntax. I did not even know they existed, having relied on

    https://www.w3.org/TR/sparql11-property-paths/

when designing and updating the SPIN RDF syntax. At some stage, the ! operator was added to SPARQL 1.1 and SPIN was not updated accordingly.

    https://www.w3.org/TR/sparql11-query/#propertypaths

The work-around is to use the syntax based on sp:text instead of the SPIN RDF syntax.

Thanks
Holger


On 30/04/2016 0:07, Robin Keskisärkkä wrote:
Hi!
I need to store negated property paths using the SPIN API (), however, although ARQ parses the queries just fine I'm unable to use them to create SPIN queries. I'm using the latest version of the SPIN API (2.0.0). To exemplify:

|

# Using negated paths to mimic wildcard
StringqString ="PREFIX : <http://example#> SELECT ?target WHERE { :start (:|!:)* ?target }";
Queryquery =QueryFactory.create(qString);
ARQ2SPIN arq2SPIN =newARQ2SPIN(model);
org.topbraid.spin.model.QueryspinQuery =arq2SPIN.createQuery(query,null);

|


This gives rise to the exeption:


|
Exceptioninthread "main"java.lang.IllegalArgumentException:UnsupportedPathelement:!<http://example#> of type class org.apache.jena.sparql.path.P_NegPropSet
 at org.topbraid.spin.arq.ARQ2SPIN.createPath(ARQ2SPIN.java:798)
 at org.topbraid.spin.arq.ARQ2SPIN.createPath(ARQ2SPIN.java:769)
 at org.topbraid.spin.arq.ARQ2SPIN.createMod(ARQ2SPIN.java:804)
 at org.topbraid.spin.arq.ARQ2SPIN.createPath(ARQ2SPIN.java:741)
 at org.topbraid.spin.arq.ARQ2SPIN.access$200(ARQ2SPIN.java:130)
 at org.topbraid.spin.arq.ARQ2SPIN$1.visitElements(ARQ2SPIN.java:609)
 at org.topbraid.spin.arq.ARQ2SPIN$1.visit(ARQ2SPIN.java:552)
at org.apache.jena.sparql.syntax.ElementPathBlock.visit(ElementPathBlock.java:89) at org.topbraid.spin.arq.AbstractElementVisitor.visit(AbstractElementVisitor.java:82)
 at org.topbraid.spin.arq.ARQ2SPIN$1.visit(ARQ2SPIN.java:498)
at org.apache.jena.sparql.syntax.ElementGroup.visit(ElementGroup.java:120)
 at org.topbraid.spin.arq.ARQ2SPIN.createElementList(ARQ2SPIN.java:454)
 at org.topbraid.spin.arq.ARQ2SPIN.createQuery(ARQ2SPIN.java:905)
|


Are negated property paths not supported in SPIN API at this point? I also looked at the vocabulary specification and couldn't find anything that indicated that it is supported.


Cheers,

Robin

--
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.

Reply via email to