@Hugh : the asterisk operator means 0 .. n occurrences, thus,
#constraint 1
?A rdf:type ?A_SubClassOf.
?A_SubClassOf rdfs:subClassOf* :mytype1.
should also cover the case
?A rdf:type :mytype1 .
Or am I wrong?
I mean the property path expression should also work and is equivalent
to the constraint
?A rdf:type/rdfs:subClassOf* :mytype1 .
Cheers,
Lorenz
On 09.01.2017 00:50, Hugh Williams wrote:
> Hi Oliver,
>
> There are no rdfs:subClassOf or rdfs:subPropertyOf relations in the
> graph of the inserted data:
>
> SQL> SPARQL SELECT * FROM <mygraph> WHERE {?s ?p ?o};
> s
> p
> o
> LONG VARCHAR
> LONG VARCHAR
> LONG VARCHAR
> _______________________________________________________________________________
>
> urn:my:graphX1
> http://www.w3.org/1999/02/22-rdf-syntax-ns#type
> urn:my:graphmytype2
> urn:my:graphX2
> http://www.w3.org/1999/02/22-rdf-syntax-ns#type
> urn:my:graphmytype2
> urn:my:graphC
> http://www.w3.org/1999/02/22-rdf-syntax-ns#type
> urn:my:graphmytype1
> urn:my:graphB
> http://www.w3.org/1999/02/22-rdf-syntax-ns#type
> urn:my:graphmytype1
> urn:my:graphA
> http://www.w3.org/1999/02/22-rdf-syntax-ns#type
> urn:my:graphmytype1
> urn:my:graphC
> urn:my:graphmyrel
> urn:my:graphX1
> urn:my:graphA
> urn:my:graphmyrel
> urn:my:graphX1
> urn:my:graphB
> urn:my:graphmyrel
> urn:my:graphX2
>
> 8 Rows. -- 5 msec.
> SQL>
>
> Please refer to the following documentation on Virtuoso inference and
> reasoning and rdfs:subClassOf & rdfs:subPropertyOf support …
>
> http://docs.openlinksw.com/virtuoso/rdfsparqlrulesubclassandsubprop/
>
> Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software, Inc. // http://www.openlinksw.com/
> Weblog -- http://www.openlinksw.com/blogs/
> LinkedIn -- http://www.linkedin.com/company/openlink-software/
> Twitter -- http://twitter.com/OpenLink
> Google+ -- http://plus.google.com/100570109519069333827/
> Facebook -- http://www.facebook.com/OpenLinkSoftware
> Universal Data Access, Integration, and Management Technology Providers
>
>
>
>> On 6 Jan 2017, at 09:42, Olivier Filangi <olivier.fila...@inra.fr
>> <mailto:olivier.fila...@inra.fr>> wrote:
>>
>> Dear all,
>>
>> I have a strange behaviour with a kind of query with Virtuoso
>> (07.20.3217).
>>
>> Accoding the following tripplet I put with a insert query :
>>
>> PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>> PREFIX :<urn:my:graph>
>>
>>
>> INSERT DATA
>> {
>> GRAPH <mygraph> {
>> :A rdf:type :mytype1.
>> :B rdf:type :mytype1.
>> :C rdf:type :mytype1.
>>
>> :X1 rdf:type :mytype2.
>> :X2 rdf:type :mytype2.
>>
>> :A :myrel :X1.
>> :B :myrel :X2.
>> :C :myrel :X1.
>> }
>> }
>>
>> When I request with on data with the query :
>>
>> PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
>> PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>> PREFIX :<urn:my:graph>
>>
>> SELECT DISTINCT ?A ?B
>> WHERE
>> {
>> ?A ?subProperty8 ?B.
>> ?subProperty8 rdfs:subPropertyOf* :myrel.
>>
>> #constraint 1
>> ?A rdf:type ?A_SubClassOf.
>> ?A_SubClassOf rdfs:subClassOf* :mytype1.
>>
>> #constraint 2
>> ?B rdf:type ?B_SubClassOf.
>> ?B_SubClassOf rdfs:subClassOf* :mytype2.
>> }
>>
>> I get only one result :
>> urn:my:graphA urn:my:graphX1
>>
>> If I remove the first or the second constraint, I get all results that I
>> should find :
>> urn:my:graphA urn:my:graphX1
>> urn:my:graphC urn:my:graphX1
>> urn:my:graphB urn:my:graphX2
>>
>> Could you say me if I did a wrong sparql insertion/request or if it's a
>> bug ?
>>
>> Regards,
>> Olivier F.
>>
>>
>> --
>> Filangi Olivier
>> +33 (0)2 23 48 51 48
>> Biodiversity and Polyploidy team - UMR1349 IGEPP - INRA - Agrocampus
>> Ouest
>> +33 (0)2 99 84 74 22
>> GenOuest Bioinformatics Platform - IRISA
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org <http://slashdot.org>!
>> http://sdm.link/slashdot
>> _______________________________________________
>> Virtuoso-users mailing list
>> Virtuoso-users@lists.sourceforge.net
>> <mailto:Virtuoso-users@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users