PROTEGE: Using length path

2019-02-28 08:13发布

is it possible to use Arbitrary Length Path Matching in protege SPARQL query tab?

enter image description here

1条回答
够拽才男人
2楼-- · 2019-02-28 09:10

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 of B and B is a subclass of C, then A is also a subclass of C. 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:

  • with the SPARQL Query Plugin, you need to use property paths;
  • with the Snap SPARQL Query Plugin, you don't need to use property paths, and in fact you can't.

Comparison

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.

查看更多
登录 后发表回答