PROTEGE: Using length path

前端 未结 1 675
忘掉有多难
忘掉有多难 2021-01-16 02:53

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

1条回答
  •  抹茶落季
    2021-01-16 03:45

    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.

    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.

    0 讨论(0)
提交回复
热议问题