On 1/9/17 5:38 AM, Lorenz Buehmann wrote: > > @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 >
Lorenz, You are using rdfs:subClassOf in your query, but it doesn't exist in your dataset. Putting it in a property path doesn't magically create what's missing in your dataset. Kingsley > > > 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> >>> 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 -- Regards, Kingsley Idehen Founder & CEO OpenLink Software (Home Page: http://www.openlinksw.com) Weblogs (Blogs): Legacy Blog: http://www.openlinksw.com/blog/~kidehen/ Blogspot Blog: http://kidehen.blogspot.com Medium Blog: https://medium.com/@kidehen Profile Pages: Pinterest: https://www.pinterest.com/kidehen/ Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen Twitter: https://twitter.com/kidehen Google+: https://plus.google.com/+KingsleyIdehen/about LinkedIn: http://www.linkedin.com/in/kidehen Web Identities (WebID): Personal: http://kingsley.idehen.net/dataspace/person/kidehen#this : http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ 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