@Steve

Which reasoner are you using?  Have you tried openllet (Pellet for Jena) to see if you get the desired result?
works only with Jena 3.X

Which reasoner are you using?  Have you tried openllet (Pellet for Jena) to see if you get the desired result?
that look like a mix of Manchester OWL syntax and DL syntax. At least it's no standard notation


@Luis

On 06.12.21 06:25, Luis Enrique Ramos García wrote:

The point here, and hope to be corrected by anybody else if I am wrong, is
that you are using sparql, which is rdf based. Then, you can only query

asserted, not inferred knowledge.
In Jena you can run SPARQL queries on a model that is backed by some inference mechanism.

Some engines like blazegraph, let you add owl reasoning, and then you can
use the transitive feature of owl  (comment only as example).

I do not know whether or not fuseki can be configured in such a way.

The TE is already using a reasoner. But expressivity depends on the reasoner. For full OWL DL reasoning the only Jena compatible reasoner is Pellet, but the original code is only on Jena 2.X and the Openllet fork is Jena 3.X -

But, and now we come to the example. The Jena docs say that

The critical constructs which go beyond OWL/lite and are not supported in the Jena OWL reasoner are complementOf and oneOf.

the lack of support for  "oneOf" class expression (the {cat_1} is such a thing) which in fact means the inference is not supported by Jena built-in reasoners.

You can try with Jena 3.X + Openllet. Or you fork Openllet and bump to Jena 4.X, but I guess this needs some migration of code then.



Luis Ramos


El dom, 5 dic 2021 a las 15:38, Jakub Jałowiec (<
[email protected]>) escribió:

Hi,
I have an OWL ontology
https://github.com/kubajal/covidepid/blob/main/minimal_test.ttl.
The ontology has the following definitions:

    - Person
       - CatPerson (subClassOf Person + CatPerson equivalentTo hasPet only
       Cat)
    - Animal
       - Cat (subClassOf Animal)
    - hasPet: Person -> Animal

and the following instances:
    - person_1: Person and (hasPet only {cat_1})
    - cat_1: Cat
    - hasPet(person_1, cat_1)

I am using Apache Jena Fuseki 4.2.0 with the OWLFBRuleReasoner reasoner
(link to the configuration:
https://github.com/kubajal/covidepid/blob/main/minimal_test_config.ttl).

I am executing the following query in Fuseki:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX myOnt: <

http://www.semanticweb.org/kubajal/ontologies/2021/11/untitled-ontology-157/
SELECT ?s {
?s rdf:type myOnt:CatPerson .
}

No results are returned whereas I would expect person_1 to be returned (as
it is the case in e.g. Protege using Pellet).
I am using

https://jena.apache.org/documentation/ontology/#more-complex-class-expressions
as documentation which says that the "all values from" construct is
supported  (so e.g. "CatPerson equivalentTo hasPet only Cat" should work).
Am I missing something?

Best regards,
Jakub

Reply via email to