Hi Hhugh,
I've tried to reproduce the simplest example testing it still doesn't work. I'm using Virtuoso Version: 06.01.3127 (installed from Ubuntu 10.10 repositories).

This is my schema (schema.rdfs):

<?xml version="1.0"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";
    xml:base="http://example.org/schema.rdfs#";
>

<rdfs:Class rdf:ID="Person"/>
<rdfs:Class rdf:ID="Administrator">
<rdfs:subClassOf>
<rdfs:Class rdf:ID="Person"/>
</rdfs:subClassOf>
</rdfs:Class>

<rdf:Property rdf:ID="hasAdministrator">
<rdfs:domain rdf:resource="#Organization"/>
<rdfs:range rdf:resource="#Administrator"/>
</rdf:Property>

</rdf:RDF>

This is my dataset (data.rdf):

<?xml version="1.0"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    xmlns:gs="http://example.org/schema.rdfs#";
>
<gs:Organization rdf:about="http://example.org/data.rdf#o1";>
<gs:hasAdministrator rdf:resource="http://example.org/data.rdf#p5"/>
</gs:Organization>
</rdf:RDF>

My query is:

rdfs_rule_set('http://example.org/schema.rdfs', 'http://example.org/schema.rdfs');

SPARQL
define input:inference "http://example.org/schema.rdfs";
SELECT *
FROM <http://example.org/data.rdfs>
WHERE {<http://example.org/data.rdfs#p5> ?p ?o}

And I would like to infer that, p5 is an Administrator, (because it is in the range of hasAdministrator property), then that it is a Person (simple subClassOf inference, which is working in other examples).

Thank you for your help,
    Riccardo

On 29/09/2010 15:06, Hugh Williams wrote:
Hi Riccardo,

Can you provide RDFs data being used for the rule so we can load and attempt to 
recreate in-house ? Please also provide details of the Virtuoso version being 
used (virtuoso-t -?)

Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
Twitter: http://twitter.com/OpenLink

On 29 Sep 2010, at 11:18, Riccardo Tasso wrote:

Dear Hugh,
    I can't understand why, in my schema it seems not working.
These are the steps I followed:

1) Default graph: http://ex.org/schema.rdfs

ASK {<http://ex.org/schema.rdfs#hasActiveAdministrator>
<http://www.w3.org/2000/01/rdf-schema#range>
<http://ex.org/schema.rdfs#ActiveAdministrator>}

returns true;

2) rdfs_rule_set('http://ex.org/schema.rdfs',  'http://ex.org/schema.rdfs');

3) The following query:

Default graph: http://ex.org/data.rdf

define input:inference "http://ex.org/schema.rdfs";
SELECT *
WHERE {?s<http://ex.org/schema.rdfs#hasActiveAdministrator>  ?o}

returns:

<http://ex.org/data.rdf#o1>  <http://ex.org/data.rdf#p5>;

4) The following query:

Default graph: http://ex.org/data.rdf

define input:inference "http://ex.org/schema.rdfs";
SELECT *
WHERE {?s<http://ex.org/schema.rdfs#hasActiveAdministrator>  ?o. ?o a
<http://ex.org/schema.rdfs#ActiveAdministrator>}

returns empty set;

I expected to have in my result set<http://ex.org/data.rdf#o1>
<http://ex.org/data.rdf#p5>; as in the previous query, because the range
of hasActiveAdministrator is ActiveAdministrator, also if in my dataset
p5 is a Person which is a superclass of ActiveAdministrator.

Moreover in documentation
(http://docs.openlinksw.com/virtuoso/rdfsparqlrule.html and
http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSVirtuoso6FAQ#What%20inferencing%20is%20supported?)
there is no mention of domain and ranged inferencing. Maybe I missed
something...

Best regards,
    Riccardo

On 29/09/2010 02:44, Hugh Williams wrote:
Hi Ricardo,

Yes, Virtuoso does support RDFS Domain and Ranged inferencing, have to read the 
Virtuoso inferencing documentation:

        http://docs.openlinksw.com/virtuoso/rdfsparqlrule.html

Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
Twitter: http://twitter.com/OpenLink

On 28 Sep 2010, at 23:40, Riccardo Tasso wrote:


Hello,
    I'm interested in using Virtuoso server as a triple store. My
question is if does it support RDFS domain and range inference, because
this has some relevance to my use case.

I didn't found any trace of this kind of inference inside Virtuoso
documentation, neither in the mailing list, but I really would like to
be sure.

Thank you,
    Riccardo

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Virtuoso-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Virtuoso-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Reply via email to