Hi,

If I properly understand your notation, you are try to obtain an instance
as an inferred class.

In this case is CatPerson, a person who only has a pet of kind cat.

And, as I see you defined person_1, and you say he has a cat, then you
expect the system to infer he is a cat person, and return person_1 to you.

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.

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.


Luis Ramos


El dom, 5 dic 2021 a las 15:38, Jakub Jałowiec (<
j.jalow...@student.uw.edu.pl>) 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