I don't see any need for inference here.
It's not clear whether Apple is a class or an individual. If it's an
individual, and that's what definitely follows from
:Bassam :eat :Apple
then I read your first triple as
:Apple rdf:type :Fruit
and the query would be
SELECT ?s WHERE {
?s :eats ?x . ?x rdf:type :Fruit.
}
Otherwise, a common SPARQL 1.1 pattern is
SELECT ?s WHERE {
?s :eats ?x . ?x rdf:type/rdfs:subClassOf* :Fruit.
}
On 16.08.2016 15:16, Eng.Bassam wrote:
> Hi
>
> Suppose I have an ontology for fruits:
> Bana is Fruit.
> Apple is Fruit.
>
> Also suppose I have other dataset that contains:
>
> Bassam eat Apple.
> Husam eat Banana.
>
> Can I do following question (SPARQL query) using Virtuoso, Who eat Fruits?
> the answer must be Bassam and Husam, because there is an inference
> (Banana and Apple are fruits)
>
> Thanks
>
> --
> -----------------------------------
> > Eng.Bassam Najeeb.
> >Software Engineer.
>
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Virtuoso-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
------------------------------------------------------------------------------
_______________________________________________
Virtuoso-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/virtuoso-users