is it possible to use Arbitrary Length Path Matching in protege SPARQL query tab?
You are using the Snap SPARQL Query Plugin, not the SPARQL Query plugin.
Unlike the SPARQL Query plugin, the Snap SPARQL Query plugin supports querying over inferred knowledge, but does not support property paths.
From Snap-SPARQL: A Java Framework for working with SPARQL and OWL (section 4):
SPARQL 1.1 contains property path expressions that allow regular-expression-like paths of properties to be matched. However, these are not supported by the Snap-SPARQL framework. While this would be a significant limitation under simple entailment, it is not clear how much of a limitation it actually is under the OWL entailment regime. This is because, one of motivations for property path expressions is that they enable queries to be written whose answers involve some kind of “transitivity” such as
{ ?x rdfs:subClassOf+ ?y }
or{ ?x :partOf+ ?y }
.In these cases, under the OWL entailment regime, transitivity comes “for free” according to the semantics of the language, for example if
A
is a subclass ofB
andB
is a subclass ofC
, thenA
is also a subclass ofC
. For more complex cases that involve choices e.g. the lack of property path expressions imposes some inconvenience and queries such as{ ?x rdfs:label | dce:title ?y }
, will need to be written by the user, if possible.
Let us suppose that i ∈ sub ⊆ sup. Both plugins allow to "infer" that i ∈ sup:
Choose Window > Reset selected tab to default state, if you need the "SPARQL Query" view to be the only view on the "SPARQL Query" tab.