Hi,
I can't seem to get an inference pattern match (sameAs) when combining
InverseFunctionalProperty and subPropertyOf. The first example (based on) -
http://docs.openlinksw.com/virtuoso/rdfsparqlrule.html#rdfsparqlruleinversefunc(I've
only removed the sameAs triple).
This example produces the expected result.
ttlp ('
<john1> a <person> .
<john2> a <person> .
<mary> a <person> .
<mike> a <person> .
<john1> <name> "John" .
<john2> <name> "John" .
<john1> <address> "101 A street" .
<john2> <address> "102 B street" .
<john2> <knows> <mike> .
<mary> <knows> "John" .
<mike> <knows> <john1> .
<mike> <knows> <john2> .
<john1> <name> "Tarzan" .
<mike> <name> "Tarzan" .
', '', 'ifps');
ttlp ('
<name> a <http://www.w3.org/2002/07/owl#InverseFunctionalProperty> .
<name> <http://www.openlinksw.com/schemas/virtrdf#nullIFPValue> "Tarzan" .
', '', 'ifp_list');
rdfs_rule_set ('ifps_rule', 'ifp_list');
SPARQL define input:inference "ifps_rule" SELECT * FROM <ifps> WHERE
{<john1> ?p ?o};
p
VARCHAR o
ANY http://www.w3.org/1999/02/22-rdf-syntax-ns#type person name John
name Tarzan address 101 A street
http://www.w3.org/1999/02/22-rdf-syntax-ns#type person name John
address 102 B street knows mike
<John1> and <John2> attributes have been merged.
However the below (Using subPropertyOf) doesn't work.
ttlp ('
<john1> a <person> .
<john2> a <person> .
<mary> a <person> .
<mike> a <person> .
<john1> <*oldname*> "John" .
<john2> <*oldname2*> "John" .
<john1> <address> "101 A street" .
<john2> <address> "102 B street" .
<john2> <knows> <mike> .
<mary> <knows> "John" .
<mike> <knows> <john1> .
<mike> <knows> <john2> .
<john1> <oldname> "Tarzan" .
<mike> <oldname2> "Tarzan" .
', '', 'blah');
ttlp ('
<oldname> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://www.w3.org/2002/07/owl#DatatypeProperty> .
<oldname2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://www.w3.org/2002/07/owl#DatatypeProperty> .
<oldname> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <name> .
<oldname2> <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> <name> .
<name> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <
http://www.w3.org/2002/07/owl#DatatypeProperty> .
<name> a <http://www.w3.org/2002/07/owl#InverseFunctionalProperty> .
<name> <http://www.openlinksw.com/schemas/virtrdf#nullIFPValue> "Tarzan" .
', '', 'blah_schema');
rdfs_rule_set ('blah_rule', 'blah_schema');
SPARQL define input:inference "blah_rule" SELECT * FROM <blah> WHERE
{<john1> ?p ?o};
p
VARCHAR o
ANY http://www.w3.org/1999/02/22-rdf-syntax-ns#type person oldname John
name John address 101 A street
The query above will not link <john1> and <john2> like the first example.
I assume the issue relates to the use of subPropertyOf as I believe this is
the only difference between the two examples. What am I doing wrong?
Another couple of questions I have around inferencing are
1. Is there a way view the list of rdfs_rule_sets that have been created?
2. How do I delete an rdfs_rule_set in one go rather than just removing
individual schemas from a rule set.
3. On a couple of occasions updating the rule set didn't seem to take
affect until after I'd restarted virtuoso. Is that normal?
Thanks!
Mark